/** * Hierarchy forward-list of child entities. * * `entities` is a variable-length `array` field; each element is * an `Entity` u32 the ECS relationship owner materialized. The value returned * by `world.get(parent, Children).unwrap().entities` is a detached read-only * `Uint32Array` snapshot rematerialised fresh on every read (D-4 no-cache); * mutating the returned array cannot change ECS-owned storage, and the * snapshot's `length` equals the live element count. Internal Scene/ECS paths * use the package-internal zero-copy array seams instead of this snapshot. * * Invariants: * - `propagateTransforms` consumes Children from the ECS-owned materialized * buffer and expands each root parent-first. The forward list is also * available for AI-user traversal / debug / inspection. * - Children <-> ChildOf consistency is maintained by the engine via the * ChildOf `relationship` mirror hook (see ./child-of.ts): adding / * removing / reparenting ChildOf on a child auto-updates the parent's * `entities` list. AI users do not hand-sync the two sides for the * hierarchy. * - ChildOf's linked lifecycle keeps ordinary Children entries aligned: a * child despawn prunes its source slot and a parent despawn cascades. A * deliberately malformed/non-linked edge remains observable as a dead * handle and must be diagnosed through the structured error channel. * * @example Spawn a parent and two children via ChildOf (engine maintains Children): * const parent = world.spawn({ component: Transform, data: identityXf() }).unwrap(); * const a = world.spawn( * { component: Transform, data: identityXf() }, * { component: ChildOf, data: { parent } }, * ).unwrap(); * const b = world.spawn( * { component: Transform, data: identityXf() }, * { component: ChildOf, data: { parent } }, * ).unwrap(); * // Read back via the read-only snapshot - engine appended a, b: * const snap = world.get(parent, Children).unwrap().entities; * for (let i = 0; i < snap.length; i++) { * const child = snap[i]; * // ... consume; probe the handle before using it when reading a * // deliberately malformed/non-linked relationship. * } */ export declare const ChildOf: import("@forgeax/engine-ecs").Component<"ChildOf", { parent: "entity"; }>, Children: import("@forgeax/engine-ecs").RelationshipTargetComponent"; }>>; //# sourceMappingURL=children.d.ts.map