Class: RotationComponent
Defined in: common/components/rotation-component.ts:7
Component to represent the rotation of an entity in 2D space.
Extends
Constructors
Constructor
new RotationComponent(
radians):RotationComponent
Defined in: common/components/rotation-component.ts:21
Creates an instance of RotationComponent.
Parameters
radians
number = 0
The rotation angle in radians.
Returns
RotationComponent
Overrides
Properties
local
local:
number
Defined in: common/components/rotation-component.ts:11
The local rotation angle in radians.
world
world:
number
Defined in: common/components/rotation-component.ts:15
The world rotation angle in radians.
Accessors
id
Get Signature
get
staticid():symbol
Defined in: ecs/types/Component.ts:12
The unique id of the component.
Returns
symbol
Inherited from
Methods
fromDegrees()
staticfromDegrees(degrees):RotationComponent
Defined in: common/components/rotation-component.ts:33
Creates a RotationComponent from an angle in degrees.
Parameters
degrees
number
The rotation angle in degrees.
Returns
RotationComponent
A new instance of RotationComponent.