Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit15ce14a4c1

README.md

Scene record projection

Require @builtin::assetTypes.scene.shared.records.

saved(record, componentGuid) converts a persisted entity into {value, bookkeeping}. captured(record, ids, componentGuid) converts an entity-record capture and remaps captured entity references to persistent placement ids. The resolver receives a component type spelling and returns its stable identity; unresolved types must raise an error. Captured entities require an entry in ids.

value holds editable fields with normalized transform and lifecycle defaults. Components are grouped by stable type identity: named[name] addresses one named instance, while anonymous preserves an ordered group. Saved instance_index markers are reconstruction metadata, and restoration emits them alongside named instance_name markers. FieldEdits treats that anonymous array atomically. Asset references compare by guid and type. Component references retain their entity, instance information and stable component type.

bookkeeping holds build ownership attributes, component order, and captured reference paths and row-field declarations. These capture annotations describe reconstruction and stay outside field comparisons. Compose edits over value, then call restore({value=composed, bookkeeping=current.bookkeeping}, componentName) to produce the saved record. The reverse resolver supplies the current component type spelling. Surviving instances retain their order; added instances are appended in deterministic order.

The module validates structured input before copying it. Duplicate named instances and missing identities fail before any scene mutation.