TransformSyncSystem
Applies TransformComponent position, rotation, and scale values to the linked THREE.js Object3D every frame.
Overview
TransformSyncSystem runs every frame (just before RenderSystem) and is responsible for:
- Querying all entities that have both a
TransformComponentand anObject3DRef. - Calling
object.position.set(...),object.rotation.set(...), andobject.scale.set(...)from the component values. - Calling
object.updateMatrixWorld(true)after applying the transform to propagate changes to child objects.
Queried components
| Component | Access |
|---|---|
TransformComponent | Read (position, rotation, scale) |
Object3DRef | Read (the live THREE.js object) |
Behavior notes
- Every frame — transforms are applied unconditionally every frame. Scripts and inspector edits can mutate
TransformComponentat any point and the result will be visible on the next render. - World matrix propagation —
updateMatrixWorld(true)is called withforce = trueso that child objects in the hierarchy receive updated world matrices even if the parent did not mark itself dirty. - Ordering —
TransformSyncSystemruns after all custom systems and beforeRenderSystem. This guarantees that script-driven position changes (fromonUpdate) are reflected in the same frame they are written.
API reference
- Class:
TransformComponent - Source:
core/systems/TransformSyncSystem.ts

