AnnotationShape
- Last UpdatedFeb 19, 2025
- 3 minute read
The AnnotationShape node defines a curve-based shape that inherits from AnnotationBase and can be moved and stretched. The shape aspect can be changed at any time by using the curves field. By default, the node is created with a cloud-like shape.

Platform support
This element is fully supported on XR-Windows, XR-Portable Windows, XR-Portable iOS, XR-Portable Android, and XR-P WASM platforms.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
Full support |
Full support |
Full support |
Full support |
|
|
|
|
|
|
Drawing shapes using curves
AnnotationShape uses a list of cardinal splines to define the shape. This is performed through the curves field, which is an mdstring.
For each curve, the required data is as follows:
-
A name that should be unique to help identify the curve.
-
A set of 2D points in the uv space (0 0) to (1 1). The curve will pass through all these points. Please observe uv space has (0 0) at left top corner.
-
A tension that determines the smoothness of the curve. A value of 0 corresponds to a segmented line. In general, values between 0 and 1 are fine; however, it's possible to use any value.
Example
This is an example of a cross that is realized by using two curves.
{curveA={tension=0.5}{points=0.1 0.9,0.4 0.4,0.9 0.1}}{curveB={tension=0.5}{points=0.1 0.1,0.6 0.4,0.9 0.9}}

In this example about the same shape, changes appear by modifying the tension of the curves.

Handles position and behavior
The AnnotationCircle has four handles, positioned at the four corners. Each handle can grow or shrink the shape in the corner direction.

AnnotationShape fields
AnnotationShape has only one type-specific field.
Field inheritance: NodeBase > RectBase2D > AnnotationBase > AnnotationShape
|
Fields |
Type |
Use |
Default |
Description |
|---|---|---|---|---|
|
curves |
mdstring |
optional |
{curve0={tension=0.5}{points=0.203494 0.244959,0.029665 0.375492,0.021708 0.553956,0.120762 0.701116,0.267969 0.737737}}... |
Definition of the cardinal spline curves that are used to draw the shape. For each curve, tension and points are required. |