@huukhanhnguyen/model / schema/nodesRegistry
schema/nodesRegistry
Fn
Fn = (...
args) =>unknown
Parameters
args
...unknown[]
Returns
unknown
NodeArgEntry
NodeArgEntry = {
default?:string;description?:string;formula?:true;key:string;label?:string;max?:string;min?:string;options?:string[];step?:string;tooltip?:string;type:string; }
THE authored arg definition — one arg of a vocabulary/catalog method entry, with its display metadata as TYPED fields. This is the single shape the lane vocabularies (vocabulary/laneMethods.ts, vocabulary/cameras.ts) and the hand-written catalog entries (nodesRegistry/catalog.ts barrel) declare args with. Deliberately NOT the runtime contract: the registry's ArgDef (schema/registry.ts) carries display metadata in an opaque attributes bag instead — wiring.toArgDef packs label/tooltip/options/description into it, so the two layers can never drift.
default?
optionaldefault?:string
description?
optionaldescription?:string
formula?
optionalformula?:true
Texture lane only: the text compiles PER PIXEL as (u, v, t, k).
key
key:
string
label?
optionallabel?:string
max?
optionalmax?:string
min?
optionalmin?:string
options?
optionaloptions?:string[]
step?
optionalstep?:string
tooltip?
optionaltooltip?:string
type
type:
string
A TYPE_REGISTRY name (list suffix allowed, e.g. "string[]"). A union form (color | vector) reads "either shape is accepted".
NodeRegistryEntry
NodeRegistryEntry = {
args?:NodeArgEntry[];defaultKey?:string;icon?:string;label?:string;method?:string;namespace?:string;nodeType:"parameter"|"generator"|"modifier"|"objectProducer"|"document"|"camera"|"layer"|"material"|"pattern"|"style"|"textStyle"|"annotationStyle"|"view"|"animation"|"table"|"texture"|"instanceProperty";return:string;role?:"transform"|"prop";shape?:"map"|"multiply"|"reduce"|"structural";tooltip?:string; }
args?
optionalargs?:NodeArgEntry[]
defaultKey?
optionaldefaultKey?:string
Friendly short identifier base for auto-generated node keys ("arc" for every arc generator, "array" for every array*) — the key a new node gets is defaultKey + a model-wide-unique increment. The full human name stays in label.
icon?
optionalicon?:string
Icon lookup key (packages/ui's NodeIcons.ts svg tables) when it differs from method — e.g. a renamed method reusing an old icon. Absent = UI falls back to method itself as the key.
label?
optionallabel?:string
method?
optionalmethod?:string
namespace?
optionalnamespace?:string
nodeType
nodeType:
"parameter"|"generator"|"modifier"|"objectProducer"|"document"|"camera"|"layer"|"material"|"pattern"|"style"|"textStyle"|"annotationStyle"|"view"|"animation"|"table"|"texture"|"instanceProperty"
return
return:
string
Declared return type of this entry. Required: every catalog row states what it yields. A PRODUCER's return is the type of what it CREATES (its own tail), not the stream after it — see registry/contract.ts. Wiring does not invent objectData[] for a missing declaration.
role?
optionalrole?:"transform"|"prop"
shape?
optionalshape?:"map"|"multiply"|"reduce"|"structural"
tooltip?
optionaltooltip?:string