Scene Graph
The scene maintains a hierarchical graph of all objects:
// Create a parent node
const parentNode = new BABYLON.TransformNode("parent", scene);
// Create child meshes
const sphere = BABYLON.MeshBuilder.CreateSphere("sphere", {}, scene);
sphere.parent = parentNode;
const box = BABYLON.MeshBuilder.CreateBox("box", {}, scene);
box.parent = parentNode;
// Transforming the parent affects all children
parentNode.position.y = 2;
parentNode.rotation.y = Math.PI / 4;