Label
Parameters
Instance of LabelCollection
See also
Types
Initialization options for the Label constructor
Properties
Gets or sets the background color of this label.
Gets or sets the background padding, in pixels, of this label. The x
value controls horizontal padding, and the y
value controls vertical padding.
Gets or sets the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain. When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
Gets or sets the condition specifying at what distance from the camera that this label will be displayed.
Gets and sets the 3D Cartesian offset applied to this label in eye coordinates. Eye coordinates is a left-handed coordinate system, where x
points towards the viewer's right, y
points up, and z
points into the screen. Eye coordinates use the same scale as world and model coordinates, which is typically meters.
Gets or sets the height reference of this billboard.
Gets or sets the horizontal origin of this label, which determines if the label is drawn to the left, center, or right of its anchor position.
Gets or sets the outline color of this label.
Gets or sets the outline width of this label.
Gets or sets the pixel offset in screen space from the origin of this label. This is commonly used to align multiple labels and billboards at the same position, e.g., an image and text. The screen space origin is the top, left corner of the canvas; x
increases from left to right, and y
increases from top to bottom.
Gets or sets near and far pixel offset scaling properties of a Label based on the Label's distance from the camera. A label's pixel offset will be scaled between the NearFarScalar.nearValue and NearFarScalar.farValue while the camera distance falls within the lower and upper bounds of the specified NearFarScalar.near and NearFarScalar.far. Outside of these ranges the label's pixel offset scaling remains clamped to the nearest bound. If undefined, pixelOffsetScaleByDistance will be disabled.
Gets or sets the Cartesian position of this label.
Gets or sets near and far scaling properties of a Label based on the label's distance from the camera. A label's scale will interpolate between the NearFarScalar.nearValue and NearFarScalar.farValue while the camera distance falls within the lower and upper bounds of the specified NearFarScalar.near and NearFarScalar.far. Outside of these ranges the label's scale remains clamped to the nearest bound. If undefined, scaleByDistance will be disabled.
Determines if a background behind this label will be shown.
Gets or sets the style of this label.
Gets the total scale of the label, which is the label's scale multiplied by the computed relative size of the desired font compared to the generated glyph size.
Gets or sets near and far translucency properties of a Label based on the Label's distance from the camera. A label's translucency will interpolate between the NearFarScalar.nearValue and NearFarScalar.farValue while the camera distance falls within the lower and upper bounds of the specified NearFarScalar.near and NearFarScalar.far. Outside of these ranges the label's translucency remains clamped to the nearest bound. If undefined, translucencyByDistance will be disabled.
Gets or sets the vertical origin of this label, which determines if the label is to the above, below, or at the center of its anchor position.
Functions
Computes the screen-space position of the label's origin, taking into account eye and pixel offsets. The screen space origin is the top, left corner of the canvas; x
increases from left to right, and y
increases from top to bottom.
Returns true if this object was destroyed; otherwise, false.