TTransform
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
translation: undefined | vec3 = undefined
rotation: undefined | quat = undefined
scale: undefined | vec3 = undefined
Returns default
Properties
publicrotation
publicscale
publictranslation
Methods
publicadd
publicgetMatrix
Gets matrix and applies scale
Returns mat4
publiclookAt
Adjusts the rotation so it is looking towards a given position.
This method calculates the direction from the current position to the target position, then calculates the right and up vectors based on this direction. Finally, it creates a rotation quaternion from these vectors and sets the rotation to this quaternion.
Parameters
target: vec3
The target position as a vec3
Returns void
publicrotateX
Rotate about the X axis
Parameters
angle: number
(in radians)
Returns void
publicrotateY
Rotate about the Y axis
Parameters
angle: number
(in radians)
Returns void
publicrotateZ
Rotate about the Z axis
Parameters
angle: number
(in radians)
Returns void
A transform describes an option in 3D space