new Spatial()
Basic component giving an entity the concept of being located somewhere.
Creates basic spatial heirachy, positions, rotation, etc.
- Source:
Methods
-
absHwidth() → {Vec2}
-
The absolute world hwidth for this component.
- Source:
Returns:
- Type
- Vec2
-
absPosition() → {Vec2}
-
The absolute world position of this component.
- Source:
Returns:
- Type
- Vec2
-
absRotation() → {Number}
-
The absolute world rotation of this component.
- Source:
Returns:
- Type
- Number
-
absScale() → {Vec2}
-
The absolute world scale of this component.
- Source:
Returns:
- Type
- Vec2
-
attachTo(entity)
-
Attach this component to another entity's Spatial.
Parameters:
Name Type Description entity
Object An entity with a Spatial component - Source: