Skip to content
ParaShape

Object

Each objects[] entry evaluates to one SceneObject: its placements (instances), its content (data, one of the kinds in the sidebar, tagged by type) and its own behaviors.

SceneObject

The evaluated-object shape, one for every objects[] entry after fold + placement assembly.

Used by: Block.

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

/**
 * The evaluated-object shape, one for every `objects[]` entry after fold +
 * placement assembly.
 */
export type SceneObject = { 
/**
 * identity — the `objects[]` key of the node that produced this
 * object; model-wide unique at the top level, and inside a `Block` the
 * DEFINITION's own key (two placements of one component repeat it).
 * Pick/diff identity is (node id, cell ordinal), never this string.
 */
key: string, 
/**
 * intent — editor chrome for the definition. Absent = UI shows `key`.
 */
label?: string, 
/**
 * geometry — the placements: how many of this object there are and
 * where each sits.
 */
instances: Array<Instance>, 
/**
 * geometry — the shared payload; its own shape says what type this is.
 * A `Block` piece's data is not folded here: `data` holds exactly one
 * `PieceData` — one node's output is one object.
 */
data: PieceData, 
/**
 * geometry — this object's own authored behaviors, evaluated. Survives
 * settle (AGENTS.md "Objects keep their behaviors after settle") so a
 * component body's window still carries its opening when the block
 * that contains it is placed.
 */
behaviors: Array<Behavior>, 
/**
 * geometry — this object's own resolved placement pivot
 * (`graph::property::place`), in this object's own local frame (the
 * same frame the `pivot` property is authored in, before placement) —
 * the SAME point `faceCamera` turns about (`graph::object::
 * stamp_face_camera_pivot`) and `render::RenderChange.pivot` ships, so
 * a host gizmo never re-derives it.
 */
pivot: [number, number, number], };
fieldtypeoptionalclassdoc
keystringnoidentityidentity — the objects[] key of the node that produced this object; model-wide unique at the top level, and inside a Block the DEFINITION's own key (two placements of one component repeat it). Pick/diff identity is (node id, cell ordinal), never this string.
labelstringyesintentintent — editor chrome for the definition. Absent = UI shows key.
instancesArray<Instance>nogeometrygeometry — the placements: how many of this object there are and where each sits.
dataPieceDatanogeometrygeometry — the shared payload; its own shape says what type this is. A Block piece's data is not folded here: data holds exactly one PieceData — one node's output is one object.
behaviorsArray<Behavior>nogeometrygeometry — this object's own authored behaviors, evaluated. Survives settle (AGENTS.md "Objects keep their behaviors after settle") so a component body's window still carries its opening when the block that contains it is placed.
pivot[number, number, number]nogeometrygeometry — this object's own resolved placement pivot (graph::property::place), in this object's own local frame (the same frame the pivot property is authored in, before placement) — the SAME point faceCamera turns about (graph::object:: stamp_face_camera_pivot) and render::RenderChange.pivot ships, so a host gizmo never re-derives it.

Behavior

Used by: Block, SceneObject.

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

export type Behavior = { "method": "opening", 
/**
 * geometry — the void, in the carrying object's own local space.
 */
volume: Mesh, } | { "method": "faceCamera", 
/**
 * geometry — the turning point, in the carrying object's own local
 * space: the object's own resolved pivot (`graph::property::
 * placements`), stamped on at assembly — never an
 * authored value.
 */
pivot: [number, number, number], 
/**
 * geometry — the unit normal that faces the viewer, in the
 * carrying object's own local space.
 */
normal: [number, number, number], };

Behavior — opening

fieldtypeoptionalclassdoc
method"opening"notag—
volumeMeshnogeometrygeometry — the void, in the carrying object's own local space.

Behavior — faceCamera

fieldtypeoptionalclassdoc
method"faceCamera"notag—
pivot[number, number, number]nogeometrygeometry — the turning point, in the carrying object's own local space: the object's own resolved pivot (graph::property:: placements), stamped on at assembly — never an authored value.
normal[number, number, number]nogeometrygeometry — the unit normal that faces the viewer, in the carrying object's own local space.

Instance

One placement of a SceneObject. Coordinates are LOCAL to the object; index is stable across re-evaluation (mirrors an authored properties placement one-for-one).

Used by: RenderChange, SceneObject.

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

/**
 * One placement of a `SceneObject`. Coordinates are LOCAL to the object;
 * index is stable across re-evaluation (mirrors an authored `properties`
 * placement one-for-one).
 */
export type Instance = { 
/**
 * geometry — column-major 4x4, translation at indices 12/13/14, mm.
 * Identity on a record object (dimension / leader / hatch / image /
 * section): its placement is mapped into its own fields at assembly.
 */
transformation: number[], 
/**
 * identity — this placement's own identity, distinct from the
 * object's `label`. Absent = fall back to the definition's label.
 */
name?: string, 
/**
 * identity — key of a `materials[]` record, resolved by the renderer.
 */
material?: string, 
/**
 * identity — key of a `layers[]` record, resolved by the renderer.
 */
layer?: string, 
/**
 * intent — does it appear on screen, per view.
 */
visible?: PerViewFlag, 
/**
 * intent — free-form classification, per placement.
 */
attributes?: Record<string, unknown>, };
fieldtypeoptionalclassdoc
transformationnumber[]nogeometrygeometry — column-major 4x4, translation at indices 12/13/14, mm. Identity on a record object (dimension / leader / hatch / image / section): its placement is mapped into its own fields at assembly.
namestringyesidentityidentity — this placement's own identity, distinct from the object's label. Absent = fall back to the definition's label.
materialstringyesidentityidentity — key of a materials[] record, resolved by the renderer.
layerstringyesidentityidentity — key of a layers[] record, resolved by the renderer.
visiblePerViewFlagyesintentintent — does it appear on screen, per view.
attributesRecord<string, unknown>yesintentintent — free-form classification, per placement.

PieceData

One document a chain step produced or is carrying. Never nested more than one level — a Block holds fully-assembled SceneObjects, each with its own Stream inside data.

Used by: SceneObject.

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AngularDimensionRecord } from "./AngularDimensionRecord.js";
import type { Block } from "./Block.js";
import type { Curve } from "./Curve.js";
import type { HatchRecord } from "./HatchRecord.js";
import type { ImageRecord } from "./ImageRecord.js";
import type { LeaderRecord } from "./LeaderRecord.js";
import type { LinearDimensionRecord } from "./LinearDimensionRecord.js";
import type { Mesh } from "./Mesh.js";
import type { RadialDimensionRecord } from "./RadialDimensionRecord.js";
import type { SectionRecord } from "./SectionRecord.js";

/**
 * One document a chain step produced or is carrying. Never nested more than
 * one level — a `Block` holds fully-assembled `SceneObject`s, each with its
 * own `Stream` inside `data`.
 */
export type PieceData = { "type": "curve" } & Curve | { "type": "mesh" } & Mesh | { "type": "block" } & Block | { "type": "section" } & SectionRecord | { "type": "hatch" } & HatchRecord | { "type": "linearDimension" } & LinearDimensionRecord | { "type": "radialDimension" } & RadialDimensionRecord | { "type": "angularDimension" } & AngularDimensionRecord | { "type": "leader" } & LeaderRecord | { "type": "image" } & ImageRecord;

Discriminated by type; the rest of the object is the named type's own fields.

typefields of
"curve"Curve
"mesh"Mesh
"block"Block
"section"SectionRecord
"hatch"HatchRecord
"linearDimension"LinearDimensionRecord
"radialDimension"RadialDimensionRecord
"angularDimension"AngularDimensionRecord
"leader"LeaderRecord
"image"ImageRecord

PerViewFlag

intent — properties.visible: absent/true = every view, false = none, a list = exactly those view keys. Empty list refused at evaluate. Render ships it as All(bool) against the session's active view (render::placement_shown); the free camera (no active view) is in no list.

Used by: Instance, ResolvedLayer, SectionEntity.

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
 * intent — `properties.visible`: absent/`true` = every view, `false` = none,
 * a list = exactly those view keys. Empty list refused at evaluate. Render
 * ships it as `All(bool)` against the session's active view
 * (`render::placement_shown`); the free camera (no active view) is in no list.
 */
export type PerViewFlag = boolean | Array<string>;

One of:

  • boolean
  • Array<string>
📖 3 min read