Skip to content
ParaShape

Parameters

ModelJson.parameters.

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Argument } from "./Argument.js";
import type { ParameterMethod } from "./ParameterMethod.js";

/**
 * One `parameters[]` entry — a named value binding. `key` is required: the
 * name every expression resolves it by.
 */
export type ParameterNode = { 
/**
 * identity — unique in the document's one key namespace, every lane.
 */
key: string, 
/**
 * intent — editor-chrome display text, printed verbatim; absent falls
 * back to `key`.
 */
label?: string, 
/**
 * intent — which of the 11 value methods this parameter binds.
 */
method: ParameterMethod, 
/**
 * intent — the method's arguments.
 */
args?: Array<Argument>, };
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
 * The 11 value methods a `parameters[]` entry may bind — a closed list,
 * unlike `StepNode.method` (open-ended, the catalog's `NODES` table closes
 * it instead). `function` was removed as a parameter method (ADR 0015: a
 * parameter is a VALUE, never a formula) and fails like any unknown
 * method; the `function` VALUE TYPE itself is unaffected (a callback arg,
 * e.g. `curveFunction.point`, still evaluates to one).
 */
export type ParameterMethod = "length" | "lengths" | "points" | "number" | "integer" | "angle" | "boolean" | "color" | "text" | "url" | "surface";
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
 * One value + its domain — the shape of every arg (a parameter's value, a
 * step arg, a properties arg). `min`/`max` are numeric-only; `options`, when
 * present, is the arg's whole domain.
 */
export type Argument = { 
/**
 * identity — the arg's name; meant unique among its owning node's
 * `args`, but nothing rejects a duplicate — `node_args::node_arg_input`/
 * `set_node_arg` read and write only the FIRST match, silently ignoring
 * any later one.
 */
key: string, 
/**
 * intent — an expression string, authored and underivable; may be
 * empty (an unselected file parameter authors nothing, so this arg's
 * min/max/options do not apply).
 */
input: string, 
/**
 * intent — expression → number, inclusive lower bound.
 */
min?: string, 
/**
 * intent — expression → number, inclusive upper bound.
 */
max?: string, 
/**
 * intent — expression → non-empty array, the arg's whole domain.
 */
options?: string, 
/**
 * intent — expression → `[{ time, value }]`, explicit key pairs on the
 * document's one timeline (USD `timeSamples`, Blender `keyframe_points`).
 * Legal ONLY on the `value` arg of a `length`/`number`/`angle`/`integer`
 * PARAMETER — the parameter is the clip; any other arg fails loud. The
 * host plays it (`engine_animation_set`); the engine never samples it.
 */
keyframes?: string, 
/**
 * intent — expression → boolean: whether the configurator shows this
 * parameter to the buyer (true = shown, absent = shown; a parameter
 * hidden this way still evaluates and still feeds every expression that
 * reads it). Legal ONLY on the `value` arg of a PARAMETER — any other
 * arg fails loud. It may read any parameter of the scope, so a
 * parameter can be conditional on another.
 */
visible?: string, };

Catalog methods

Every engine_catalog node whose context names "parameters".

11 catalog method(s) whose context names "parameters".

angle

Angle · binding · returns angle · context: parameters

Default key: angle.

A parameter value in degrees.

keytypedefaultminmaxoptionstooltip
valueangle0A parameter value in degrees.

boolean

Boolean · binding · returns boolean · context: parameters

Default key: boolean.

A true/false parameter value.

keytypedefaultminmaxoptionstooltip
valuebooleanfalseA true/false parameter value.

color

Color · binding · returns color · context: parameters

Default key: color.

A '#rrggbb' (or '#rrggbbaa') color parameter value.

keytypedefaultminmaxoptionstooltip
valuecolor'#ffffff'A '#rrggbb' (or '#rrggbbaa') color parameter value.

integer

Integer · binding · returns integer · context: parameters

Default key: integer.

A whole-number parameter value; a fraction fails evaluate.

keytypedefaultminmaxoptionstooltip
valueinteger0A whole-number parameter value; a fraction fails evaluate.

length

Length · binding · returns length · context: parameters

Default key: length.

A parameter value in millimeters.

keytypedefaultminmaxoptionstooltip
valuelength0A parameter value in millimeters.

lengths

Length List · binding · returns length[] · context: parameters

Default key: lengths.

A list of parameter values, each in millimeters.

keytypedefaultminmaxoptionstooltip
valuelength[][]A list of parameter values, each in millimeters.

number

Number · binding · returns number · context: parameters

Default key: number.

A dimensionless numeric parameter value.

keytypedefaultminmaxoptionstooltip
valuenumber0A dimensionless numeric parameter value.

points

Point List · binding · returns point[] · context: parameters

Default key: points.

A list of [x, y, z] points in millimeters, read back as the same nested array.

keytypedefaultminmaxoptionstooltip
valuepoint[][]A list of [x, y, z] points in millimeters, read back as the same nested array.

surface

Surface · binding · returns surface · context: parameters

Default key: surface.

A NURBS surface value (control net). Bake with nurbsSurface.

keytypedefaultminmaxoptionstooltip
controlPointspoint[][] | surface[[[0,0,0],[1000,0,0]],[[0,1000,0],[1000,1000,0]]]A control net: rows of point rows [x,y,z] in mm (u-index outer, v-index inner), or an existing surface value.
degreeUinteger11NURBS degree along U; must be >= 1 and <= the control net's row count minus 1, or evaluate fails loud.
degreeVinteger11NURBS degree along V; must be >= 1 and <= the control net's column count minus 1, or evaluate fails loud.
knotsUnumber[][]Empty = clamped-uniform.
knotsVnumber[][]Empty = clamped-uniform.

text

Text · binding · returns string · context: parameters

Default key: text.

A text parameter value.

keytypedefaultminmaxoptionstooltip
valuestring''A text parameter value.

url

URL · binding · returns url · context: parameters

Default key: url.

The address itself — a 'data:' or 'https:' URI, or blank when unset.

keytypedefaultminmaxoptionstooltip
valueurl''The address itself — a 'data:' or 'https:' URI, or blank when unset.
📖 3 min read