Class: RotationComponent
Defined in: common/components/rotation-component.ts:7
Component to represent the rotation of an entity in 2D space.
Implements
Constructors
Constructor
new RotationComponent(
radians):RotationComponent
Defined in: common/components/rotation-component.ts:25
Creates an instance of RotationComponent.
Parameters
radians
number = 0
The rotation angle in radians.
Returns
RotationComponent
Properties
local
local:
number
Defined in: common/components/rotation-component.ts:13
The local rotation angle in radians.
name
name:
symbol
Defined in: common/components/rotation-component.ts:8
The unique name of the component.
Implementation of
world
world:
number
Defined in: common/components/rotation-component.ts:17
The world rotation angle in radians.
symbol
readonlystaticsymbol: typeofsymbol
Defined in: common/components/rotation-component.ts:19
Methods
fromDegrees()
staticfromDegrees(degrees):RotationComponent
Defined in: common/components/rotation-component.ts:36
Creates a RotationComponent from an angle in degrees.
Parameters
degrees
number
The rotation angle in degrees.
Returns
RotationComponent
A new instance of RotationComponent.