Skip to content
Shapemetry

@huukhanhnguyen/model / schema/vocabulary/constants

schema/vocabulary/constants

ANIMATABLE_VALUE_TYPES

const ANIMATABLE_VALUE_TYPES: ReadonlySet<string>

Parameter value types that can carry an animation block.


AREA_UNITS

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


JS_KEYWORDS

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 JS_RESERVED: readonly ["Math", "Number", "String", "Boolean", "Array", "Object", "isNaN", "parseFloat", "parseInt", "Table", "Scene", "Material"]

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.


KEY_REGEX

const KEY_REGEX: RegExp


LENGTH_UNITS

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


MASS_UNITS

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


PARAM_METHOD_VALUE_TYPE

const PARAM_METHOD_VALUE_TYPE: Record<string, string>

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).


PARAM_VALUE_ARG

const PARAM_VALUE_ARG: "value"

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.


RESERVED_KEY_SET

const RESERVED_KEY_SET: Set<string>


TRACK_KEYFRAME_COMPONENTS

const TRACK_KEYFRAME_COMPONENTS: Record<string, number | null>

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.


TRACK_METHODS

const TRACK_METHODS: ReadonlySet<string>

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


VOLUME_UNITS

const VOLUME_UNITS: ["mm3", "cm3", "m3", "in3", "ft3", "L"]


isAnimatableMethod()

isAnimatableMethod(method): boolean

Parameters

method

string

Returns

boolean

Last updated: 📖 3 min readEdit on GitHub