Constructor
new TextAttributes(attributes)
Constructs a text attributes bundle.
Parameters:
Name | Type | Description |
---|---|---|
attributes |
TextAttributes | Attributes to initialize this attributes instance to. May be null, in which case the new instance contains default attributes. |
- Source:
Members
color :Color
The text color.
Type:
- Default Value:
- White (1, 1, 1, 1)
- Source:
depthTest :Boolean
Indicates whether the text should be depth-tested against other objects in the scene. If true,
the text may be occluded by terrain and other objects in certain viewing situations. If false,
the text will not be occluded by terrain and other objects.
Type:
- Boolean
- Default Value:
- false
- Source:
font :Font
The text size, face and other characteristics, as described in Font.
Type:
- Default Value:
- Those of Font, but with a font size of 14.
- Source:
offset :Offset
Indicates the location of the text relative to its specified position.
May be null, in which case the text's bottom-left corner is placed at the specified position.
Type:
- Default Value:
- 0.5, 0.0, both fractional (Places the text's horizontal center and vertical bottom at the specified position.)
- Source:
scale :Number
Indicates the amount to scale the text. A value of 0 makes the text disappear.
Type:
- Number
- Default Value:
- 1.0
- Source:
(readonly) stateKey :String
A string identifying the state of this attributes object. The string encodes the current values of all
this object's properties. It's typically used to validate cached representations of shapes associated
with this attributes object.
Type:
- String
- Source:
(protected) stateKeyInvalid :boolean
Indicates whether this object's state key is invalid. Subclasses must set this value to true when their
attributes change. The state key will be automatically computed the next time it's requested. This flag
will be set to false when that occurs.
Type:
- boolean
- Source:
Methods
(protected) computeStateKey() → {String}
Computes the state key for this attributes object. Subclasses that define additional attributes must
override this method, call it from that method, and append the state of their attributes to its
return value.
- Source:
Returns:
The state key for this object.
- Type
- String