Group Transforms
Nested Groups compose transforms: outer rotates, inner scales, meshes inherit both.
import * as EASEL from "easel";
// Outer group rotates; inner group scales.
// Meshes inside innerGroup inherit BOTH transforms automatically.
const outerGroup = new EASEL.Group();
scene.add(outerGroup);
const innerGroup = new EASEL.Group();
outerGroup.add(innerGroup); // child of outer
const mesh = new EASEL.Mesh(geometry, material);
mesh.position.set(2, 0, 0);
innerGroup.add(mesh); // child of inner → grandchild of outer
// Per frame:
outerGroup.rotation.y += 0.6 * dt;
const s = 0.8 + 0.4 * Math.abs(Math.sin(elapsed * 1.2));
innerGroup.scale.set(s, s, s);
// mesh world transform = outer(rotation) * inner(scale) * mesh(position)