Skip to content
Shapemetry

Model - Cameras

API reference for src/schema/vocabulary/cameras, src/validate/cameras, src/lanes/cameras/cameras on @huukhanhnguyen/model, reachable from ..

See the Guide for the ModelJSON / evaluate pipeline.

API reference

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

CAMERA_METHOD_NAMES

const

const CAMERA_METHOD_NAMES: CameraMethod[]

CAMERA_METHOD_SET

const

const CAMERA_METHOD_SET: ReadonlySet<string>

CAMERA_METHODS

const

const CAMERA_METHODS: MethodTable

cameraArgInput

function

Read an arg's expression string (undefined when absent or empty).

cameraArgInput(node: CameraArgCarrier, key: string): string | undefined

cameraErrors

function

cameraErrors(model: ModelJSON): RegistryError[]

CameraMethod

type

type CameraMethod
// = keyof typeof CAMERA_METHODS

CameraNode

type

One cameras[] entry (lane node — not the viewport live CameraSchema). The record spine lives in @huukhanhnguyen/types (modelDocument.ts), generic in the method vocabulary; bound here to this lane's runtime method table.

type CameraNode
// = LaneNode$1<CameraMethod>

collectCameras

function

Evaluate every TOP-LEVEL cameras[] node against the model's live parameter scope.

NOT fail-soft (2026-08-15): a camera that cannot say which way it looks, or which way it projects, has no documented default to fall back TO — and the catch {} this replaces swallowed exactly those two errors, so the guards read as passing while the camera silently vanished from the lane. A missing camera is not a dimmer scene; it is a view that opens somewhere else.

collectCameras(scope: ModelScope): EvaluatedCamera[]

setCameraArg

function

Write/clear an arg on a camera node (mutates in place). Empty clears.

setCameraArg(node: CameraArgCarrier, key: string, input: string): void
Last updated: 📖 1 min readEdit on GitHub