Skip to content
ParaShape

Model JSON

Persisted document. Each field is a lane. The types below are ts-rs output from crates/model — this site is a review surface, not a second schema.

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { BehaviorNode } from "./BehaviorNode.js";
import type { ComponentNode } from "./ComponentNode.js";
import type { LayerNode } from "./LayerNode.js";
import type { MaterialNode } from "./MaterialNode.js";
import type { ModelSettings } from "./ModelSettings.js";
import type { ObjectNode } from "./ObjectNode.js";
import type { ParameterNode } from "./ParameterNode.js";
import type { PatternNode } from "./PatternNode.js";
import type { ViewNode } from "./ViewNode.js";

/**
 * Model = meta + assets + parameters (header) + scene (body). The ONE
 * declaration of the persisted document. Cross-field refinements (one key
 * namespace across every lane, the material/pattern library shape) run post-deserialize
 * in `crate::validate` — serde has no schema-level array-uniqueness refine.
 */
export type ModelJson = { 
/**
 * identity — the platform's PUBLISH sequence, stamped by the host.
 * 0/absent = never published. Not a JSON-format/schema version number.
 */
version?: number, 
/**
 * intent — content name printed on the artifact, verbatim text (a
 * human types it; nothing evaluates it).
 */
title: string, 
/**
 * intent — units, active view, environment; absent = every field's own default.
 */
settings?: ModelSettings, 
/**
 * intent — the materials lane.
 */
materials?: Array<MaterialNode>, 
/**
 * intent — the layers lane.
 */
layers?: Array<LayerNode>, 
/**
 * intent — the patterns lane.
 */
patterns?: Array<PatternNode>, 
/**
 * intent — Header: named value bindings.
 */
parameters?: Array<ParameterNode>, 
/**
 * intent — acts this model performs on its siblings when it is placed
 * as a component (AGENTS.md "Behaviors"); dormant in an open document —
 * the root has no siblings — active once placed via `placeComponent`.
 */
behaviors?: Array<BehaviorNode>, 
/**
 * intent — Root body: the SET of scene objects, model-wide unique keys.
 */
objects?: Array<ObjectNode>, 
/**
 * intent — Named views, per-lane unique keys.
 */
views?: Array<ViewNode>, 
/**
 * intent — the components lane: documents this one places.
 */
components?: Array<ComponentNode>, };
fieldpage
version, title, typeSchema
settingsSettings
parametersParameters
objectsObjects
viewsViews
componentsComponents
materialsMaterials
layersLayers
patternsPatterns
behaviorsBehaviors

Every field this closure carries, generated in full, plus the Open surface audit of every unconstrained field: Schema. Catalog methods: Nodes. Expression namespaces: Functions. Evaluated shapes a curve / object parameter may store: Curve, Mesh, Instance.

📖 1 min read