Capítulo 844 de 859
Three.js's core structure is a scene graph — a hierarchy where each node's transform is relative to its parent's "local space" — illustrated with a sun/earth/moon system where nesting Object3D pivots does the orbital math for you.
Object3D pivots: an Object3D has no geometry/material but is a real scene-graph node — used purely to represent a local space (e.g. solarSystem, earthOrbit, moonOrbit) so meshes can be parented to a pivot instead of inheriting an unwanted parent's scale.moonOrbit inside earthOrbit inside solarSystem reproduces the moon's complex spirograph-like path around the sun without computing it manually — the graph does the composition.AxesHelper / GridHelper: visualize a node's local axes / a reference grid; commonly combined with depthTest: false and a renderOrder so they draw on top of geometry that would otherwise occlude them.const solarSystem = new THREE.Object3D();
scene.add(solarSystem);
const earthOrbit = new THREE.Object3D();
earthOrbit.position.x = 10;
solarSystem.add(earthOrbit);
const earthMesh = new THREE.Mesh(sphereGeometry, earthMaterial);
earthOrbit.add(earthMesh);
const moonOrbit = new THREE.Object3D();
moonOrbit.position.x = 2;
earthOrbit.add(moonOrbit);
const moonMesh = new THREE.Mesh(sphereGeometry, moonMaterial);
moonMesh.scale.set(0.5, 0.5, 0.5);
moonOrbit.add(moonMesh);
Object3D pivots (solarSystem → earthOrbit → moonOrbit) so rotating each pivot independently produces correct orbital motion without manual trigonometry.Object3D pivot between them instead.AxesHelper/GridHelper with depthTest/renderOrder adjustments make an otherwise-invisible scene graph structure visible for debugging.