Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit61a33237e0

README.md

entity_records

Walks a live entity hierarchy into the flat record array the engine's entity templates use — { name, original_id, parent_id, position, rotation, scale, hidden, components } per entity, root first, parents before children.

bundle composes its entity_template through this module; scene builds compose their baked output through it. One record shape, one implementation.

compose(rootId) walks one hierarchy. composeMany(rootIds) walks several, which is what a build needs — a builder may leave more than one unparented root. Temporary descendants are pruned; an explicitly-named temporary root is kept. compose(rootId, nil, nil, true) keeps the temporary descendants too, so the records hold every entity under the root.