@nebula-spatial/studio 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/README.md +206 -3
  2. package/dist/ai/contract.d.ts +73 -0
  3. package/dist/ai/host.d.ts +28 -0
  4. package/dist/asset/dependency-scan.d.ts +78 -0
  5. package/dist/asset/intake.d.ts +84 -0
  6. package/dist/asset/layout-detect.d.ts +40 -0
  7. package/dist/asset/media-type.d.ts +10 -0
  8. package/dist/asset/model-inspection.d.ts +127 -0
  9. package/dist/asset/record.d.ts +35 -0
  10. package/dist/asset/remote-asset-resolver.d.ts +36 -0
  11. package/dist/asset/repairs.d.ts +53 -0
  12. package/dist/asset/resource-locator.d.ts +15 -0
  13. package/dist/asset/revision-diff.d.ts +33 -0
  14. package/dist/asset/source-contracts.d.ts +21 -0
  15. package/dist/asset/source-paths.d.ts +15 -0
  16. package/dist/asset/usd-inspection.d.ts +39 -0
  17. package/dist/asset/usd-source-metadata.d.ts +142 -0
  18. package/dist/asset/visual-intake.d.ts +27 -0
  19. package/dist/asset/visual-record.d.ts +22 -0
  20. package/dist/asset/web-intake.d.ts +46 -0
  21. package/dist/asset-source-BExlEcRt.js +444 -0
  22. package/dist/assets/usd-export-worker-BsGubtAE.js +1 -0
  23. package/dist/builders-BAXRR5o5.js +1854 -0
  24. package/dist/core/asset-task.d.ts +105 -0
  25. package/dist/core/context.d.ts +23 -0
  26. package/dist/core/host.d.ts +432 -0
  27. package/dist/core/persistence-controller.d.ts +58 -0
  28. package/dist/core/plugins.d.ts +139 -0
  29. package/dist/core/scene-tree.d.ts +62 -0
  30. package/dist/core/versions.d.ts +2 -0
  31. package/dist/core/when.d.ts +13 -0
  32. package/dist/core/write-policy.d.ts +29 -0
  33. package/dist/delivery/build-plan.d.ts +2 -0
  34. package/dist/delivery/contracts.d.ts +362 -0
  35. package/dist/delivery/digest.d.ts +3 -0
  36. package/dist/delivery/evidence.d.ts +10 -0
  37. package/dist/delivery/export-evidence.d.ts +3 -0
  38. package/dist/delivery/index.d.ts +9 -0
  39. package/dist/delivery/prim-name.d.ts +17 -0
  40. package/dist/delivery/profile.d.ts +4 -0
  41. package/dist/doc/builders.d.ts +99 -0
  42. package/dist/doc/command.d.ts +195 -0
  43. package/dist/doc/domain-extensions.d.ts +34 -0
  44. package/dist/doc/node-facts.d.ts +87 -0
  45. package/dist/doc/physics-facts.d.ts +74 -0
  46. package/dist/doc/placement-policy.d.ts +71 -0
  47. package/dist/doc/random-placement.d.ts +30 -0
  48. package/dist/doc/scene-graph.d.ts +80 -0
  49. package/dist/doc/scene-regions.d.ts +29 -0
  50. package/dist/doc/schema.d.ts +452 -0
  51. package/dist/doc/task.d.ts +71 -0
  52. package/dist/doc/validate.d.ts +68 -0
  53. package/dist/editor/asset-source.d.ts +15 -0
  54. package/dist/editor/editor.d.ts +246 -0
  55. package/dist/editor/index.d.ts +22 -0
  56. package/dist/editor/shortcuts.d.ts +2 -0
  57. package/dist/editor/types.d.ts +143 -0
  58. package/dist/editor/ui-plugins.d.ts +64 -0
  59. package/dist/editor.js +1755 -0
  60. package/dist/editorial-BkAFWfbg.js +83 -0
  61. package/dist/export-evidence-B_0zRmb8.js +5027 -0
  62. package/dist/generalization/domain.d.ts +10 -0
  63. package/dist/generalization/generalization.d.ts +371 -0
  64. package/dist/generalization/index.d.ts +11 -0
  65. package/dist/generalization.js +1659 -0
  66. package/dist/history/undo-stack.d.ts +74 -0
  67. package/dist/index.d.ts +91 -0
  68. package/dist/index.js +2839 -0
  69. package/dist/persist/content-addressed.d.ts +11 -0
  70. package/dist/persist/create-scene-package-from-host.d.ts +7 -0
  71. package/dist/persist/indexeddb-store.d.ts +69 -0
  72. package/dist/persist/scene-file.d.ts +52 -0
  73. package/dist/persist/scene-package.d.ts +8 -0
  74. package/dist/persist/snapshot.d.ts +5 -0
  75. package/dist/physics-facts-tfQYyNTD.js +337 -0
  76. package/dist/placement-policy-DY_FNRDu.js +405 -0
  77. package/dist/ports/asset-ingestor.d.ts +41 -0
  78. package/dist/ports/asset-source.d.ts +57 -0
  79. package/dist/ports/delivery.d.ts +13 -0
  80. package/dist/ports/persistence.d.ts +29 -0
  81. package/dist/project/asset-catalog.d.ts +21 -0
  82. package/dist/project/contracts.d.ts +272 -0
  83. package/dist/project/editorial.d.ts +16 -0
  84. package/dist/project/identity.d.ts +20 -0
  85. package/dist/project/index.d.ts +9 -0
  86. package/dist/project/scene-document.d.ts +5 -0
  87. package/dist/project/source-dependencies.d.ts +7 -0
  88. package/dist/remote-asset-resolver-Cb8cfNmw.js +136 -0
  89. package/dist/scene/index.d.ts +12 -0
  90. package/dist/scene-graph-DBLKAhxa.js +681 -0
  91. package/dist/scene-session-BV1HnxNh.js +3506 -0
  92. package/dist/scene.js +244 -0
  93. package/dist/studio/delivery-catalog.d.ts +28 -0
  94. package/dist/studio/in-memory-asset-source.d.ts +15 -0
  95. package/dist/studio/index.d.ts +31 -0
  96. package/dist/studio/indexeddb-asset-source.d.ts +32 -0
  97. package/dist/studio/indexeddb-persistence.d.ts +13 -0
  98. package/dist/studio/remote-asset-importer.d.ts +56 -0
  99. package/dist/studio/source-package.d.ts +9 -0
  100. package/dist/studio/usd-export-client.d.ts +13 -0
  101. package/dist/studio/usd-export-protocol.d.ts +98 -0
  102. package/dist/studio/usd-export-worker.d.ts +1 -0
  103. package/dist/studio/usd-zip-reader.d.ts +14 -0
  104. package/dist/studio/web-asset-ingestor.d.ts +10 -0
  105. package/dist/studio/web-host.d.ts +8 -0
  106. package/dist/studio.js +5544 -0
  107. package/dist/util/asset-facts.d.ts +3 -0
  108. package/dist/util/data.d.ts +17 -0
  109. package/dist/util/diagnostics.d.ts +38 -0
  110. package/dist/util/geometry.d.ts +11 -0
  111. package/dist/util/hash.d.ts +9 -0
  112. package/dist/util/ids.d.ts +20 -0
  113. package/dist/util/math.d.ts +47 -0
  114. package/dist/util/ply-metadata.d.ts +19 -0
  115. package/dist/util/studio-source.d.ts +23 -0
  116. package/dist/version.d.ts +5 -0
  117. package/dist/view/appearance.d.ts +13 -0
  118. package/dist/view/authoring-appearance.d.ts +25 -0
  119. package/dist/view/bounds-preview.d.ts +34 -0
  120. package/dist/view/bounds.d.ts +11 -0
  121. package/dist/view/camera-zoom.d.ts +3 -0
  122. package/dist/view/geometry-anchors.d.ts +20 -0
  123. package/dist/view/gizmo-appearance.d.ts +5 -0
  124. package/dist/view/gizmo.d.ts +81 -0
  125. package/dist/view/group-selection.d.ts +13 -0
  126. package/dist/view/node-features.d.ts +39 -0
  127. package/dist/view/picking.d.ts +49 -0
  128. package/dist/view/placement.d.ts +48 -0
  129. package/dist/view/region-editing.d.ts +25 -0
  130. package/dist/view/rotation-guide.d.ts +36 -0
  131. package/dist/view/runtime-capabilities.d.ts +22 -0
  132. package/dist/view/scene-session.d.ts +258 -0
  133. package/dist/view/screen-bounds.d.ts +17 -0
  134. package/dist/view/selection-transform.d.ts +20 -0
  135. package/node_modules/@nebula-spatial/cad-loader/CHANGELOG.md +48 -0
  136. package/node_modules/@nebula-spatial/cad-loader/README.md +108 -0
  137. package/node_modules/@nebula-spatial/cad-loader/dist/core/cad-types.d.ts +26 -0
  138. package/node_modules/@nebula-spatial/cad-loader/dist/core/errors.d.ts +5 -0
  139. package/node_modules/@nebula-spatial/cad-loader/dist/core/index.d.ts +24 -0
  140. package/node_modules/@nebula-spatial/cad-loader/dist/core/index.js +2354 -0
  141. package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/bin-group-reader.d.ts +9 -0
  142. package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/bin-parser.d.ts +78 -0
  143. package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/dxbs-sidecar.d.ts +24 -0
  144. package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/geometry-segments.d.ts +20 -0
  145. package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/text-roundtrip.d.ts +4 -0
  146. package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/types.d.ts +81 -0
  147. package/node_modules/@nebula-spatial/cad-loader/dist/core/runtime-text-decoder.d.ts +8 -0
  148. package/node_modules/@nebula-spatial/cad-loader/dist/core/types.d.ts +153 -0
  149. package/node_modules/@nebula-spatial/cad-loader/dist/core/utils/insert-bbox.d.ts +10 -0
  150. package/node_modules/@nebula-spatial/cad-loader/dist/core/utils/viewport-rect.d.ts +21 -0
  151. package/node_modules/@nebula-spatial/cad-loader/dist/index.d.ts +36 -0
  152. package/node_modules/@nebula-spatial/cad-loader/dist/index.js +5829 -0
  153. package/node_modules/@nebula-spatial/cad-loader/dist/loader/geo-loader.d.ts +59 -0
  154. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/automatic-external-resources.d.ts +26 -0
  155. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/external-variant-sidecar-fetch.d.ts +13 -0
  156. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/flow-control.d.ts +29 -0
  157. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/frame-budget-scheduler.d.ts +21 -0
  158. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-compact-executor.d.ts +19 -0
  159. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-loader-local-adapter.d.ts +2 -0
  160. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-loader-pipeline.d.ts +92 -0
  161. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-loader-worker-adapter.d.ts +13 -0
  162. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-node-builder.d.ts +34 -0
  163. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-node-load-sink.d.ts +28 -0
  164. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-node.d.ts +304 -0
  165. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-prepare-worker-types.d.ts +94 -0
  166. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-prepare.d.ts +38 -0
  167. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-prepare.worker.d.ts +1 -0
  168. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/insert-model-builder.d.ts +10 -0
  169. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/insert-runtime-geometry.d.ts +15 -0
  170. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/line-canonical.d.ts +37 -0
  171. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/line-quality.d.ts +9 -0
  172. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/prepare-credit-gate.d.ts +20 -0
  173. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/transport.d.ts +2 -0
  174. package/node_modules/@nebula-spatial/cad-loader/dist/render-resource/cad-render-node.d.ts +80 -0
  175. package/node_modules/@nebula-spatial/cad-loader/dist/render-resource/geo-node-cad-render-node.d.ts +12 -0
  176. package/node_modules/@nebula-spatial/cad-loader/dist/scene/geo-cad-line-geometry.d.ts +28 -0
  177. package/node_modules/@nebula-spatial/cad-loader/dist/scene/geo-cad-line-material.d.ts +18 -0
  178. package/node_modules/@nebula-spatial/cad-loader/dist/scene/instancing/block-geometry-registry.d.ts +35 -0
  179. package/node_modules/@nebula-spatial/cad-loader/dist/scene/instancing/insert-instance-table.d.ts +23 -0
  180. package/node_modules/@nebula-spatial/cad-loader/dist/scene/instancing/viewport-instance-presenter.d.ts +66 -0
  181. package/node_modules/@nebula-spatial/cad-loader/dist/selection/cad-insert-selection.d.ts +35 -0
  182. package/node_modules/@nebula-spatial/cad-loader/dist/selection/cad-text-selection.d.ts +31 -0
  183. package/node_modules/@nebula-spatial/cad-loader/dist/session/annotation-idle-gate.d.ts +14 -0
  184. package/node_modules/@nebula-spatial/cad-loader/dist/session/cad-document-session.d.ts +187 -0
  185. package/node_modules/@nebula-spatial/cad-loader/dist/session/cad-font-runtime.d.ts +11 -0
  186. package/node_modules/@nebula-spatial/cad-loader/dist/session/cad-insert-id.d.ts +6 -0
  187. package/node_modules/@nebula-spatial/cad-loader/dist/session/cad-text-warmup.d.ts +38 -0
  188. package/node_modules/@nebula-spatial/cad-loader/dist/session/create-cad-document-session.d.ts +5 -0
  189. package/node_modules/@nebula-spatial/cad-loader/dist/session/load-session.d.ts +90 -0
  190. package/node_modules/@nebula-spatial/cad-loader/dist/session/viewport-coverage.d.ts +32 -0
  191. package/node_modules/@nebula-spatial/cad-loader/dist/shared/abort.d.ts +3 -0
  192. package/node_modules/@nebula-spatial/cad-loader/dist/shared/cad-display-color.d.ts +55 -0
  193. package/node_modules/@nebula-spatial/cad-loader/dist/shared/cad-load-source.d.ts +8 -0
  194. package/node_modules/@nebula-spatial/cad-loader/dist/shared/color-buffer.d.ts +6 -0
  195. package/node_modules/@nebula-spatial/cad-loader/dist/shared/constants.d.ts +11 -0
  196. package/node_modules/@nebula-spatial/cad-loader/dist/shared/display-color-buffer.d.ts +27 -0
  197. package/node_modules/@nebula-spatial/cad-loader/dist/shared/errors.d.ts +2 -0
  198. package/node_modules/@nebula-spatial/cad-loader/dist/shared/text-builder.d.ts +25 -0
  199. package/node_modules/@nebula-spatial/cad-loader/dist/shared/text-font.d.ts +12 -0
  200. package/node_modules/@nebula-spatial/cad-loader/dist/shared/types.d.ts +57 -0
  201. package/node_modules/@nebula-spatial/cad-loader/dist/shared/utils/insert-bbox.d.ts +1 -0
  202. package/node_modules/@nebula-spatial/cad-loader/dist/shared/utils/timing.d.ts +2 -0
  203. package/node_modules/@nebula-spatial/cad-loader/dist/shared/utils/viewport-rect.d.ts +1 -0
  204. package/node_modules/@nebula-spatial/cad-loader/dist/shared/viewer-theme.d.ts +2 -0
  205. package/node_modules/@nebula-spatial/cad-loader/dist/workers/geo-prepare.worker.js +2264 -0
  206. package/node_modules/@nebula-spatial/cad-loader/package.json +62 -0
  207. package/node_modules/@nebula-spatial/viewer/CHANGELOG.md +426 -0
  208. package/node_modules/@nebula-spatial/viewer/FBX-MATERIAL-CONVERSION.md +97 -0
  209. package/node_modules/@nebula-spatial/viewer/README.md +1056 -0
  210. package/node_modules/@nebula-spatial/viewer/USD-VISUAL-MATERIAL-SUPPORT.md +89 -0
  211. package/node_modules/@nebula-spatial/viewer/basis/basis_transcoder.js +19 -0
  212. package/node_modules/@nebula-spatial/viewer/basis/basis_transcoder.wasm +0 -0
  213. package/node_modules/@nebula-spatial/viewer/dist/asset-ir-DEOK9SqE.js +382 -0
  214. package/node_modules/@nebula-spatial/viewer/dist/assets/ground-grid.d.ts +6 -0
  215. package/node_modules/@nebula-spatial/viewer/dist/assets/source-types.d.ts +19 -0
  216. package/node_modules/@nebula-spatial/viewer/dist/assets/types.d.ts +393 -0
  217. package/node_modules/@nebula-spatial/viewer/dist/assets/usd-worker-Bom5cjz3.js +1392 -0
  218. package/node_modules/@nebula-spatial/viewer/dist/cad/text.d.ts +2 -0
  219. package/node_modules/@nebula-spatial/viewer/dist/cad/types.d.ts +368 -0
  220. package/node_modules/@nebula-spatial/viewer/dist/index-ByBlfVc0.js +12132 -0
  221. package/node_modules/@nebula-spatial/viewer/dist/index.d.ts +32 -0
  222. package/node_modules/@nebula-spatial/viewer/dist/index.js +26 -0
  223. package/node_modules/@nebula-spatial/viewer/dist/inspection/types.d.ts +112 -0
  224. package/node_modules/@nebula-spatial/viewer/dist/mjcf-visual-DVRa0w90.js +72 -0
  225. package/node_modules/@nebula-spatial/viewer/dist/mujoco-runtime-Dhx6Ua2u.js +463 -0
  226. package/node_modules/@nebula-spatial/viewer/dist/plugins.d.ts +179 -0
  227. package/node_modules/@nebula-spatial/viewer/dist/scene/instances.d.ts +36 -0
  228. package/node_modules/@nebula-spatial/viewer/dist/scene/types.d.ts +258 -0
  229. package/node_modules/@nebula-spatial/viewer/dist/session-B-j6KdA-.js +389 -0
  230. package/node_modules/@nebula-spatial/viewer/dist/session-B4AICTeJ.js +963 -0
  231. package/node_modules/@nebula-spatial/viewer/dist/session-BAG5cDYe.js +9153 -0
  232. package/node_modules/@nebula-spatial/viewer/dist/simulation/mujoco-runtime.d.ts +118 -0
  233. package/node_modules/@nebula-spatial/viewer/dist/simulation/mujoco-wasm-module.d.ts +11 -0
  234. package/node_modules/@nebula-spatial/viewer/dist/simulation/openusd-wasm-module.d.ts +10 -0
  235. package/node_modules/@nebula-spatial/viewer/dist/simulation/physics-runtime-state.d.ts +75 -0
  236. package/node_modules/@nebula-spatial/viewer/dist/simulation/types.d.ts +129 -0
  237. package/node_modules/@nebula-spatial/viewer/dist/simulation/usd-inspection.d.ts +66 -0
  238. package/node_modules/@nebula-spatial/viewer/dist/simulation/usd-query.d.ts +50 -0
  239. package/node_modules/@nebula-spatial/viewer/dist/simulation/usd-resource-policy.d.ts +28 -0
  240. package/node_modules/@nebula-spatial/viewer/dist/types.d.ts +278 -0
  241. package/node_modules/@nebula-spatial/viewer/dist/ui/types.d.ts +48 -0
  242. package/node_modules/@nebula-spatial/viewer/dist/urdf-session-kemAnBn8.js +3231 -0
  243. package/node_modules/@nebula-spatial/viewer/dist/usd-session-QtwGKI7v.js +6771 -0
  244. package/node_modules/@nebula-spatial/viewer/dist/version.d.ts +5 -0
  245. package/node_modules/@nebula-spatial/viewer/dist/viewer.d.ts +2 -0
  246. package/node_modules/@nebula-spatial/viewer/dist/xacro-CYTPS7mh.js +1537 -0
  247. package/node_modules/@nebula-spatial/viewer/openusd/openusd-runtime-manifest.json +15 -0
  248. package/node_modules/@nebula-spatial/viewer/openusd/openusd_probe.js +14 -0
  249. package/node_modules/@nebula-spatial/viewer/openusd/openusd_probe.wasm +0 -0
  250. package/node_modules/@nebula-spatial/viewer/package.json +66 -0
  251. package/package.json +87 -6
@@ -0,0 +1,681 @@
1
+ function w(e) {
2
+ if (e === null || typeof e != "object") return e;
3
+ if (Array.isArray(e)) return e.map((r) => w(r));
4
+ const n = e, t = {};
5
+ for (const r of Object.keys(n)) {
6
+ const o = n[r];
7
+ o !== void 0 && (t[r] = w(o));
8
+ }
9
+ return t;
10
+ }
11
+ function D(e) {
12
+ if (e && typeof e == "object" && !Object.isFrozen(e)) {
13
+ Object.freeze(e);
14
+ for (const n of Object.values(e)) D(n);
15
+ }
16
+ return e;
17
+ }
18
+ function x(e, n) {
19
+ if (e === n) return !0;
20
+ if (typeof e != typeof n || e === null || n === null || typeof e != "object") return !1;
21
+ if (Array.isArray(e) || Array.isArray(n))
22
+ return !Array.isArray(e) || !Array.isArray(n) || e.length !== n.length ? !1 : e.every((i, c) => x(i, n[c]));
23
+ const t = e, r = n, o = Object.keys(t).filter((i) => t[i] !== void 0).sort(), s = Object.keys(r).filter((i) => r[i] !== void 0).sort();
24
+ return o.length !== s.length ? !1 : o.every((i, c) => i === s[c] && x(t[i], r[i]));
25
+ }
26
+ function re(e, n) {
27
+ return JSON.stringify(A(e), null, n);
28
+ }
29
+ function A(e) {
30
+ if (e === null || typeof e != "object") return e;
31
+ if (Array.isArray(e)) return e.map((r) => A(r));
32
+ const n = e, t = {};
33
+ for (const r of Object.keys(n).sort()) {
34
+ const o = n[r];
35
+ o !== void 0 && (t[r] = A(o));
36
+ }
37
+ return t;
38
+ }
39
+ const B = 9, P = {
40
+ scene: "scene_",
41
+ node: "node_",
42
+ asset: "asset_",
43
+ revision: "rev_",
44
+ visualRevision: "vrev_",
45
+ resource: "res_",
46
+ command: "cmd_"
47
+ }, oe = Object.freeze([
48
+ "actor",
49
+ "object",
50
+ "mechanism",
51
+ "support",
52
+ "environment"
53
+ ]), se = Object.freeze({
54
+ actor: "执行主体",
55
+ object: "操作对象",
56
+ mechanism: "可交互机构",
57
+ support: "承载 / 接收对象",
58
+ environment: "环境结构"
59
+ });
60
+ function ie(e, n = []) {
61
+ const t = e.toLowerCase();
62
+ return ["robot", "robot_arm", "human", "actor"].includes(t) ? "actor" : ["ground", "floor", "wall", "workcell", "environment"].includes(t) ? "environment" : ["door", "drawer", "button", "lever", "mechanism"].includes(t) ? "mechanism" : ["pallet", "rack", "conveyor", "workbench", "bin", "basket", "container", "table", "shelf"].includes(t) ? "support" : n.some((r) => /^(door|drawer|button|lever|openable|pressable|rotatable|门|抽屉|按钮|拉杆|可开合|可按压|可转动)$/i.test(r)) ? "mechanism" : n.some((r) => /^(floor|wall|workcell|地面|墙体|工作单元)$/i.test(r)) ? "environment" : n.some((r) => /^(support-surface|receptacle|承载面|支撑面|可容纳)$/i.test(r)) ? "support" : "object";
63
+ }
64
+ const ce = Object.freeze([
65
+ "gaussian-ply",
66
+ "gaussian-spz",
67
+ "gaussian-sog",
68
+ "gaussian-splat",
69
+ "gaussian-ksplat",
70
+ "gaussian-rad"
71
+ ]), ae = Object.freeze([
72
+ "robot",
73
+ "robot_arm",
74
+ "pallet",
75
+ "rack",
76
+ "conveyor",
77
+ "workbench",
78
+ "bin",
79
+ "basket",
80
+ "bottle",
81
+ "package",
82
+ "container",
83
+ "obstacle",
84
+ "ground",
85
+ "other"
86
+ ]);
87
+ function q() {
88
+ return {
89
+ upAxis: "Z",
90
+ forwardAxis: "+X",
91
+ units: { length: "m", mass: "kg" },
92
+ origin: [0, 0, 0]
93
+ };
94
+ }
95
+ function $() {
96
+ return {
97
+ rendering: {
98
+ kind: "preset",
99
+ presetId: "studio-room",
100
+ background: { kind: "environment" },
101
+ rotationRadians: 0,
102
+ intensity: 1
103
+ },
104
+ physics: {
105
+ gravity: [0, 0, -9.81],
106
+ timeStepSeconds: 2e-3,
107
+ solver: { kind: "unknown" },
108
+ colliderVisibility: "selected"
109
+ }
110
+ };
111
+ }
112
+ function d() {
113
+ return { position: [0, 0, 0], rotation: [0, 0, 0, 1], scale: [1, 1, 1] };
114
+ }
115
+ function G(e) {
116
+ return {
117
+ nodeType: "group",
118
+ nodeId: e.nodeId,
119
+ label: e.label,
120
+ localTransform: e.localTransform ?? d(),
121
+ ...e.origin ? { origin: e.origin } : {},
122
+ children: e.children ?? []
123
+ };
124
+ }
125
+ function le(e) {
126
+ return {
127
+ nodeType: "asset",
128
+ nodeId: e.nodeId,
129
+ label: e.label,
130
+ assetRevisionId: e.assetRevisionId,
131
+ role: e.role,
132
+ localTransform: e.localTransform ?? d(),
133
+ ...e.origin ? { origin: e.origin } : {},
134
+ visible: e.visible ?? !0,
135
+ variantSelections: e.variantSelections ?? {},
136
+ ...e.appearance ? { appearance: e.appearance } : {},
137
+ physics: e.physics ?? { kind: "asset-authored" },
138
+ ...e.initialPose ? { initialPose: e.initialPose } : {},
139
+ ...e.semantic ? { semantic: e.semantic } : {}
140
+ };
141
+ }
142
+ function ue(e) {
143
+ return {
144
+ nodeType: "visual",
145
+ nodeId: e.nodeId,
146
+ label: e.label,
147
+ visualRevisionId: e.visualRevisionId,
148
+ localTransform: e.localTransform ?? d(),
149
+ ...e.origin ? { origin: e.origin } : {},
150
+ visible: e.visible ?? !0,
151
+ renderLayer: e.renderLayer ?? "default",
152
+ selectionMode: e.selectionMode ?? "bounds",
153
+ ...e.appearance ? { appearance: e.appearance } : {},
154
+ ...e.semantic ? { semantic: e.semantic } : {}
155
+ };
156
+ }
157
+ function de(e) {
158
+ return {
159
+ nodeType: "placeholder",
160
+ placeholderVersion: 1,
161
+ nodeId: e.nodeId,
162
+ label: e.label,
163
+ localTransform: e.localTransform ?? d(),
164
+ ...e.origin ? { origin: e.origin } : {},
165
+ size: e.size,
166
+ role: e.role ?? "object",
167
+ visible: e.visible ?? !0,
168
+ ...e.assetRevisionId ? { assetRevisionId: e.assetRevisionId } : {},
169
+ ...e.externalRef ? { externalRef: { ...e.externalRef } } : {},
170
+ ...e.semantic ? { semantic: e.semantic } : {}
171
+ };
172
+ }
173
+ function fe(e) {
174
+ return {
175
+ nodeType: "domain",
176
+ nodeId: e.nodeId,
177
+ label: e.label,
178
+ domainId: e.domainId,
179
+ dataVersion: e.dataVersion,
180
+ payload: e.payload,
181
+ localTransform: e.localTransform ?? d(),
182
+ ...e.origin ? { origin: e.origin } : {},
183
+ visible: e.visible ?? !0,
184
+ selectable: e.selectable ?? !0,
185
+ ...e.bounds ? { bounds: e.bounds } : {},
186
+ ...e.semantic ? { semantic: e.semantic } : {}
187
+ };
188
+ }
189
+ function me(e) {
190
+ const n = e.now ?? (/* @__PURE__ */ new Date()).toISOString();
191
+ return {
192
+ schemaVersion: B,
193
+ sceneId: e.sceneId,
194
+ meta: {
195
+ name: e.name,
196
+ ...e.description === void 0 ? {} : { description: e.description },
197
+ createdAt: n,
198
+ updatedAt: n,
199
+ ...e.createdBy ? { createdBy: { ...e.createdBy } } : {}
200
+ },
201
+ coordinateSystem: e.coordinateSystem ?? q(),
202
+ environment: e.environment ?? $(),
203
+ assets: [],
204
+ visualAssets: [],
205
+ root: G({ nodeId: `${P.node}root`, label: e.name }),
206
+ ...e.domains ? { domains: e.domains } : {}
207
+ };
208
+ }
209
+ const _ = Object.freeze([0, 0, 0, 1]), L = Object.freeze([0, 0, 0]);
210
+ function ye(e, n) {
211
+ return e[0] * n[0] + e[1] * n[1] + e[2] * n[2];
212
+ }
213
+ function U(e) {
214
+ return Math.hypot(e[0], e[1], e[2]);
215
+ }
216
+ function J(e) {
217
+ const n = U(e);
218
+ return n === 0 ? L : [e[0] / n, e[1] / n, e[2] / n];
219
+ }
220
+ function K(e) {
221
+ return Math.hypot(e[0], e[1], e[2], e[3]);
222
+ }
223
+ function v(e) {
224
+ const n = K(e);
225
+ return n === 0 || !Number.isFinite(n) ? _ : [e[0] / n, e[1] / n, e[2] / n, e[3] / n];
226
+ }
227
+ function F(e, n) {
228
+ const [t, r, o, s] = e, [i, c, a, l] = n;
229
+ return [
230
+ s * i + t * l + r * a - o * c,
231
+ s * c - t * a + r * l + o * i,
232
+ s * a + t * c - r * i + o * l,
233
+ s * l - t * i - r * c - o * a
234
+ ];
235
+ }
236
+ function N(e, n) {
237
+ const [t, r, o, s] = v(e), [i, c, a] = n, l = 2 * (r * a - o * c), f = 2 * (o * i - t * a), m = 2 * (t * c - r * i);
238
+ return [
239
+ i + s * l + (r * m - o * f),
240
+ c + s * f + (o * l - t * m),
241
+ a + s * m + (t * f - r * l)
242
+ ];
243
+ }
244
+ function he(e) {
245
+ const n = e / 2;
246
+ return [0, 0, Math.sin(n), Math.cos(n)];
247
+ }
248
+ function ve(e) {
249
+ const n = J(e);
250
+ if (Q(n, L))
251
+ throw new Error("Local up direction must be a finite, non-zero vector.");
252
+ if (n[2] >= 1 - 1e-12) return _;
253
+ if (n[2] <= -1 + 1e-12) return [1, 0, 0, 0];
254
+ const t = v([-n[1], n[0], 0, 1 + n[2]]);
255
+ return t[3] < 0 ? [-t[0], -t[1], -t[2], -t[3]] : t;
256
+ }
257
+ function Q(e, n) {
258
+ return e[0] === n[0] && e[1] === n[1] && e[2] === n[2];
259
+ }
260
+ function b(e) {
261
+ const n = [], t = (r) => {
262
+ n.push(r), r.nodeType === "group" && r.children.forEach(t);
263
+ };
264
+ return e.children.forEach(t), n;
265
+ }
266
+ function X(e) {
267
+ return b(e.root).filter((n) => n.nodeType === "asset");
268
+ }
269
+ function Y(e) {
270
+ return b(e.root).filter((n) => n.nodeType === "visual");
271
+ }
272
+ function Z(e) {
273
+ return b(e.root).filter((n) => n.nodeType === "placeholder");
274
+ }
275
+ function be(e) {
276
+ return b(e.root).filter((n) => n.nodeType === "domain");
277
+ }
278
+ function u(e, n) {
279
+ if (e.nodeId === n) return e;
280
+ for (const t of e.children) {
281
+ if (t.nodeId === n) return t;
282
+ if (t.nodeType === "group") {
283
+ const r = u(t, n);
284
+ if (r) return r;
285
+ }
286
+ }
287
+ return null;
288
+ }
289
+ function E(e, n) {
290
+ for (let t = 0; t < e.children.length; t += 1) {
291
+ const r = e.children[t];
292
+ if (r.nodeId === n) return { node: r, parent: e, index: t };
293
+ if (r.nodeType === "group") {
294
+ const o = E(r, n);
295
+ if (o) return o;
296
+ }
297
+ }
298
+ return null;
299
+ }
300
+ function g(e, n) {
301
+ if (e.nodeId === n) return [e];
302
+ for (const t of e.children) {
303
+ if (t.nodeId === n) return [e, t];
304
+ if (t.nodeType === "group") {
305
+ const r = g(t, n);
306
+ if (r.length > 0) return [e, ...r];
307
+ }
308
+ }
309
+ return [];
310
+ }
311
+ function Te(e, n, t) {
312
+ const r = g(e, n);
313
+ return {
314
+ hidden: r.some((o) => {
315
+ var s;
316
+ return ((s = t[o.nodeId]) == null ? void 0 : s.hidden) === !0;
317
+ }),
318
+ locked: r.some((o) => {
319
+ var s;
320
+ return ((s = t[o.nodeId]) == null ? void 0 : s.locked) === !0;
321
+ })
322
+ };
323
+ }
324
+ function ge(e, n, t) {
325
+ const r = g(e, n), o = r[r.length - 1];
326
+ return !o || r.some((s) => {
327
+ var i;
328
+ return ((i = t[s.nodeId]) == null ? void 0 : i.hidden) === !0;
329
+ }) ? !1 : !("visible" in o) || o.visible;
330
+ }
331
+ function O(e, n, t) {
332
+ return g(e, n).some((r) => {
333
+ var o;
334
+ return ((o = t[r.nodeId]) == null ? void 0 : o.locked) === !0;
335
+ });
336
+ }
337
+ function p(e, n, t) {
338
+ if (e.nodeId === n) {
339
+ const r = t(e);
340
+ return r && r.nodeType === "group" ? { root: r, node: r } : { root: e, node: null };
341
+ }
342
+ for (let r = 0; r < e.children.length; r += 1) {
343
+ const o = e.children[r];
344
+ if (o.nodeId === n) {
345
+ const s = t(o);
346
+ if (!s) return { root: e, node: null };
347
+ const i = [...e.children];
348
+ return i[r] = s, { root: { ...e, children: i }, node: s };
349
+ }
350
+ if (o.nodeType === "group") {
351
+ const s = p(o, n, t);
352
+ if (s.node) {
353
+ const i = [...e.children];
354
+ return i[r] = s.root, { root: { ...e, children: i }, node: s.node };
355
+ }
356
+ }
357
+ }
358
+ return { root: e, node: null };
359
+ }
360
+ function pe(e, n, t) {
361
+ var o;
362
+ const r = p(e, n, (s) => s.nodeType === "asset" ? t(s) : s);
363
+ return {
364
+ root: r.root,
365
+ node: ((o = r.node) == null ? void 0 : o.nodeType) === "asset" ? r.node : null
366
+ };
367
+ }
368
+ function Ie(e, n, t = e.nodeId) {
369
+ if (u(e, n.nodeId)) return null;
370
+ if (t === e.nodeId)
371
+ return { ...e, children: [...e.children, n] };
372
+ const r = E(e, t);
373
+ if (!r || r.node.nodeType !== "group") return null;
374
+ const o = p(e, t, (s) => s.nodeType === "group" ? { ...s, children: [...s.children, n] } : s);
375
+ return o.node ? o.root : null;
376
+ }
377
+ function Se(e, n) {
378
+ const t = E(e, n);
379
+ if (!t) return { root: e, removed: null };
380
+ const r = [...t.parent.children];
381
+ return r.splice(t.index, 1), t.parent.nodeId === e.nodeId ? { root: { ...e, children: r }, removed: t.node } : { root: p(e, t.parent.nodeId, (s) => s.nodeType === "group" ? { ...s, children: r } : s).root, removed: t.node };
382
+ }
383
+ function Re(e) {
384
+ return [.../* @__PURE__ */ new Set([
385
+ ...X(e).map((n) => n.assetRevisionId),
386
+ ...Y(e).map((n) => n.visualRevisionId),
387
+ ...Z(e).flatMap((n) => n.assetRevisionId ? [n.assetRevisionId] : [])
388
+ ])].sort();
389
+ }
390
+ function Ae(e, n) {
391
+ const t = u(e.root, n);
392
+ return (t == null ? void 0 : t.nodeType) === "asset" ? t : null;
393
+ }
394
+ function Ne(e, n) {
395
+ const t = u(e.root, n);
396
+ return (t == null ? void 0 : t.nodeType) === "visual" ? t : null;
397
+ }
398
+ function Ee(e, n) {
399
+ const t = u(e.root, n);
400
+ return (t == null ? void 0 : t.nodeType) === "placeholder" ? t : null;
401
+ }
402
+ function ze(e, n) {
403
+ const t = u(e.root, n);
404
+ return (t == null ? void 0 : t.nodeType) === "domain" ? t : null;
405
+ }
406
+ function H(e, n) {
407
+ return e.assets.find((t) => t.revisionId === n) ?? null;
408
+ }
409
+ function ke(e, n) {
410
+ return e.assets.find((t) => t.assetId === n) ?? null;
411
+ }
412
+ function we(e, n) {
413
+ return H(e, n.assetRevisionId);
414
+ }
415
+ function W(e, n) {
416
+ return e.visualAssets.find((t) => t.visualRevisionId === n) ?? null;
417
+ }
418
+ function xe(e, n) {
419
+ return e.visualAssets.find((t) => t.assetId === n) ?? null;
420
+ }
421
+ function Oe(e, n) {
422
+ return W(e, n.visualRevisionId);
423
+ }
424
+ function ee(e) {
425
+ var n;
426
+ return ((n = e.origin) == null ? void 0 : n.local) ?? [0, 0, 0];
427
+ }
428
+ function T(e) {
429
+ const n = ee(e);
430
+ return {
431
+ position: [
432
+ n[0] === 0 ? 0 : -n[0],
433
+ n[1] === 0 ? 0 : -n[1],
434
+ n[2] === 0 ? 0 : -n[2]
435
+ ],
436
+ rotation: [0, 0, 0, 1],
437
+ scale: [1, 1, 1]
438
+ };
439
+ }
440
+ function je(e, n, t) {
441
+ const r = [
442
+ t[0] - n[0],
443
+ t[1] - n[1],
444
+ t[2] - n[2]
445
+ ], o = [
446
+ r[0] * e.scale[0],
447
+ r[1] * e.scale[1],
448
+ r[2] * e.scale[2]
449
+ ], s = N(e.rotation, o);
450
+ return {
451
+ ...e,
452
+ position: [
453
+ e.position[0] + s[0],
454
+ e.position[1] + s[1],
455
+ e.position[2] + s[2]
456
+ ],
457
+ rotation: [...e.rotation],
458
+ scale: [...e.scale]
459
+ };
460
+ }
461
+ function y(e, n) {
462
+ const t = V(e, n);
463
+ if (!t)
464
+ throw new ne(
465
+ "Combined transform contains shear and cannot be represented as a single TRS LocalTransform."
466
+ );
467
+ return t;
468
+ }
469
+ class ne extends Error {
470
+ constructor(n) {
471
+ super(n), this.name = "SceneTransformNotRepresentableError";
472
+ }
473
+ }
474
+ function V(e, n) {
475
+ if (j(e)) return n;
476
+ if (j(n)) return e;
477
+ const t = [
478
+ n.position[0] * e.scale[0],
479
+ n.position[1] * e.scale[1],
480
+ n.position[2] * e.scale[2]
481
+ ], r = N(e.rotation, t), o = {
482
+ position: [
483
+ e.position[0] + r[0],
484
+ e.position[1] + r[1],
485
+ e.position[2] + r[2]
486
+ ],
487
+ rotation: v(F(e.rotation, n.rotation)),
488
+ scale: [
489
+ e.scale[0] * n.scale[0],
490
+ e.scale[1] * n.scale[1],
491
+ e.scale[2] * n.scale[2]
492
+ ]
493
+ };
494
+ return M(
495
+ C(h(e), h(n)),
496
+ h(o)
497
+ ) ? o : null;
498
+ }
499
+ function j(e) {
500
+ return e.position[0] === 0 && e.position[1] === 0 && e.position[2] === 0 && e.rotation[0] === 0 && e.rotation[1] === 0 && e.rotation[2] === 0 && e.rotation[3] === 1 && e.scale[0] === 1 && e.scale[1] === 1 && e.scale[2] === 1;
501
+ }
502
+ function te(e, n) {
503
+ const t = (r, o) => {
504
+ const s = y(o, r.localTransform);
505
+ if (r.nodeId === n) return s;
506
+ if (r.nodeType !== "group") return null;
507
+ const i = y(s, T(r));
508
+ for (const c of r.children) {
509
+ const a = t(c, i);
510
+ if (a) return a;
511
+ }
512
+ return null;
513
+ };
514
+ return t(e, d());
515
+ }
516
+ function _e(e, n) {
517
+ const t = te(e, n), r = u(e, n);
518
+ return t && r ? y(t, T(r)) : null;
519
+ }
520
+ function Le(e, n) {
521
+ const t = (r, o) => {
522
+ const s = y(o, r.localTransform);
523
+ for (const i of r.children) {
524
+ if (i.nodeId === n)
525
+ return y(s, T(r));
526
+ if (i.nodeType !== "group") continue;
527
+ const c = y(s, T(i)), a = t(i, c);
528
+ if (a) return a;
529
+ }
530
+ return null;
531
+ };
532
+ return t(e, d());
533
+ }
534
+ function Fe(e, n) {
535
+ if (n.scale.some((i) => Math.abs(i) < 1e-12)) return null;
536
+ const t = v([
537
+ -n.rotation[0],
538
+ -n.rotation[1],
539
+ -n.rotation[2],
540
+ n.rotation[3]
541
+ ]), r = [
542
+ e.position[0] - n.position[0],
543
+ e.position[1] - n.position[1],
544
+ e.position[2] - n.position[2]
545
+ ], o = N(t, r), s = {
546
+ position: [
547
+ o[0] / n.scale[0],
548
+ o[1] / n.scale[1],
549
+ o[2] / n.scale[2]
550
+ ],
551
+ rotation: v(F(t, e.rotation)),
552
+ scale: [
553
+ e.scale[0] / n.scale[0],
554
+ e.scale[1] / n.scale[1],
555
+ e.scale[2] / n.scale[2]
556
+ ]
557
+ };
558
+ return M(
559
+ C(h(n), h(s)),
560
+ h(e)
561
+ ) ? s : null;
562
+ }
563
+ function Ve(e) {
564
+ const n = [], t = (r, o, s) => {
565
+ const i = V(o, r.localTransform);
566
+ if (!i) {
567
+ n.push({ parentNodeId: s, nodeId: r.nodeId });
568
+ return;
569
+ }
570
+ if (r.nodeType === "group")
571
+ for (const c of r.children) t(c, i, r.nodeId);
572
+ };
573
+ for (const r of e.children) t(r, e.localTransform, e.nodeId);
574
+ return n;
575
+ }
576
+ function h(e) {
577
+ const [n, t, r, o] = v(e.rotation), s = n * n, i = t * t, c = r * r, a = n * t, l = n * r, f = t * r, m = o * n, z = o * t, k = o * r, [I, S, R] = e.scale;
578
+ return [
579
+ (1 - 2 * (i + c)) * I,
580
+ 2 * (a - k) * S,
581
+ 2 * (l + z) * R,
582
+ e.position[0],
583
+ 2 * (a + k) * I,
584
+ (1 - 2 * (s + c)) * S,
585
+ 2 * (f - m) * R,
586
+ e.position[1],
587
+ 2 * (l - z) * I,
588
+ 2 * (f + m) * S,
589
+ (1 - 2 * (s + i)) * R,
590
+ e.position[2],
591
+ 0,
592
+ 0,
593
+ 0,
594
+ 1
595
+ ];
596
+ }
597
+ function C(e, n) {
598
+ const t = new Array(16).fill(0);
599
+ for (let r = 0; r < 4; r += 1)
600
+ for (let o = 0; o < 4; o += 1) {
601
+ let s = 0;
602
+ for (let i = 0; i < 4; i += 1)
603
+ s += e[r * 4 + i] * n[i * 4 + o];
604
+ t[r * 4 + o] = s;
605
+ }
606
+ return t;
607
+ }
608
+ function M(e, n) {
609
+ return e.every((t, r) => Math.abs(t - n[r]) <= 1e-8);
610
+ }
611
+ function Ce(e, n, t) {
612
+ const r = u(e, n);
613
+ return !!r && (O(e, n, t) || r.nodeType === "group" && b(r).some(
614
+ (o) => O(e, o.nodeId, t)
615
+ ));
616
+ }
617
+ export {
618
+ V as $,
619
+ ae as A,
620
+ E as B,
621
+ Ee as C,
622
+ Ne as D,
623
+ W as E,
624
+ xe as F,
625
+ ce as G,
626
+ Ie as H,
627
+ P as I,
628
+ be as J,
629
+ Z as K,
630
+ Y as L,
631
+ Fe as M,
632
+ Le as N,
633
+ Se as O,
634
+ re as P,
635
+ pe as Q,
636
+ p as R,
637
+ B as S,
638
+ Oe as T,
639
+ te as U,
640
+ Ce as V,
641
+ ge as W,
642
+ ve as X,
643
+ ee as Y,
644
+ _e as Z,
645
+ N as _,
646
+ w as a,
647
+ O as a0,
648
+ Te as a1,
649
+ Ve as a2,
650
+ g as a3,
651
+ J as a4,
652
+ ye as a5,
653
+ F as a6,
654
+ T as a7,
655
+ je as a8,
656
+ oe as b,
657
+ de as c,
658
+ D as d,
659
+ se as e,
660
+ we as f,
661
+ Re as g,
662
+ y as h,
663
+ q as i,
664
+ $ as j,
665
+ d as k,
666
+ X as l,
667
+ le as m,
668
+ me as n,
669
+ fe as o,
670
+ G as p,
671
+ he as q,
672
+ ue as r,
673
+ x as s,
674
+ ie as t,
675
+ H as u,
676
+ ke as v,
677
+ b as w,
678
+ Ae as x,
679
+ ze as y,
680
+ u as z
681
+ };