ViewerDocumentJson ​

Contract 2.0.0 · package sha256 a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e · generated from configurator-runtime.d.ts by services/onsite-scripter/scripts/build-contract-docs.mjs; edit the source, not this file.

Interface · import type { ViewerDocumentJson } from '@holostep-configurators/runtime-client/contract'; · stable · since 2.0.0 · section 21. Stored data (vendored; replaces @holo/interfaces)

The viewer document, version 2: the page's defaults for the typed members, as JSON. It has no plugins map and no engine keys. Everything else a version-1 document configured is either a typed member, owned by the runtime, or removed; migration.json maps every version-1 key (Appendix C.7 of the spec). Under contract 2.0 a version-1 key in the page layer records 'document-error' with didYouMean. JSON only: textures by absolute HTTP(S) URL, no functions. A relative URL records 'document-error' (expected: 'absolute URL'): assetBaseUrl applies to the scene model only, and the 1.4 viewer loaded relative document URLs from the merchant page.

Members ​

Member Kind Summary
schema property The schema id.
version property 2.
meta? property Your own notes; the runtime ignores them.
stage? property The page's stage defaults; stage.set layers merge over them.
materials? property The page's material defaults.
camera? property The page's camera defaults: its limits, its lens and its named views.

Declaration ​

ts
export interface ViewerDocumentJson {
  schema: 'holo.viewer-document';
  version: 2;
  meta?: {
    [key: string]: JsonValue;
  };
  stage?: StageSettings;
  materials?: {
    fadeMs?: number;
  };
  camera?: {
    limits?: CameraLimits;
    lens?: CameraLens;
    views?: Readonly<Record<string, CameraView | LookAtView>>;
  };
}

Generic-API test (spec 3.1) ​

Rule Result
1. Neutral name pass: ViewerDocumentJson names no product
2. A precedent pass: a correctness rule (rows G48)
3. Two apps, or labs pass: 28 apps (ledger: app-04c2774145, app-0c773a4ee3, app-37356bf09f, app-378d190f1b, app-4762caacdc, app-4f16d2f6da, app-4fd23bc869, app-510d750508 and 20 more; fleet cross-check: app-04c2774145, app-0c773a4ee3, app-37356bf09f, app-378d190f1b, app-4762caacdc, app-4f16d2f6da, app-4fd23bc869, app-510d750508 and 20 more)
4. The cheaper fix first decided per need in Appendix B: rows G48 at tier fix, stable (a member only where no rule, data, asset or app code serves the need)