Skip to main content

Transforms

node.transform(kind, params) moves a body or an assembly. It changes the node’s placement, not its shape. Translate, rotate and scale add to the current placement. Place sets it.
getPlacement() returns { origin, xDirection, normal, scale } relative to the parent. getWorldPlacement() returns it in the world. Do not set position, rotation or scale on a body. The kernel puts the placement back and sends a PlacementOverwritten warning. A negative scale throws InvalidTransform. Use mirror.

Assemblies

A SystemAssembly groups nodes. Its children follow its placement.
  • Pass parent in the options, or call addChild(children, { keepWorld? }).
  • removeChild(child, { keepWorld? }) takes a node out. With keepWorld: true the node keeps its world position; otherwise it keeps its local placement.
  • getChildren() returns the children’s ogId values. getParent() returns the parent’s ogId, or null.
  • Bodies have the same tree methods, so a body can be the parent of another body.
  • A SystemAssembly is not a Three.js object. Add its bodies to the scene yourself.
  • assembly.dispose() disposes the assembly.

Copies and instances

An instance has its own placement and shares the shape. An edit of a shared shape needs { instances: 'all' }, or makeUnique() on the body that should change alone.
Last modified on November 10, 2026