Model - Nodes
API reference for src/schema/nodes, src/lanes/views/nodes on @huukhanhnguyen/model, reachable from ..
See the Guide for the ModelJSON / evaluate pipeline.
API reference
Signatures are generated from the live package .d.ts - not hand-written.
ArgumentNodeJSON
type
type ArgumentNodeJSON
// = ExpressionNodeJSON & { argName: string; }ChildNode
type
type ChildNode
// = EntitiesNodeHost | ContainerNodeHost | ParameterNodeHost | ExpressionNodeHost | BaseNodeHostDirtyTarget
type
type DirtyTarget
// = {
isDirty?: boolean;
_epoch?: number;
_dependents?: Iterable<DirtyTarget>;
parent?: DirtyTarget;
_hooks?: NodeHooks;
}ExpressionNodeJSON
type
type ExpressionNodeJSON
// = BaseObjectJSON & { expression: string; }foldView
function
Fold a view chain (literal/default eval) into its definition.
foldView(view: View, options?: FoldViewOptions): SavedViewKeyedNode
type
The shared surface both node kinds carry (see EntitiesNode/ContainerNode). label is ALWAYS a live ArgumentNode (never null) — same "always constructed, default expression ''" contract ParameterNode.label uses — so the UI can always bind an editable field to it; hasLabelOf is the content-based check for "was this actually authored".
type KeyedNode
// = BaseNodeHost & { key: string; label: ArgumentNodeHost; enabled: ArgumentNodeHost | null; }KeyedNodeEntry
type
One key reachable from an expression context, with the resolution strategy ExpressionNode._buildContext historically applied at that position: a top-level node always unwraps single-cardinality (resolveNodeValue); a nested operation resolves to its raw baked step output (referenceValue) when available, else falls back the same way. See NodeCollection.keyedNodes.
type KeyedNodeEntry
// = {
key: string;
node: BaseNodeHost;
useReferenceValue: boolean;
}ObjectChannel
type
Which half of an object moved — a renderer re-tessellates for "content", writes one matrix for "transform", repaints for "props".
type ObjectChannel
// = "content" | "transform" | "props"ObjectChannelListener
type
type ObjectChannelListener
// = (key: string, channel: ObjectChannel) => voidObjectInstance
type
The lifted placement of one scene object — what its whole content sits under, compiled from the object chain's TAIL instead of baked into geometry.
transformation is the product of the trailing move/rotate steps (null when the tail has none). The props are PLACEMENT DEFAULTS: the consumer applies each to a content entity that carries none of its own — an entity stamped inside the body always wins.
type ObjectInstance
// = {
transformation: Transformation | null;
material?: string;
layer?: string;
name?: string;
}ObjectSignature
type
The three comparable halves of a resolved object — Model diffs these to pick a channel, and skips the emit entirely when all three match.
type ObjectSignature
// = {
content: string;
transform: string;
props: string;
}ObjectValue
type
One objects[] entry resolved into LOCAL content + its instance placement.
content is the object's fold up to (not including) the tail — so editing only the tail leaves it IDENTICAL (same array identity, same content keys), which is what lets a renderer move an object by writing one matrix instead of re-tessellating it. A consumer that needs world space applies instance.transformation itself (bakeBlock for whole-object consumption).
type ObjectValue
// = {
content: Entity[];
instance: ObjectInstance;
}OptionNodeJSON
type
type OptionNodeJSON
// = {
label: string;
input: string;
}ParameterNodeJSON
type
type ParameterNodeJSON
// = BaseObjectJSON & { method: string; key: string; /** Args as array — value + constraints merged into each arg object. */ args?: Argument[]; label?: string; /** Declared-flat marker — INERT on a value node (2D enforcement applies * to entity operations only); carried so the flag round-trips verbatim. */ flat?: boolean; /** This parameter's use of a track (see Operation.animation's doc * comment in modelDocument.ts). */ animation?: AnimationBinding; }