Skip to content
Shapemetry

Model - Constants

API reference for src/schema/vocabulary/constants 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.

ANIMATABLE_VALUE_TYPES

const

Parameter value types that can carry an animation block.

const ANIMATABLE_VALUE_TYPES: ReadonlySet<string>

AREA_UNITS

const

const AREA_UNITS: ["mm2", "cm2", "m2", "in2", "ft2"]

isAnimatableMethod

function

isAnimatableMethod(method: string): boolean

JS_KEYWORDS

const

const JS_KEYWORDS: readonly ["break", "case", "catch", "continue", "debugger", "default", "delete", "do", "else", "finally", "for", "function", "if", "in", "instanceof", "new", "return", "switch", "this", "throw", "try", "typeof", "var", "void", "while", "with", "class", "const", "enum", "export", "extends", "import", "let", "static", "super", "yield", "async", "await", "implements", "interface", "package", "private", "protected", "public", "of", "null", "true", "false", "undefined", "NaN", "Infinity", "arguments", "eval"]

JS_RESERVED

const

Expression injection surface (settings-functions §B namespace law): a lane exposes data to expressions ONLY through a PascalCase namespace (Table.*, Scene.*, Material.*). No bare functions. Namespaces are ON DEMAND — only when a real consumer exists (do not add Pattern/Layer/Style/ View/Sheet/Document until needed). Unit O removed Stats.* aggregates.

const JS_RESERVED: readonly ["Math", "Number", "String", "Boolean", "Array", "Object", "isNaN", "parseFloat", "parseInt", "Table", "Scene", "Material"]

KEY_REGEX

const

const KEY_REGEX: RegExp

LENGTH_UNITS

const

const LENGTH_UNITS: ["mm", "cm", "m", "in", "ft"]

MASS_UNITS

const

const MASS_UNITS: ["mg", "g", "kg", "lb", "oz"]

PARAM_METHOD_VALUE_TYPE

const

Parameter methods whose persisted method differs from the internal sanitizer/value type used by convert()/validate()/display() (core/sanitizer.ts). A method absent here uses itself as its value type (the common case).

const PARAM_METHOD_VALUE_TYPE: Record<string, string>

PARAM_VALUE_ARG

const

Every parameter method's primary scalar arg is named value (schema hygiene 2026-07). Secondary fields (min/max/step/options) ride on the same Argument object — they are not sibling args.

const PARAM_VALUE_ARG: "value"

RESERVED_KEY_SET

const

const RESERVED_KEY_SET: Set<string>

TRACK_KEYFRAME_COMPONENTS

const

How many numbers ONE keyframe of each track method carries — null = free (a mesh's morph weights are as long as its morph-target list). formulaTrack is the fifth track method and always scalar, but it is not in this table: it authors no values array to check (see validate/animations.ts). The count lives in the METHOD NAME because a method name can never be an expression — that is what lets validate reject a 1-number track wired into a joint's rotationTrack before it evaluates silently wrong.

const TRACK_KEYFRAME_COMPONENTS: Record<string, number | null>

TRACK_METHODS

const

Every animations[] track method — the four keyframe ones plus the baked formulaTrack.

const TRACK_METHODS: ReadonlySet<string>

VOLUME_UNITS

const

const VOLUME_UNITS: ["mm3", "cm3", "m3", "in3", "ft3", "L"]
Last updated: 📖 2 min readEdit on GitHub