責務と公開範囲
scene graph文書を検証・正規化し、TurboWarp 3D拡張へ渡す決定的な呼出計画へ変換するlibraryです。A-Frameの実行やカメラの起動は行いません。アプリ非依存のscene model/YAMLと、Kamishibai固有のscene3d/ar envelopeを分離します。
このページはlibraryのドキュメントです。TurboWarp拡張の独立したpaletteやブロックは提供しません。
使い方
公開済みの完全固定versionを使います。
npm install --save-exact @kubohiroya/turbowarp-scene-graph@0.2.2import {parseSceneGraphYaml, stringifySceneGraphYaml}
from '@kubohiroya/turbowarp-scene-graph';
const scene = parseSceneGraphYaml(source);
const yaml = stringifySceneGraphYaml(scene);API
| 入口 | 責務 |
|---|---|
parseSceneGraphYaml | YAMLをscene graph文書として読み取り検証・正規化します。 |
stringifySceneGraphYaml | scene graph文書をYAMLとして書き出します。 |
./editor-schema | bare文書とscene3d/ar wrapper用の互換Schema bundle、およびowner検証を提供します。 |
Schemaの正本と公開コピー
正本はリポジトリのschemas/です。以下は同じbytesを配置した公開用コピーであり、別定義ではありません。互換編集用とcanonical検証用の使い分けはeditor Schema設計を参照してください。
- editor-compatible-kamishibai-3d-scene-extension.schema.json — 正本 schemas/
- kamishibai-3d-scene-extension.schema.json — 正本 schemas/
- editor-compatible-scene-document.schema.json — 正本 schemas/
- scene-node.schema.json — 正本 schemas/
- scene-document.schema.json — 正本 schemas/
- editor-compatible-scene-node.schema.json — 正本 schemas/