ParaShape

ParameterNode

Runtime node for a VALUE operation in the model's parameters header (registry return: "value"). Two shapes share this class: a scalar value (method = "length"/"number"/"text"/etc., with numeric constraint fields min/max/step) and a loader (method = "loadModel"/"loadFont"/ "loadImage", input is a raw URI/model-id string, never an expression). createMaterial/createLayer resource declarations are handled by the separate AssetNode class; header GROUPING is the container form (ContainerNode, lane "parameters"), not this class.

Source: packages/parametric/src/nodes/ParameterNode.ts

Properties

NameTypeDescription
optionsNodeCollection<OptionNode>Select options for enum-style parameters; empty for unconstrained scalar inputs.
inputExpressionNode | stringExpression node holding the parameter's default value; a raw string instead for a group (internal valueType "object") or a loader method (loadModel/loadFont/loadImage — the string IS the URI/model-id value, never an expression).
labelExpressionNodeExpression node whose value becomes the parameter's display label.
keystringIdentifier used to reference this parameter in expressions (e.g. width).
methodstringPersisted registry method (e.g. "arrayLength") — distinct from _valueType when the method has a PARAM_METHOD_VALUE_TYPE alias; equal to it otherwise.
minExpressionNode | nullOptional lower bound expression for numeric parameters.
maxExpressionNode | nullOptional upper bound expression for numeric parameters.
stepExpressionNode | nullOptional step increment expression for numeric parameters.
argsArgumentNode[]Dynamically-added args (see registry DynamicArgDef) — e.g. loadModel's replace* overrides. Empty for a method with no dynamicArg template; distinct from the single primary input value every parameter has.

Methods

SignatureDescription
getInput(listener?: (...args: unknown[]) => void): stringGet the raw input string (expression or plain string) with optional change listener
setInput(value: string): voidSet the raw input string; marks this node and its transitive dependents dirty
addDynamicArg(expr?: string): ArgumentNodeAdd one dynamic arg (auto-keyed from the method's dynamicArg.baseKey) and return it.
removeDynamicArg(node: ArgumentNode): voidRemove a previously-added dynamic arg.