Patterns
ModelJson.patterns.
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AddPatternMethod } from "./AddPatternMethod.js";
import type { Argument } from "./Argument.js";
import type { PatternStepNode } from "./PatternStepNode.js";
import type { PropertyNode } from "./PropertyNode.js";
/**
* A `patterns[]` entry: identity `key`, plus `steps` — one `lineFamily`
* step per drawn family, non-empty (enforced post-deserialize, see
* `crate::validate`) — plus a `properties` list carrying only `attributes`.
*/
export type PatternNode = {
/**
* identity — unique in the document's one key namespace, every lane.
*/
key: string,
/**
* intent — editor-chrome display name, printed verbatim; absent falls
* back to `key` (`RecordView.ts`: "header = label (or key)").
*/
label?: string,
/**
* intent — the one closed-literal patterns-lane head.
*/
method: AddPatternMethod,
/**
* intent — this head takes no args; kept for NODE LAW shape parity.
*/
args?: Array<Argument>,
/**
* intent — one `lineFamily` step per drawn family, non-empty.
*/
steps: Array<PatternStepNode>,
/**
* intent — `attributes` only.
*/
properties?: Array<PropertyNode>, };// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* The one patterns-lane head method.
*/
export type AddPatternMethod = "addPattern";// 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 { LineFamilyMethod } from "./LineFamilyMethod.js";
/**
* One `patterns[].steps` entry — a drawn line family. Carries the same
* shape as `StepNode` (H9): a pattern step is a step.
*/
export type PatternStepNode = {
/**
* intent — editor-chrome display text, printed verbatim; absent falls
* back to the registry's friendly name for `method` (`StepView.ts`'s
* `renderStep`, shared by every step-shaped row, this one included).
*/
label?: string,
/**
* intent — the one closed-literal pattern-step method.
*/
method: LineFamilyMethod,
/**
* 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 one pattern-lane step method, a closed literal.
*/
export type LineFamilyMethod = "lineFamily";// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* intent — how the line itself is drawn.
*/
export type LineStyle = "solid" | "dashed" | "dotted";// 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 "patterns" — the addPattern head plus lineFamily.
3 catalog method(s) whose context names "patterns".
addPattern
Pattern · step · returns pattern · context: patterns
Default key: pattern.
Hatch pattern record, identified by its node key; its line families are
lineFamilysteps.
No args.
attributes
Attributes · step · returns object · context: properties, materials, layers, patterns
Default key: attributes.
Free-form domain bag.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
value | object | function | {} | Free-form JSON object merged onto this placement's attributes; the engine reads nothing out of it. |
lineFamily
Line Family · step · returns pattern · context: patterns
Default key: lineFamily.
One infinite parallel-line family drawn over a hatch region.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
angle | angle | 0 | Direction of the family, degrees counter-clockwise from hatch-space +X. | |||
origin | point | [0, 0] | A point the first line passes through, in hatch space [x, y]. Not rewritten on a unit change. | |||
shift | length | 0 | Slide along the line direction between one line and the next; visible once dashes breaks the line up. | |||
spacing | length | Distance across, between one line and the next; a negative value flips which side the family repeats toward. Must not be 0. | ||||
dashes | length[] | Repeating pen cycle (SVG stroke-dasharray spelling); absent = a solid line. | ||||
lineWidth | length | Stroke width. Absent = the renderer's hairline. | ||||
color | color | #rrggbb. Absent = inherit from the placement's material. | ||||
dotSize | length | Diameter painted for a zero-length dash. Absent = lineWidth. |
📖 1 min read