One XRAI document. Many renderers. Each adapter ingests the same v1.0 JSON and produces engine-native scene.
| Engine | Directory | Status | Target |
|---|---|---|---|
| Three.js | threejs/ |
⏳ stub | Week 2 (primary web demo, simplest to validate spec) |
| PlayCanvas | playcanvas/ |
⏳ stub | Week 2 (shares JS ecosystem w/ Three.js) |
| Unity | unity/ |
✅ reference in Portals app, standalone extraction Week 3 | Week 3 |
| WebXR | webxr/ |
⏳ stub (thin glue over Three.js) | Week 3 |
| Unreal | unreal/ |
⏳ stub | Month 2 |
| visionOS RealityKit | visionos/ |
⏳ stub | Month 2 |
| Godot | godot/ (not yet) |
— | Community-welcomed |
| Bevy | bevy/ (not yet) |
— | Community-welcomed |
parse(doc: string | object) -> XraiGraph | ParseError
// Validate against v1.0 schema. Throw or return structured error. Never silently corrupt.
buildScene(graph: XraiGraph) -> EngineNativeScene
// Entities + relations + transforms applied. Returns engine's scene root type.
(optional) mergeInto(existingScene, graph: XraiGraph) -> EngineNativeScene
// Apply changeset to existing scene. Idempotent by entity id.
A conformance-test corpus lives at runtimes/_conformance/ (planned):
{input.xrai.json, expected_scene_description.yaml}This guarantees XRAI documents are truly portable across engines.
../SPEC.md v1.0threejs/) as starting pointparse() + buildScene()XRAI canonical convention:
[x, y, z, w] (not Euler)Your engine’s native convention may differ. Convert once in parse(), not scattered through the builder. Detect via graph.origin.handedness hint; default to left-handed Y-up.
Examples: