AssetNode
Runtime class backing a value node whose method is createMaterial or createLayer — the built-in resource declarations that register a named material/layer in the Store and produce no scene entities. It serializes as an ordinary operation-form node in parameters[] ({ key: "material" | "layer", method, args } — see toJSON()).
Source: packages/parametric/src/nodes/AssetNode.ts
Properties
| Name | Type | Description |
|---|---|---|
method | string | null | Resource kind registered by this node — "createMaterial" or "createLayer". |
args | ArgumentNode[] | Argument nodes that configure the resource (e.g. color, name). |
label | ArgumentNode | null | Optional label argument used as the resource's display name. |
assetValue | unknown[] | The evaluated resource array produced by the last evaluate() call. |
definition | ValueDefinition | null | Registry definition backing this resource declaration (compute + args meta). |
Methods
| Signature | Description |
|---|---|
setMethod(definition: ValueDefinition, argsMap: Record<string, string>): void | Bind this node to a registry definition and wire up its argument nodes from the given expressions. |
evaluate(): unknown | Evaluate the resource compute and cache the result in assetValue. Same Level-2 shape as BaseNode.evaluate() (pending/epoch/cascade on an async settle) — this is a bespoke override, not inherited, because the cached field is assetValue, not value. |