Skip to content
Shapemetry

Types - Frame

API reference for ./evaluate/frame on @huukhanhnguyen/types.

See the Guide for the package's role.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

GeometryPlacement

type

Placement matrix + props for one block placement in a render frame.

type GeometryPlacement
// = {
    transformation: Transformation;
    material?: string;
    layer?: string;
    name?: string;
    visible?: boolean;
    attributes?: Record<string, unknown>;
}

RenderFrameBlock

type

type RenderFrameBlock
// = {
    leaves: Entity[];
    placement: GeometryPlacement;
    definition?: string;
}

RenderFrameSlice

type

type RenderFrameSlice
// = {
    key: string;
    id: string;
    /** World-space leaves (branded at call sites that need it). */
    leaves: Entity[];
    blocks: RenderFrameBlock[];
}

Resolved

type

Common envelope for every Model.evaluate* result.

type Resolved
// = {
    key: string;
    label?: string;
    value: T;
}

ResolvedComponentValue

type

type ResolvedComponentValue
// = {
    entities: Entity[];
    opening: Entity[];
    /** INFERRED flatness — the resolved body's bbox has no z extent at the
     *  current parameter values. A fallback: it can flip under a slider. */
    isFlat: boolean;
    /** DECLARED flatness — `Component.flat`. Wins over `isFlat`, and when set
     *  the WHOLE body (`entities`) is the 2D representation. There is no
     *  per-step flat declaration to filter by: `Operation.flat` was deleted
     *  2026-08-15, which is what collapsed the old hasFlatNodes/flatEntities
     *  pair into this one flag. */
    flat: boolean;
}

ScenePull

type

Fold slices + render frame — ONE SceneNode resolve produces both.

type ScenePull
// = {
    slices: Map<string, Entity[]> | null;
    frame: RenderFrameSlice[];
}
Last updated: 📖 1 min readEdit on GitHub