RotateComp
Defined in: packages/threeplay/src/plugins/transform/types.ts:40
Fields added by rotate(). Angles are in degrees.
Extends
Section titled “Extends”Methods
Section titled “Methods”add()?
Section titled “add()?”
optionaladd(this):void
Defined in: packages/threeplay/src/core/types.ts:63
Called when the object enters the scene (or when used on a live object).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”destroy()?
Section titled “destroy()?”
optionaldestroy(this):void
Defined in: packages/threeplay/src/core/types.ts:69
Called when the object is destroyed or the component removed.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”fixedUpdate()?
Section titled “fixedUpdate()?”
optionalfixedUpdate(this):void
Defined in: packages/threeplay/src/core/types.ts:67
Called at the fixed physics rate (50 Hz by default).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”forward()
Section titled “forward()”forward():
Vector3
Defined in: packages/threeplay/src/plugins/transform/types.ts:55
Unit vector the object faces (local -Z in world space).
Returns
Section titled “Returns”Vector3
inspect()?
Section titled “inspect()?”
optionalinspect(this):string|null|undefined
Defined in: packages/threeplay/src/core/types.ts:71
Short status line shown by the debug inspector.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”string | null | undefined
Inherited from
Section titled “Inherited from”lookAt()
Section titled “lookAt()”lookAt(
target):void
Defined in: packages/threeplay/src/plugins/transform/types.ts:53
Turns the object to face a point or object (Y-up).
Parameters
Section titled “Parameters”target
Section titled “target”Returns
Section titled “Returns”void
right()
Section titled “right()”right():
Vector3
Defined in: packages/threeplay/src/plugins/transform/types.ts:57
Unit vector to the object’s right (local +X in world space).
Returns
Section titled “Returns”Vector3
rotateBy()
Section titled “rotateBy()”rotateBy(
x,y?,z?):void
Defined in: packages/threeplay/src/plugins/transform/types.ts:51
Adds degrees to the rotation.
Parameters
Section titled “Parameters”number
number
number
Returns
Section titled “Returns”void
update()?
Section titled “update()?”
optionalupdate(this):void
Defined in: packages/threeplay/src/core/types.ts:65
Called once per frame.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”conflicts?
Section titled “conflicts?”
optionalconflicts?:string[]
Defined in: packages/threeplay/src/core/types.ts:61
Ids of components that can’t be on the same object (checked both ways).
Inherited from
Section titled “Inherited from”id:
"rotate"
Defined in: packages/threeplay/src/plugins/transform/types.ts:41
Unique name. Two components with the same id replace each other.
Overrides
Section titled “Overrides”require?
Section titled “require?”
optionalrequire?:string[]
Defined in: packages/threeplay/src/core/types.ts:59
Ids of components that must be present on the object.
Inherited from
Section titled “Inherited from”rot:
Vector3
Defined in: packages/threeplay/src/plugins/transform/types.ts:43
Euler rotation in degrees (X, Y, Z), applied to object3d every frame.
rotOrder
Section titled “rotOrder”rotOrder:
EulerOrder
Defined in: packages/threeplay/src/plugins/transform/types.ts:49
Order in which the rot angles apply (default "XYZ", three’s). Vehicles and
aircraft want "YXZ": heading (Y), then pitch (X), then roll (Z), so rolling never
changes the heading.