ParaShape

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

NameTypeDescription
methodstring | nullResource kind registered by this node — "createMaterial" or "createLayer".
argsArgumentNode[]Argument nodes that configure the resource (e.g. color, name).
labelArgumentNode | nullOptional label argument used as the resource's display name.
assetValueunknown[]The evaluated resource array produced by the last evaluate() call.
definitionValueDefinition | nullRegistry definition backing this resource declaration (compute + args meta).

Methods

SignatureDescription
setMethod(definition: ValueDefinition, argsMap: Record<string, string>): voidBind this node to a registry definition and wire up its argument nodes from the given expressions.
evaluate(): unknownEvaluate 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.