Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions assets/editor3d/contracts.ts

Large diffs are not rendered by default.

204 changes: 204 additions & 0 deletions docs/scene-editor/architecture.md

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions examples/editor3d-contracts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Editor contract fixtures

These self-authored engineering fixtures exercise the #99 editor binding contract.
They are not an editable scene, browser demo or accepted production artwork.

`project.json`, `scene.json`, `node.json`, and `asset.json` form an exact editor
binding closure. The asset pins actual bytes from the retained Model3D robotic
manifest. The scene pins an intentionally unavailable Scene3D owner; the absent
`unavailable/scene.json` must never be generated or relabeled as a native scene.
`animation.json` is a standalone root example not bound in that base project.
The other roots illustrate intent/revision/session/derived/service records;
`response.json` explicitly records unavailable execution.

Run `python scripts/editor3d_contracts.py --validate FILE` for one root. Run
`test_rig_editor3d_contracts` for relational closure and negative controls. Structural
admission and exact JSON hashes cannot establish native resource truth, actual
persistence, rendering, browser behavior, source licensing or visual approval.
See `docs/scene-editor/architecture.md` for authority and operation boundaries.
28 changes: 28 additions & 0 deletions examples/editor3d-contracts/animation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"schema_version": 1,
"kind": "editor3d-animation",
"id": "animation",
"native": {
"owner": "scene3d",
"id": "native-scene",
"version": "1.0.0",
"native_kind": "scene3d-scene",
"file": {
"path": "unavailable/scene.json",
"sha256": "0000000000000000000000000000000000000000000000000000000000000000",
"bytes": 1,
"media_type": "application/json"
}
},
"targets": [
"node"
],
"frame_rate": {
"numerator": 24,
"denominator": 1
},
"interval": {
"start": 0,
"end": 720
}
}
37 changes: 37 additions & 0 deletions examples/editor3d-contracts/asset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"schema_version": 1,
"kind": "editor3d-asset",
"id": "asset",
"native": {
"owner": "model3d",
"id": "robotic-contract-example",
"version": "1.0.0",
"native_kind": "model3d-asset",
"file": {
"path": "examples/model3d-contracts/robotic.json",
"sha256": "ce666b1b75c7b183007886e5674cae8960c8e102761e3caacc5759d0fc955a38",
"bytes": 16462,
"media_type": "application/json"
}
},
"asset_type": "model3d",
"original_filename": "robotic.json",
"original_format": "model3d",
"normalized_format": "model3d",
"provenance": {
"origin": "procedural-fixture",
"fixture": true,
"description": "Self-authored editor binding fixture; missing scene owner is intentional.",
"source_refs": []
},
"license": {
"identifier": null,
"attribution": null,
"permission": "unknown",
"evidence": null
},
"dependencies": [],
"thumbnails": [],
"validation_status": "unvalidated",
"previous": null
}
28 changes: 28 additions & 0 deletions examples/editor3d-contracts/command.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"schema_version": 1,
"kind": "editor3d-command",
"id": "command",
"project_id": "project",
"scene_id": "scene",
"expected_revision": 0,
"expected_project_sha256": "62ca33b39a103db474de2a1e5f285a7bdc95d4d6d90550a2c716ca2826a57562",
"transaction_id": "transaction",
"operation": "set-transform",
"targets": [
"node"
],
"input": {
"owner": "scene3d",
"id": "native-scene",
"version": "1.0.0",
"native_kind": "scene3d-scene",
"file": {
"path": "unavailable/scene.json",
"sha256": "0000000000000000000000000000000000000000000000000000000000000000",
"bytes": 1,
"media_type": "application/json"
}
},
"inverse": null,
"author": "fixture-author"
}
27 changes: 27 additions & 0 deletions examples/editor3d-contracts/derived.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"schema_version": 1,
"kind": "editor3d-derived",
"project_id": "project",
"project_sha256": "62ca33b39a103db474de2a1e5f285a7bdc95d4d6d90550a2c716ca2826a57562",
"frame": 0,
"frame_rate": {
"numerator": 24,
"denominator": 1
},
"native_dependencies": [
{
"owner": "scene3d",
"id": "native-scene",
"version": "1.0.0",
"native_kind": "scene3d-scene",
"file": {
"path": "unavailable/scene.json",
"sha256": "0000000000000000000000000000000000000000000000000000000000000000",
"bytes": 1,
"media_type": "application/json"
}
}
],
"evidence": [],
"status": "unavailable"
}
33 changes: 33 additions & 0 deletions examples/editor3d-contracts/node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"schema_version": 1,
"kind": "editor3d-node",
"id": "node",
"scene_id": "scene",
"native": {
"owner": "scene3d",
"id": "native-scene",
"version": "1.0.0",
"native_kind": "scene3d-scene",
"file": {
"path": "unavailable/scene.json",
"sha256": "0000000000000000000000000000000000000000000000000000000000000000",
"bytes": 1,
"media_type": "application/json"
}
},
"native_node_id": "native-node",
"node_type": "mesh",
"parent": null,
"sibling_order": 0,
"selectable": true,
"locked": false,
"collections": [
"default"
],
"asset_id": "asset",
"rig_id": null,
"editor_metadata": {
"label": "Engineering contract fixture",
"notes": "No native scene or renderer execution is claimed."
}
}
84 changes: 84 additions & 0 deletions examples/editor3d-contracts/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"schema_version": 1,
"kind": "editor3d-project",
"id": "project",
"name": "Editor contract fixture",
"revision": 0,
"created_at": "2026-10-25T00:00:00Z",
"updated_at": "2026-10-25T00:00:00Z",
"application": {
"name": "hatch-editor3d",
"version": "1.0.0"
},
"coordinates": {
"handedness": "right",
"right": "+X",
"up": "+Y",
"forward": "+Z",
"unit": "meter",
"angles": "radian",
"quaternion": "XYZW",
"matrices": "column-vectors",
"time": "second"
},
"color_management": null,
"frame_rate": {
"numerator": 24,
"denominator": 1
},
"scenes": [
{
"id": "scene",
"sha256": "3bfcbb1027004a7f7b93f489b7504d5b4f10a53ebd8e721fa36a9c543cc6b21f"
}
],
"shots": [],
"shared_assets": [
{
"id": "asset",
"sha256": "01b2ce2dbc1149a770b1cfb383f8545638c839e4ce9190f025aa6fc1f53d3740"
}
],
"characters": [],
"animation_clips": [],
"render_presets": [],
"editor_metadata": {
"label": "Engineering contract fixture",
"notes": "No native scene or renderer execution is claimed."
},
"provenance": {
"origin": "procedural-fixture",
"fixture": true,
"description": "Self-authored editor binding fixture; missing scene owner is intentional.",
"source_refs": []
},
"dependency_manifest": [
{
"owner": "model3d",
"id": "robotic-contract-example",
"version": "1.0.0",
"native_kind": "model3d-asset",
"file": {
"path": "examples/model3d-contracts/robotic.json",
"sha256": "ce666b1b75c7b183007886e5674cae8960c8e102761e3caacc5759d0fc955a38",
"bytes": 16462,
"media_type": "application/json"
}
},
{
"owner": "scene3d",
"id": "native-scene",
"version": "1.0.0",
"native_kind": "scene3d-scene",
"file": {
"path": "unavailable/scene.json",
"sha256": "0000000000000000000000000000000000000000000000000000000000000000",
"bytes": 1,
"media_type": "application/json"
}
}
],
"source_projects": [],
"validation_status": "unvalidated",
"review_status": "unreviewed"
}
17 changes: 17 additions & 0 deletions examples/editor3d-contracts/request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"schema_version": 1,
"kind": "editor3d-request",
"id": "request",
"operation": "scenes.command",
"project_id": "project",
"target_id": "scene",
"expected_revision": 0,
"expected_project_sha256": "62ca33b39a103db474de2a1e5f285a7bdc95d4d6d90550a2c716ca2826a57562",
"argument": {
"path": "examples/editor3d-contracts/command.json",
"sha256": "477b45ef3132e99e3246ac4240b7c1f392b20dffcbb245f8fc2d68824ab893e4",
"bytes": 724,
"media_type": "application/json"
},
"idempotency_key": "operation"
}
20 changes: 20 additions & 0 deletions examples/editor3d-contracts/response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"schema_version": 1,
"kind": "editor3d-response",
"request_id": "request",
"status": "unavailable",
"project_revision": 0,
"project_sha256": "62ca33b39a103db474de2a1e5f285a7bdc95d4d6d90550a2c716ca2826a57562",
"outputs": [],
"diagnostics": [
{
"code": "EDITOR3D_UNAVAILABLE",
"path": "/operation",
"message": "Scene owner not integrated.",
"correction": "Integrate the authoritative scene service before authoring.",
"retryable": false
}
],
"executed": false,
"review_status": "unreviewed"
}
18 changes: 18 additions & 0 deletions examples/editor3d-contracts/revision.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"schema_version": 1,
"kind": "editor3d-revision",
"id": "revision",
"project_id": "project",
"number": 0,
"parent": null,
"project_sha256": "62ca33b39a103db474de2a1e5f285a7bdc95d4d6d90550a2c716ca2826a57562",
"command_ids": [],
"created_at": "2026-10-25T00:00:00Z",
"author": "fixture-author",
"snapshot": {
"path": "examples/editor3d-contracts/project.json",
"sha256": "2061ed7b6d4e7ea8b652c3a32338ddb4ec9aa36173345009055cf7645b0af3aa",
"bytes": 2157,
"media_type": "application/json"
}
}
37 changes: 37 additions & 0 deletions examples/editor3d-contracts/scene.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"schema_version": 1,
"kind": "editor3d-scene",
"id": "scene",
"project_id": "project",
"native": {
"owner": "scene3d",
"id": "native-scene",
"version": "1.0.0",
"native_kind": "scene3d-scene",
"file": {
"path": "unavailable/scene.json",
"sha256": "0000000000000000000000000000000000000000000000000000000000000000",
"bytes": 1,
"media_type": "application/json"
}
},
"nodes": [
{
"id": "node",
"sha256": "9e247c1d7d9fc7c2bed09eb2453c5ef41e467ee4575abdd17c0b37eeb45eaffa"
}
],
"collections": [
"default"
],
"default_camera": null,
"animations": [],
"timeline": {
"start": 0,
"end": 720
},
"editor_metadata": {
"label": "Engineering contract fixture",
"notes": "No native scene or renderer execution is claimed."
}
}
36 changes: 36 additions & 0 deletions examples/editor3d-contracts/session.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"schema_version": 1,
"kind": "editor3d-session",
"id": "session",
"project_id": "project",
"base_revision": 0,
"base_project_sha256": "62ca33b39a103db474de2a1e5f285a7bdc95d4d6d90550a2c716ca2826a57562",
"selection": [
"node"
],
"active_scene": "scene",
"playhead": 0,
"viewport": {
"translation": [
0,
0,
5
],
"rotation": [
0,
0,
0,
1
],
"scale": [
1,
1,
1
]
},
"overlays": [
"grid"
],
"tool": "select",
"unsaved_command_ids": []
}
Loading
Loading