@huukhanhnguyen/model / lanes/objects/nodes
lanes/objects/nodes
evaluateObject()
evaluateObject(
model,key):SceneObject
Resolve ONE objects[] entry into its local content + lifted instance placement (nodes/ObjectNode.ts). Per-key and dirty-gated: pulling one object never evaluates a sibling, which is what lets a host mount objects one at a time and move one by writing a matrix.
Parameters
model
key
string
Returns
flushObjectChannels()
flushObjectChannels(
model):void
Announce the objects whose output actually moved. Called from the root collection's own edit signals, so a host that never subscribes pays nothing (the loop is over SUBSCRIBED keys) and a dirty-but-unchanged object stays silent (the documentKey cutoff at the object boundary).
Parameters
model
Returns
void
objectKeys()
objectKeys(
model):string[]
Keys of the objects[] entries, in declaration order — the model's per-object grain, and EMPTY when it has none.
A loose DataNode at the root (an invalid doc, or a host that added a bare step) turns the whole root back into ONE sequential fold: its containers no longer fold from an empty stream on their own, so no entry is an addressable object and a consumer must take the whole-frame path (collectRenderFrame) instead.
Parameters
model
Returns
string[]
objectNodeOf()
objectNodeOf(
model,key):ObjectNode
Parameters
model
key
string
Returns
objectSignatureOf()
objectSignatureOf(
model,key):ObjectSignature
Parameters
model
key
string
Returns
sceneObjects()
sceneObjects(
model):SceneObject[]
The scene as typed objects — one per objects[] entry, declaration order. An object that produced no content is omitted (same as an empty render slice). A chain produces exactly ONE kind; an unrecognized *Data shape throws, and block comes only from an authored block, never from an automatic wrap.
Parameters
model
Returns
subscribeObject()
subscribeObject(
model,key,listener): () =>void
Subscribe to one object's changes. The callback fires with the channel that actually moved — "content" (the local geometry), "transform" (only the lifted matrix), "props" (only the lifted material/layer/ name) — and is SKIPPED entirely when a re-resolve produces the same object (an edit that changes no output emits nothing).
The engine holds the callback and nothing else: no renderer type ever crosses this boundary.
Parameters
model
key
string
listener
Returns
() => void