Creates a new Transform component.
Initial configuration for position, rotation, and scale.
OptionalactorLocal-space transform values (position, rotation, scale). These values are relative to the parent transform.
Matrix representing the local-space transformation.
World-space transform values derived from the local transform and the parent hierarchy.
Matrix representing the world-space transformation.
StaticcomponentInverse of the world transformation matrix. Useful for converting world-space coordinates to local space.
Returns the parent Transform component, if one exists.
The parent Transform or undefined if this transform has no parent.
Marks this transform and all descendant transforms as dirty.
This signals that their matrices must be recalculated before use.
Recomputes the local transformation matrix from local position, rotation, and scale.
Recomputes the world transformation matrix if the transform is dirty.
This method ensures parent transforms are updated first and then composes the local matrix with the parent world matrix.
Component responsible for handling local and world-space transforms.
A Transform manages position, rotation, and scale, and computes corresponding transformation matrices. It supports hierarchical parent-child relationships via world matrix composition.
Example