Internal: Component constructor
type of the component. Ex. "TransformComponent"
Owning entity. Entity only passed when wrapping existing entity.
Single color value to apply to all text strings.
(Contents: vec4[]) Colors for individual strings in text. If colors contains the same number of elements as texts, each text string is rendered using the corresponding color. If not, the field color is used.
Horizontal justification of the text.
Internal flag set if component is a Cogs Core component.
(Contents: vec3[]) Offset positions for each of the strings in texts. If positions is empty, all texts will be rendered at the position given by TransformComponent. If positions contains the same number of elements as texts, each text string is rendered using the corresponding position offset.
A set of text strings to render. The text is positioned on the screen according to the position given by the TransformComponent and the positioningMode field. All the texts are rendered using the same font, positioning mode, alignment and justification. However, color and position can vary according to the positions and color arrays.
Vertical alignment of the text.
Gets the optional owning entity
Component name == type. For compatibility
Gets the type of the component. Ex. "TransformComponent", "SceneComponent" etc.
Static
createInternal: Creates a new component of the given type (name). Component is wrapped when adding to an entity.
Type of the component. Ex. "TransformComponent"
Created Cogs.js component.
Static
wrap
Renders the given text(s) by generating sprites.