### DrawScreenspace.LineFrom API Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawScreenspace_LineFrom Draws a line on the screen from a specified start point in the camera's viewport space. ```APIDOC ## POST /websites/symphonygames_net_drawxxldocumentation ### Description Draws a line on the screen using the DrawScreenspace.LineFrom method. This function allows for detailed customization of the line's appearance, including its start point, direction, color, width, style, and optional text. ### Method POST ### Endpoint /websites/symphonygames_net_drawxxldocumentation ### Parameters #### Request Body - **start** (Vector2) - Required - The start position (mounting point) of the line. This is in the cameras viewport space and goes from (0,0), which is the bottom-left corner to (1,1), which is the top-right corner. - **direction** (Vector2) - Required - The direction vector that defines the line and that starts from the mounting point. See also the "interpretDirectionAsUnwarped" parameter. - **color** (Color) - Required - The color of the line. - **width_relToViewportHeight** (float) - Optional - The width of the line measured in relative units to the viewport height. The default value of 0 means that the line will have a width of one pixel. - **text** (string) - Optional - An optional text to display along the line. - **interpretDirectionAsUnwarped** (bool) - Optional - Determines whether the direction vector should be treated in warped or unwarped viewport space. In unwarped space, 1 unit always corresponds to the viewport height. - **style** (LineStyle) - Optional - A style for the line. Defaults to "solid" (straight line). Can also be dotted, dashed, zigzag, sine, freehand, etc. - **stylePatternScaleFactor** (float) - Optional - Scales the line pattern if a custom style is used. - **animationSpeed** (float) - Optional - Animates the line pattern if a custom style is used. - **endPlatesSize_relToViewportHeight** (float) - Optional - The size of optional end position markers ("end plates"). - **alphaFadeOutLength_0to1** (float) - Optional - Creates an effect where the line slowly fades out towards the end position. - **enlargeSmallTextToThisMinRelTextSize** (float) - Optional - Sets a minimum text size if the "text" parameter is used, measured in relative units to the viewport height. - **durationInSec** (float) - Optional - The duration in seconds for which the drawn line stays visible. Default is 0, meaning it stays for the current Update frame. ### Request Example { "start": {"x": 0.1, "y": 0.1}, "direction": {"x": 0.5, "y": 0.5}, "color": {"r": 255, "g": 0, "b": 0, "a": 255}, "width_relToViewportHeight": 0.01, "text": "Example Line", "style": "dashed" } ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example { "status": "success" } ``` -------------------------------- ### DrawBasics.VectorFrom Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawBasics_VectorFrom Draws a vector starting from a specified position, similar to Unity's Ray. It offers extensive customization for appearance, labels, and visibility. ```APIDOC ## static void DrawBasics.VectorFrom(...) ### Description Draws a vector that is mounted at a starting point (similarly to Unitys Ray). Offers customization for color, line width, text, pointer cones, end plates, and visibility. ### Method static void ### Endpoint N/A (This is a static method call within a library) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **vectorStartPos** (Vector3) - Required - The mounting point where the vector starts. * **vector** (Vector3) - Required - The vector direction and magnitude. * **color** (Color) - Required - The color of the vector. * **lineWidth** (float) - Required - The width of the vector line. * **text** (string) - Optional - Text to display along the vector. * **coneLength** (float) - Optional - The length of the vector pointer cones. Can be interpreted as absolute or relative to the radius based on global settings. * **pointerAtBothSides** (bool) - Optional - Whether to draw pointers at both ends of the vector. * **flattenThickRoundLineIntoAmplitudePlane** (bool) - Optional - Flattens the line into an amplitude plane for text protrusion. Affects styling when `customAmplitudeAndTextDir` is used. * **customAmplitudeAndTextDir** (Vector3) - Optional - Explicitly sets the direction for text protrusion. If not provided, global settings are used. * **addNormalizedMarkingText** (bool) - Optional - Adds a visual marker ring at the position where the vector would have a length of 1. * **enlargeSmallTextToThisMinTextSize** (float) - Optional - Sets a minimum text size when text is used, ensuring readability even for short lines. * **writeComponentValuesAsText** (bool) - Optional - Whether to write component values as text along the vector. * **endPlates_size** (float) - Optional - The size of optional end position markers ('end plates'). Interpreted as relative or absolute based on global settings. * **durationInSec** (float) - Optional - The duration in seconds the drawn vector remains visible. A value of 0 means it stays for the current frame. * **hiddenByNearerObjects** (bool) - Optional - Specifies if the vector is hidden by nearer objects (depth testing). Equivalent to Unity's Debug.DrawLine() depthTest parameter. ### Request Example ```csharp DrawBasics.VectorFrom(new Vector3(0, 0, 0), new Vector3(1, 1, 1), Color.red, 0.1f, "MyVector", 0.2f, false, true, new Vector3(0, 1, 0), true, 0.05f, false, 0.1f, 5.0f, true); ``` ### Response #### Success Response (N/A - This is a drawing function, not an API endpoint returning data) N/A #### Response Example N/A ``` -------------------------------- ### Draw Basics 2D.LineFrom(...); Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawBasics2D_LineFrom Draws a 2D line vector starting from a specified mounting point, restricted to the XY-plane. This function is functionally equivalent to Draw Basics 2D.Ray(). ```APIDOC ## Draw Basics 2D.LineFrom(...) ### Description Draws a line vector that starts from a mounting point. The line is restricted into a XY-2D-plane. It is actually the same as Ray(), just with another name. ### Method This describes a function call, not a traditional HTTP method. ### Endpoint N/A (Local library function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A Green parameters are required. Yellow parameters are optional, but have to be supplied in order. ### Request Example ``` Draw Basics 2D.LineFrom(mountingPoint, ...); ``` ### Response #### Success Response (200) Represents the successful drawing of a line. #### Response Example N/A (Visual output, not a structured response) ``` -------------------------------- ### Create and Draw a Custom Chart (C#) Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiClasses/DrawCharts This example shows how to create a custom chart instance using 'ChartDrawing'. It involves declaring a chart variable, initializing it in 'Start', and then adding data and drawing it in 'Update'. This provides more flexibility than using premade charts. ```csharp ChartDrawing myChart; void Start() { myChart = new ChartDrawing(); } void Update() { myChart.AddValue(myDataPointValue); //adding data to the chart myChart.Draw(); //drawing the chart } ``` -------------------------------- ### DrawScreenspace.VectorCircled (Angle from Start Position) Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawScreenspace_VectorCircled Draws a circled vector on the screen using the angle from a start position. This overload does not explicitly specify a target camera. ```APIDOC ## POST /websites/symphonygames_net_drawxxldocumentation/DrawScreenspace.VectorCircled ### Description This endpoint allows you to draw a circled vector on the screen. It calculates the vector's position based on a starting point and a rotation angle around a specified circle center. Various parameters control its appearance, text rendering, and visibility duration. ### Method POST ### Endpoint /websites/symphonygames_net_drawxxldocumentation/DrawScreenspace.VectorCircled ### Parameters #### Request Body - **startPos** (Vector2) - Required - The start position of the circled vector on the perimeter. - **circleCenter** (Vector2) - Required - The circle center around which to turn the start position. - **turnAngleDegCC** (float) - Required - The angle how much "startPos" is turned around "circleCenter" in order to create the circled vector. In degrees and counterclockwise (CC). - **color** (Color) - Required - The color of the drawn vector. - **lineWidth_relToViewportHeight** (float) - Required - The relative line width to the viewport height. - **text** (string) - Optional - The text to be displayed along the curved vector. - **coneLength_relToViewportHeight** (float) - Optional - The length of the vector pointer cones. Can be interpreted as absolute or relative to the radius, depending on the global setting 'coneLength_interpretation_forCircledVectors'. Defaults to relative to radius. - **skipFallbackDisplayOfZeroAngles** (bool) - Optional - If true, skips the information tag for zero angles, which cannot be drawn. Defaults to false. - **pointerAtBothSides** (bool) - Optional - Whether to draw pointers at both sides of the vector. Defaults to false. - **minAngleDeg_withoutTextLineBreak** (float) - Optional - Specifies the angle on an imaginary curved line after which text line breaks will occur. Affects the optional text drawn along the vector. - **textAnchor** (TextAnchorCircledDXXL) - Optional - The anchor point for the text. - **durationInSec** (float) - Optional - The duration in seconds for which the drawn object remains visible. A value of 0 means it stays only for the current Update frame. Defaults to 0. ### Request Example ```json { "startPos": {"x": 100, "y": 100}, "circleCenter": {"x": 200, "y": 200}, "turnAngleDegCC": 90.0, "color": {"r": 255, "g": 0, "b": 0}, "lineWidth_relToViewportHeight": 0.01, "text": "Sample Text", "coneLength_relToViewportHeight": 0.1, "skipFallbackDisplayOfZeroAngles": false, "pointerAtBothSides": true, "minAngleDeg_withoutTextLineBreak": 30.0, "textAnchor": "TopLeft", "durationInSec": 5.0 } ``` ### Response #### Success Response (200) (This endpoint typically does not return a response body, as it's a drawing command.) #### Response Example (No response body) ``` -------------------------------- ### DrawScreenspace.Ray Method Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawScreenspace_Ray This section details the `DrawScreenspace.Ray` method, which allows for drawing rays on the screen. It includes an overload that explicitly takes a Camera parameter. ```APIDOC ## static void DrawScreenspace.Ray(Camera targetCamera, Vector2 start, Vector2 direction, Color color, float width_relToViewportHeight, string text, bool interpretDirectionAsUnwarped, LineStyle style, float stylePatternScaleFactor, float animationSpeed, float endPlatesSize_relToViewportHeight, float alphaFadeOutLength_0to1, float enlargeSmallTextToThisMinRelTextSize, float durationInSec) ### Description Draws a ray on the screen using the specified camera and a comprehensive set of parameters for customization. This overload allows for explicit camera selection. ### Method static void ### Endpoint N/A (This is a static method call, not a REST endpoint) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```csharp DrawScreenspace.Ray(myCamera, new Vector2(0.5f, 0.5f), new Vector2(0.1f, 0.1f), Color.red, 0.01f, "", true, LineStyle.Solid, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f); ``` ### Response #### Success Response (200) N/A (This is a void method, no direct return value) #### Response Example N/A ``` -------------------------------- ### Draw Physics 2D LinecastAll Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawPhysics2D_LinecastAll Draws a visualization for the 2D LinecastAll physics cast, similar to Unity's LinecastAll but with added drawing capabilities and optional visualization parameters. ```APIDOC ## static RaycastHit2D[] DrawPhysics2D.LinecastAll(...); ### Description This function is similar to Unity's Physics2D.LinecastAll() but includes a visualization of the cast. It adds three optional parameters for controlling the visualization. ### Method `static` ### Endpoint `DrawPhysics2D.LinecastAll()` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **RaycastHit2D[]**: An array of RaycastHit2D objects representing the hits. #### Response Example ```json [ { "collider": "...", "point": { "x": 0.0, "y": 0.0 }, "normal": { "x": 0.0, "y": 0.0 }, "distance": 0.0 } ] ``` ### Parameters Details: - **start** (Vector2) - Required - The starting point of the linecast. - **end** (Vector2) - Required - The ending point of the linecast. - **layerMask** (int) - Required - The layer mask to use for the cast. - **minDepth** (float) - Required - The minimum depth to consider for the cast. - **maxDepth** (float) - Required - The maximum depth to consider for the cast. - **nameTag** (string) - Optional - A tag to identify the drawn visualization. - **durationInSec** (float) - Optional - The duration in seconds the visualization remains visible. Defaults to 0 (current update frame). Can be overridden by a global setting. - **hiddenByNearerObjects** (bool) - Optional - Determines if the visualization is hidden by nearer objects (similar to Unity's depthTest). Defaults to true. Can be overridden by a global setting. ``` -------------------------------- ### DrawScreenspace.VectorCircled (Angle from Start Position with Target Camera) Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawScreenspace_VectorCircled Draws a circled vector on the screen using the angle from a start position, explicitly specifying the target camera. This overload is useful when you need to control which camera renders the vector. ```APIDOC ## POST /websites/symphonygames_net_drawxxldocumentation/DrawScreenspace.VectorCircled_cam ### Description This endpoint draws a circled vector on the screen, similar to the previous overload, but allows explicit specification of the target camera. This provides more control over rendering, especially in multi-camera setups. ### Method POST ### Endpoint /websites/symphonygames_net_drawxxldocumentation/DrawScreenspace.VectorCircled_cam ### Parameters #### Request Body - **targetCamera** (Camera) - Required - The camera to which the drawing should be rendered. - **startPos** (Vector2) - Required - The start position of the circled vector on the perimeter. - **circleCenter** (Vector2) - Required - The circle center around which to turn the start position. - **turnAngleDegCC** (float) - Required - The angle how much "startPos" is turned around "circleCenter" in order to create the circled vector. In degrees and counterclockwise (CC). - **color** (Color) - Required - The color of the drawn vector. - **lineWidth_relToViewportHeight** (float) - Required - The relative line width to the viewport height. - **text** (string) - Optional - The text to be displayed along the curved vector. - **coneLength_relToViewportHeight** (float) - Optional - The length of the vector pointer cones. Can be interpreted as absolute or relative to the radius, depending on the global setting 'coneLength_interpretation_forCircledVectors'. Defaults to relative to radius. - **skipFallbackDisplayOfZeroAngles** (bool) - Optional - If true, skips the information tag for zero angles, which cannot be drawn. Defaults to false. - **pointerAtBothSides** (bool) - Optional - Whether to draw pointers at both sides of the vector. Defaults to false. - **minAngleDeg_withoutTextLineBreak** (float) - Optional - Specifies the angle on an imaginary curved line after which text line breaks will occur. Affects the optional text drawn along the vector. - **textAnchor** (TextAnchorCircledDXXL) - Optional - The anchor point for the text. - **durationInSec** (float) - Optional - The duration in seconds for which the drawn object remains visible. A value of 0 means it stays only for the current Update frame. Defaults to 0. ### Request Example ```json { "targetCamera": "MainCamera", "startPos": {"x": 150, "y": 150}, "circleCenter": {"x": 250, "y": 250}, "turnAngleDegCC": 45.0, "color": {"r": 0, "g": 255, "b": 0}, "lineWidth_relToViewportHeight": 0.008, "text": "Another Text", "coneLength_relToViewportHeight": 0.08, "skipFallbackDisplayOfZeroAngles": true, "pointerAtBothSides": false, "minAngleDeg_withoutTextLineBreak": 45.0, "textAnchor": "MiddleCenter", "durationInSec": 3.0 } ``` ### Response #### Success Response (200) (This endpoint typically does not return a response body, as it's a drawing command.) #### Response Example (No response body) ``` -------------------------------- ### DrawPhysics.BoxCast (Visualization) Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawPhysics_BoxCast This function is similar to Unity's BoxCast, with added parameters for visualization. It draws a visualization of the cast and includes optional parameters for 'nameTag', 'durationInSec', and 'hiddenByNearerObjects'. ```APIDOC ## static bool DrawPhysics.BoxCast(...); ### Description Performs a BoxCast operation and draws a visualization of the cast. It mirrors Unity's BoxCast functionality but adds optional parameters to control the visualization's appearance and behavior. ### Method `static bool` ### Endpoint `DrawPhysics.BoxCast` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **center** (Vector3) - Required - The center of the box. - **halfExtents** (Vector3) - Required - The extents (half-length) of the box in local space. - **direction** (Vector3) - Required - The direction to cast the box. - **orientation** (Quaternion) - Required - The orientation of the box. - **maxDistance** (float) - Required - The maximum distance to cast. - **layerMask** (int) - Required - A layer mask that is used to call. Only objects with the same layer can be detected. - **queryTriggerInteraction** (QueryTriggerInteraction) - Required - Specifies whether the cast should include or ignore triggers. - **nameTag** (string) - Optional - A tag for the visualization. - **durationInSec** (float) - Optional - The duration in seconds for which the drawn object remains visible. Defaults to 0 (visible for the current Update frame). - **hiddenByNearerObjects** (bool) - Optional - Determines if the drawn object is hidden by nearer geometry. Similar to Unity's Debug.DrawLine() depthTest parameter. ### Request Example ```json { "center": "(0, 0, 0)", "halfExtents": "(1, 1, 1)", "direction": "(0, 0, 1)", "orientation": "(0, 0, 0, 1)", "maxDistance": 10.0, "layerMask": 1, "queryTriggerInteraction": "UseGlobal", "nameTag": "MyBoxCast", "durationInSec": 5.0, "hiddenByNearerObjects": false } ``` ### Response #### Success Response (200) - **bool** (bool) - Returns true if the cast hit any collider, otherwise false. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### drawLineToColFade2D Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawBasics2D_LineTo_withColorFade Draws a 2D line with a color fade effect from start to end, with various customization options. ```APIDOC ## POST /websites/symphonygames_net_drawxxldocumentation ### Description Draws a 2D line with a color fade effect, allowing customization of direction, end position, start and end colors, width, style, text, and animation. ### Method POST ### Endpoint /websites/symphonygames_net_drawxxldocumentation ### Parameters #### Request Body - **direction** (Vector2) - Required - The line direction vector that points towards the end position. - **end** (Vector2) - Required - The end position mounting point, towards which the direction points. - **startColor** (Color) - Required - The color of the line at the start position. - **endColor** (Color) - Required - The color of the line at the end position. - **width** (float) - Optional - The line width in worldspace. Default is 0 (one pixel). - **text** (string) - Optional - Text to display along the line. - **style** (LineStyle) - Optional - Style for the line (e.g., solid, dotted, dashed). Default is 'solid'. - **custom_zPos** (float) - Optional - The z position of the XY-plane. Default is infinity. - **stylePatternScaleFactor** (float) - Optional - Scales the line pattern for custom styles. - **animationSpeed** (float) - Optional - Animates the line pattern for custom styles. - **endPlates_size** (float) - Optional - Size of optional end position markers. - **alphaFadeOutLength_0to1** (float) - Optional - Controls the fade-out effect at the line end. Default is 0. - **enlargeSmallTextToThisMinTextSize** (float) - Optional - Minimum text size when text is used and line becomes small. - **durationInSec** (float) - Optional - Duration in seconds the line stays visible. Default is 0 (current update frame). - **hiddenByNearerObjects** (bool) - Optional - Determines if the line is hidden by nearer objects. Same as Unity's Debug.DrawLine() depthTest. ### Request Example ```json { "direction": [0.0, 1.0], "end": [5.0, 10.0], "startColor": {"r": 255, "g": 0, "b": 0, "a": 255}, "endColor": {"r": 0, "g": 0, "b": 255, "a": 255}, "width": 1.0, "text": "Example Line", "style": "dotted", "custom_zPos": 0.0, "stylePatternScaleFactor": 1.0, "animationSpeed": 0.5, "endPlates_size": 0.2, "alphaFadeOutLength_0to1": 0.1, "enlargeSmallTextToThisMinTextSize": 10.0, "durationInSec": 5.0, "hiddenByNearerObjects": true } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### DrawBasics2D.LineCircled (angleFromStartPos) Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawBasics2D_LineCircled Draws a line segment on a circle's circumference, defined by a starting position and a turning angle. ```APIDOC ## DrawBasics2D.LineCircled (angleFromStartPos) ### Description Draws a line segment on a circle's circumference, originating from a specified starting position and extending by a given turning angle. ### Method `static void` ### Endpoint `DrawBasics2D.LineCircled` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **startPos** (Vector2) - The starting position on the circumference. - **circleCenter** (Vector2) - The center of the circle. - **turnAngleDegCC** (float) - The angle in degrees to turn counterclockwise from the start position. - **color** (Color) - The color of the line. - **width** (float) - The width of the line. - **text** (string) - Optional text to display along the line. - **custom_zPos** (float) - Optional custom Z-position for drawing. Defaults to `DrawBasic2D.Default_zPos_forDrawing`. - **skipFallbackDisplayOfZeroAngles** (bool) - If true, skips fallback display for zero angles. - **minAngleDeg_withoutTextLineBreak** (float) - Minimum angle in degrees to avoid text line breaks. - **textAnchor** (TextAnchorCircledDXXL) - Anchor point for the text. - **durationInSec** (float) - Duration in seconds for which the line remains visible. Defaults to 0 (current frame). - **hiddenByNearerObjects** (bool) - If true, the line will be hidden by nearer objects (depth testing). Defaults to Unity's `Debug.DrawLine()` behavior. ### Request Example ```csharp DrawBasics2D.LineCircled( startPos: new Vector2(10f, 10f), circleCenter: new Vector2(0f, 0f), turnAngleDegCC: 90f, color: Color.red, width: 1f, text: "Segment 1", custom_zPos: 0f, skipFallbackDisplayOfZeroAngles: false, minAngleDeg_withoutTextLineBreak: 10f, textAnchor: TextAnchorCircledDXXL.Top, durationInSec: 5f, hiddenByNearerObjects: true ); ``` ### Response #### Success Response (200) This method is `void` and does not return a value. ``` -------------------------------- ### Draw Engine Basics.VectorFrom Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawEngineBasics_VectorFrom Draws a 3D vector and visualizes its components (x, y, z) for orientation in 3D space. Supports optional parameters for visualization duration, line width, text labels, and depth testing. ```APIDOC ## void DrawEngineBasics.VectorFrom ### Description Draws a vector and additionally visualizes each vector component (x, y, z). It can e.g. help to see at first sight how the vector is oriented in 3D space. Green parameters are required. Yellow parameters are optional, but have to be supplied in order. ### Method `static void` ### Endpoint `DrawEngineBasics.VectorFrom` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **vectorStartPos** (Vector3) - Required - The starting position of the vector. - **vector** (Vector3) - Required - The vector to draw. - **color** (Color) - Required - The color of the vector. - **lineWidth** (float) - Required - The width of the line representing the vector. - **text** (string) - Optional - A text label to associate with the vector. - **durationInSec** (float) - Optional - The duration in seconds the vector remains visible. Defaults to 0 (current frame). Can be overridden by global settings. - **hiddenByNearerObjects** (bool) - Optional - Determines if the vector is hidden by objects in front of it (similar to Unity's `Debug.DrawLine` depthTest). Defaults to false. Not all methods support toggling this in the same way. Can be overridden by global settings. ### Request Example ```json { "vectorStartPos": {"x": 0.0, "y": 0.0, "z": 0.0}, "vector": {"x": 1.0, "y": 0.0, "z": 0.0}, "color": {"r": 1.0, "g": 0.0, "b": 0.0}, "lineWidth": 1.0, "text": "X-Axis Vector", "durationInSec": 5.0, "hiddenByNearerObjects": true } ``` ### Response #### Success Response (200) This method does not return a value, it performs a drawing operation. #### Response Example N/A ``` -------------------------------- ### DrawBasics2D.RayColorFade Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawBasics2D_RayColorFade Draws a 2D ray with a color gradient from start to end, supporting various visual styles and optional text. ```APIDOC ## void DrawBasics2D.RayColorFade ### Description Draws a 2D ray that transitions in color from a specified start color to an end color. This function allows for extensive customization of the ray's appearance, including its path, width, style, text, and visibility. ### Method `void` (This is a static method, not a typical HTTP method) ### Endpoint `DrawBasics2D.RayColorFade` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **start** (Vector2) - Required - The start position of the ray. * **direction** (Vector2) - Required - The ray that gets drawn, mounted at the start position. * **startColor** (Color) - Required - The color of the ray at the start position. * **endColor** (Color) - Required - The color of the ray at the end position. * **width** (float) - Optional - The line width in worldspace of the ray. The default value of 0 means that the ray will have a width of one pixel. * **text** (string) - Optional - An optional text to display along the ray. See AutomaticAmplitudeAndTextAlignment, AutomaticTextDirectionOfLines and CameraForAutomaticOrientation for more information how the text will get displayed. * **style** (LineStyle) - Optional - A style for the ray. The default is called "solid", which is a straight line, but it can also be dotted, dashed, zigzag, sine, freehand, ... * **custom_zPos** (float) - Optional - The z position of the XY-plane inside which the ray is drawn. The default value is "infinity", which falls back to DrawBasic2D.Default_zPos_forDrawing. * **stylePatternScaleFactor** (float) - Optional - If the style parameter has been set to custom style (meaning not the default solid style) then this parameter scales the line pattern. It can help to adjust the line appearance so it fits different orders of view magnitude. * **animationSpeed** (float) - Optional - If the style parameter has been set to custom style (meaning not the default solid style) then it can be animated and appears as if the pattern walks along the line. * **endPlates_size** (float) - Optional - The ray can optionally have end position markers which are called "end plates" here. The size that is specified here is interpreted as relative to the line length or in absolute units according to the global end plates size interpretation setting. * **alphaFadeOutLength_0to1** (float) - Optional - With this parameter an effect can be created where the ray does not end distinctly at the line end position, but slowly fades out towards the ray end position. The default value of 0 means that the effect is disabled. * **enlargeSmallTextToThisMinTextSize** (float) - Optional - This only has effect if the "text" parameter is used. The normal behaviour of text is that it scales with the line length. Though depending on the situation the line may get very small, up until the text is not readable anymore. This parameter sets a limit for the minimum text size. * **durationInSec** (float) - Optional - The duration in seconds how long the drawn thing stays visible. The default value of 0 means that it stays only during the current Update frame. * **hiddenByNearerObjects** (bool) - Optional - This specifies if the drawn thing will get hidden if other geometry is in front of it or if it shines through. It is the same as the depthTest parameter of Unitys Debug.DrawLine(). ### Request Example ```csharp // Example Usage (Conceptual - actual syntax may vary based on language binding) DrawBasics2D.RayColorFade( start: new Vector2(0, 0), direction: new Vector2(10, 0), startColor: Color.red, endColor: Color.blue, width: 0.5f, text: "Example Ray", style: LineStyle.Dashed, custom_zPos: 0f, stylePatternScaleFactor: 2f, animationSpeed: 1f, endPlates_size: 0.1f, alphaFadeOutLength_0to1: 0.2f, enlargeSmallTextToThisMinTextSize: 10f, durationInSec: 5f, hiddenByNearerObjects: false ); ``` ### Response #### Success Response (200) This function is a drawing utility and does not return a value indicating success or failure in the traditional sense. Its effect is visual rendering. #### Response Example N/A (Visual output) ``` -------------------------------- ### DrawEngineBasics.GridScreenspace (Default Camera) Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawEngineBasics_GridScreenspace Draws a grid pattern to the screen using the default camera settings. Allows customization of grid appearance and duration. ```APIDOC ## void DrawEngineBasics.GridScreenspace(...) ### Description Draws a grid pattern to the screen similar to graph paper using the default camera settings. ### Method static void ### Endpoint N/A (This is a library function, not an API endpoint) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **color** (Color) - Required - The color of the grid lines. * **linesWidth_relToViewportHeight** (float) - Required - The width of the grid lines relative to the viewport height. * **drawTenthLines** (bool) - Required - Whether to draw lines for every tenth grid unit. * **drawHundredthLines** (bool) - Required - Whether to draw lines for every hundredth grid unit. * **gridScreenspaceMode** (GridScreenspaceMode) - Required - The mode for drawing the grid. * **durationInSec** (float) - Optional - The duration in seconds for which the drawn grid remains visible. Defaults to 0 (current update frame). ### Request Example ```json { "color": "Color.White", "linesWidth_relToViewportHeight": 0.001, "drawTenthLines": true, "drawHundredthLines": false, "gridScreenspaceMode": "GridScreenspaceMode.Linear", "durationInSec": 5.0 } ``` ### Response #### Success Response (void) This function returns void. #### Response Example N/A ``` -------------------------------- ### Draw List of Integers (Screenspace, 3D Position, Specific Camera) Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawText_WriteListScreenspace Writes a list of integer values to the screen using a 3D world position and an explicitly provided camera for rendering. ```APIDOC ## POST /websites/symphonygames_net_drawxxldocumentation/DrawText/WriteListScreenspace ### Description Writes a list of integer values to the screen by projecting a 3D world position, utilizing an explicitly provided camera for rendering. This overload offers granular control over the drawing process. ### Method POST ### Endpoint /websites/symphonygames_net_drawxxldocumentation/DrawText/WriteListScreenspace ### Parameters #### Request Body - **screenCamera** (Camera) - Required - The camera to use for rendering. - **intList** (List) - Required - The list of integer values to display. - **position_in3DWorldspace** (Vector3) - Required - The 3D world position to project. - **color** (Color) - Required - The color of the text. - **title** (string) - Optional - A title to display above the list. - **textSize_relToViewportHeight** (float) - Optional - Defines the text size relative to viewport height. - **forceHeightOfWholeTableBox_relToViewportHeight** (float) - Optional - Forces the height of the entire table box. Default is 0. - **position_isTopLeft_notLowLeft** (bool) - Optional - If true, the projected position specifies the top-left corner; otherwise, the lower-left. - **durationInSec** (float) - Optional - The duration in seconds for which the text remains visible. Default is 0. ### Request Example ```json { "screenCamera": {"name": "SecondCamera"}, "intList": [100, 200, 300], "position_in3DWorldspace": {"x": -5.0, "y": 1.0, "z": 15.0}, "color": {"r": 0.0, "g": 0.0, "b": 1.0, "a": 1.0}, "title": "Resource Count", "durationInSec": 7.0 } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Draw Vector Circled from Quaternion Up Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawBasics_VectorCircled Draws a vector on the perimeter of a circle, starting from a direction defined by a quaternion's 'up' vector. ```APIDOC ## POST /websites/symphonygames_net_drawxxldocumentation/DrawBasics/VectorCircled/fromQuatUp ### Description Draws a vector on the perimeter of a circle, starting from a direction defined by a quaternion's 'up' vector. This overload allows specifying the starting direction and the turn angle. ### Method POST ### Endpoint /websites/symphonygames_net_drawxxldocumentation/DrawBasics/VectorCircled/fromQuatUp ### Parameters #### Request Body - **circleCenterPos** (Vector3) - Required - The center of the circle on whose perimeter the vector will be drawn. - **orientation** (Quaternion) - Required - A quaternion that rotates the whole circle object. Quaternion*forward is the turn axis of the circle. Quaternion*up defines the direction where the vector will start. - **turnAngleDegCC_startingFromUp** (float) - Required - The vector starts at Quaternion*up and then turns by this angle (in degrees) counterclockwise (CC) when looking along Quaternion*forward. - **radius** (float) - Required - The radius of the perimeter on which the vector is drawn. - **color** (Color) - Optional - The color of the vector. - **lineWidth** (float) - Optional - The width of the line. - **text** (string) - Optional - Text to display along the vector. - **coneLength** (float) - Optional - Length of the cone at the vector's tip. - **pointerAtBothSides** (bool) - Optional - Whether to display pointers at both ends of the vector. - **skipFallbackDisplayOfZeroAngles** (bool) - Optional - Whether to skip fallback display for zero angles. - **flattenThickRoundLineIntoCirclePlane** (bool) - Optional - Whether to flatten thick round lines into the circle plane. - **minAngleDeg_withoutTextLineBreak** (float) - Optional - Minimum angle in degrees for text line break. - **textAnchor** (TextAnchorCircledDXXL) - Optional - Anchor point for the text. - **durationInSec** (float) - Optional - Duration for which the vector is displayed in seconds. - **hiddenByNearerObjects** (bool) - Optional - Whether the vector is hidden by nearer objects. ### Request Example ```json { "circleCenterPos": {"x": 0, "y": 0, "z": 0}, "orientation": {"x": 0, "y": 0, "z": 0, "w": 1}, "turnAngleDegCC_startingFromUp": 90, "radius": 5, "color": {"r": 1, "g": 0, "b": 0, "a": 1}, "lineWidth": 2, "text": "Example Vector", "coneLength": 0.5, "pointerAtBothSides": true, "skipFallbackDisplayOfZeroAngles": false, "flattenThickRoundLineIntoCirclePlane": false, "minAngleDeg_withoutTextLineBreak": 10, "textAnchor": "Start", "durationInSec": 5, "hiddenByNearerObjects": false } ``` ### Response #### Success Response (200) - **status** (string) - Indicates success or failure of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Draw List of Integers (Screenspace, 3D Position) Source: https://www.symphonygames.net/drawxxldocumentation/subSites/apiFunctions_autoGenerated/DrawText_WriteListScreenspace Writes a list of integer values to the screen, projecting a 3D world position onto the screen. Includes options for titles, text size, and display duration. ```APIDOC ## POST /websites/symphonygames_net_drawxxldocumentation/DrawText/WriteListScreenspace ### Description Writes a list of integer values to the screen by projecting a 3D world position onto the screen plane. This method is suitable for displaying data tied to objects in 3D space. ### Method POST ### Endpoint /websites/symphonygames_net_drawxxldocumentation/DrawText/WriteListScreenspace ### Parameters #### Request Body - **intList** (List) - Required - The list of integer values to display. - **position_in3DWorldspace** (Vector3) - Required - The 3D world position that will be projected onto the screen. - **color** (Color) - Required - The color of the text. - **title** (string) - Optional - A title to display above the list. - **textSize_relToViewportHeight** (float) - Optional - Defines the text size relative to viewport height. Ignored if `forceHeightOfWholeTableBox_relToViewportHeight` is used. - **forceHeightOfWholeTableBox_relToViewportHeight** (float) - Optional - Forces the height of the entire table box. Default is 0. - **position_isTopLeft_notLowLeft** (bool) - Optional - If true, the projected position specifies the top-left corner; otherwise, the lower-left. Default is false. - **durationInSec** (float) - Optional - The duration in seconds for which the text remains visible. Default is 0. ### Request Example ```json { "intList": [10, 25, 50], "position_in3DWorldspace": {"x": 10.0, "y": 5.0, "z": 20.0}, "color": {"r": 1.0, "g": 0.5, "b": 0.0, "a": 1.0}, "title": "Score", "textSize_relToViewportHeight": 0.03, "durationInSec": 10.0 } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ```