@nebula-spatial/studio 0.1.1 → 0.1.2
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.
- package/README.md +2 -0
- package/dist/{builders-BAXRR5o5.js → builders-lydx4-Rh.js} +1 -1
- package/dist/core/session-persistence-controller.d.ts +55 -0
- package/dist/doc/placement-policy.d.ts +4 -0
- package/dist/editor/editor.d.ts +3 -1
- package/dist/editor/index.d.ts +2 -0
- package/dist/editor/session-persistence.d.ts +54 -0
- package/dist/editor.js +727 -490
- package/dist/{export-evidence-DMNRhgL9.js → export-evidence-z2Ne7Trf.js} +654 -972
- package/dist/generalization.js +2 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +226 -219
- package/dist/{mjcf-visual-Bt4bUxd1.js → mjcf-visual-IOy-ucto.js} +1 -1
- package/dist/persist/indexeddb-store.d.ts +22 -2
- package/dist/persist/session.d.ts +22 -0
- package/dist/persist/snapshot.d.ts +24 -0
- package/dist/{physics-facts-tfQYyNTD.js → physics-facts-D-URIBrt.js} +8 -7
- package/dist/{placement-policy-DY_FNRDu.js → placement-policy-C6dV6Tf-.js} +161 -141
- package/dist/ports/persistence.d.ts +45 -1
- package/dist/project/contracts.d.ts +3 -0
- package/dist/remote-asset-resolver-D-UeyDMD.js +311 -0
- package/dist/{scene-graph-DBLKAhxa.js → scene-graph-DVOXjMmp.js} +2 -2
- package/dist/{scene-session-Cy6vDJ1l.js → scene-session-PhoFXFCY.js} +3365 -3340
- package/dist/scene.js +2 -2
- package/dist/{session-BRBrCLdd.js → session-2bp8YOA4.js} +2 -2
- package/dist/{session-q3uuG7OP.js → session-B3WbC7Y2.js} +1 -1
- package/dist/session-B9kEf4xN.js +915 -0
- package/dist/{session-DI5tPJxn.js → session-DYThdzLZ.js} +4 -4
- package/dist/studio/index.d.ts +5 -0
- package/dist/studio/indexeddb-persistence.d.ts +2 -0
- package/dist/studio/indexeddb-session-persistence.d.ts +11 -0
- package/dist/studio/scene-package-asset-sources.d.ts +14 -0
- package/dist/studio.js +1422 -1220
- package/dist/{urdf-session-CQir2nb2.js → urdf-session-CRXL4bHf.js} +3 -3
- package/dist/{usd-session-DZJnEEOs.js → usd-session-CTzInpNy.js} +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/view/scene-session.d.ts +5 -1
- package/dist/{xacro-DLRXyk60.js → xacro-IpPHTMYs.js} +1 -1
- package/package.json +1 -1
- package/dist/asset-source-BExlEcRt.js +0 -444
- package/dist/editorial-BkAFWfbg.js +0 -83
- package/dist/remote-asset-resolver-Cb8cfNmw.js +0 -136
package/dist/index.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { b as _t, c as vt, s as U, a as Rt, v as Ae, d as Nt, e as
|
|
2
|
-
import { C as Hs, h as Ys, D as Js, S as Zs, i as Ws, j as Xs, k as qs, l as Qs, m as eo, n as to, o as no, p as so, q as oo, r as ro, t as io, u as ao, w as co, x as lo, y as uo, z as fo, A as mo, B as ho, E as po, F as go, G as So, H as Eo, I as yo, J as Io, K as Co, L as Ao, M as bo, N as _o, O as vo, P as Ro, Q as No, R as
|
|
3
|
-
import { q as wt, c as Mt, l as
|
|
4
|
-
import { A as Ko, G as Ho, I as Yo, b as Jo, e as Zo, f as Wo, g as Xo, h as qo, i as Qo, j as er, k as tr, m as nr, n as sr, o as or, p as rr, r as ir, s as ar, t as cr, u as lr, v as ur, x as dr, y as fr, z as mr, B as hr, C as pr, D as gr, E as Sr, F as Er, H as yr, J as Ir, K as Cr, L as Ar, M as br, N as _r, O as vr, P as Rr, Q as Nr, R as
|
|
5
|
-
import { n as ue, a as w, r as Ut, m as _e, b as rt, c as Lt } from "./
|
|
6
|
-
import { S as
|
|
7
|
-
import { r as He, s as ve, i as Ie, a as kt, n as Ce, b as $t, c as K, p as Ft, d as Gt, e as Vt, f as
|
|
8
|
-
import { I as
|
|
1
|
+
import { b as _t, c as vt, s as U, a as Rt, v as Ae, d as Nt, e as Tt, f as Pt, g as be } from "./builders-lydx4-Rh.js";
|
|
2
|
+
import { C as Hs, h as Ys, D as Js, S as Zs, i as Ws, j as Xs, k as qs, l as Qs, m as eo, n as to, o as no, p as so, q as oo, r as ro, t as io, u as ao, w as co, x as lo, y as uo, z as fo, A as mo, B as ho, E as po, F as go, G as So, H as Eo, I as yo, J as Io, K as Co, L as Ao, M as bo, N as _o, O as vo, P as Ro, Q as No, R as To, T as Po, U as wo, V as Mo, W as Oo, X as xo, Y as Do, Z as Uo, _ as Lo, $ as ko, a0 as $o, a1 as Fo, a2 as Go, a3 as Vo, a4 as Bo, a5 as zo } from "./builders-lydx4-Rh.js";
|
|
3
|
+
import { q as wt, c as Mt, l as Ot, d as je, a as Ke, w as xt, S as Dt } from "./scene-graph-DVOXjMmp.js";
|
|
4
|
+
import { A as Ko, G as Ho, I as Yo, b as Jo, e as Zo, f as Wo, g as Xo, h as qo, i as Qo, j as er, k as tr, m as nr, n as sr, o as or, p as rr, r as ir, s as ar, t as cr, u as lr, v as ur, x as dr, y as fr, z as mr, B as hr, C as pr, D as gr, E as Sr, F as Er, H as yr, J as Ir, K as Cr, L as Ar, M as br, N as _r, O as vr, P as Rr, Q as Nr, R as Tr, T as Pr, U as wr } from "./scene-graph-DVOXjMmp.js";
|
|
5
|
+
import { n as ue, a as w, r as Ut, m as _e, b as rt, c as it, d as Lt } from "./session-B9kEf4xN.js";
|
|
6
|
+
import { S as Or, e as xr, f as Dr, g as Ur, h as Lr, i as kr, j as $r, k as Fr, l as Gr, o as Vr, p as Br, q as zr, s as jr, t as Kr, u as Hr, v as Yr, w as Jr, x as Zr, y as Wr, z as Xr, A as qr, B as Qr, C as ei, D as ti, E as ni, F as si, G as oi, H as ri, I as ii, J as ai, K as ci, L as li, M as ui } from "./session-B9kEf4xN.js";
|
|
7
|
+
import { r as He, s as ve, i as Ie, a as kt, n as Ce, b as $t, c as K, p as Ft, d as Gt, e as Vt, f as at, g as Bt, h as zt } from "./export-evidence-z2Ne7Trf.js";
|
|
8
|
+
import { I as fi, j as mi, S as hi, k as pi, l as gi, m as Si, o as Ei, q as yi, t as Ii, u as Ci, v as Ai, w as bi, x as _i, y as vi, z as Ri, A as Ni, B as Ti, C as Pi, D as wi, E as Mi, F as Oi, G as xi, H as Di, J as Ui, K as Li, L as ki, M as $i, N as Fi, O as Gi, P as Vi, Q as Bi, R as zi, T as ji, U as Ki, V as Hi, W as Yi, X as Ji, Y as Zi, Z as Wi, _ as Xi } from "./export-evidence-z2Ne7Trf.js";
|
|
9
9
|
import re from "jszip";
|
|
10
|
-
import { D as
|
|
11
|
-
import { a as
|
|
12
|
-
|
|
13
|
-
import { D as pa, N as ga, g as Sa, a as Ea, b as ya, c as Ia, n as Ca, d as Aa, r as ba } from "./physics-facts-tfQYyNTD.js";
|
|
14
|
-
const jt = "0.1.1", Kt = "@nebula-spatial/studio", Ye = "__NEBULA_SPATIAL_SIM_STUDIO_BANNER_PRINTED__";
|
|
10
|
+
import { D as Qi, a as ea, b as ta, c as na, d as sa, e as oa, f as ra, g as ia, h as aa, i as ca, j as la, m as ua, n as da, k as fa, p as ma, l as ha, s as pa, o as ga, u as Sa } from "./placement-policy-C6dV6Tf-.js";
|
|
11
|
+
import { D as ya, N as Ia, g as Ca, a as Aa, b as ba, c as _a, n as va, d as Ra, r as Na } from "./physics-facts-D-URIBrt.js";
|
|
12
|
+
const jt = "0.1.2", Kt = "@nebula-spatial/studio", Ye = "__NEBULA_SPATIAL_SIM_STUDIO_BANNER_PRINTED__";
|
|
15
13
|
function Je() {
|
|
16
14
|
const e = `%c ${Kt} %c v${jt} `;
|
|
17
15
|
console.log(e, "background:#111827;color:#ffffff;padding:4px 10px;border-radius:4px 0 0 4px;font-weight:700;", "background:#6366F1;color:#ffffff;padding:4px 10px;border-radius:0 4px 4px 0;font-weight:700;");
|
|
@@ -22,7 +20,7 @@ try {
|
|
|
22
20
|
} catch {
|
|
23
21
|
Je();
|
|
24
22
|
}
|
|
25
|
-
function
|
|
23
|
+
function As(e, t) {
|
|
26
24
|
if (!Number.isInteger(t.seed)) throw new Error("Scatter seed must be an integer.");
|
|
27
25
|
if (!Number.isInteger(t.count) || t.count <= 0) throw new Error("Scatter count must be a positive integer.");
|
|
28
26
|
if (t.region.minX > t.region.maxX || t.region.minY > t.region.maxY)
|
|
@@ -64,7 +62,7 @@ function Ht(e) {
|
|
|
64
62
|
function fe(e, t, n) {
|
|
65
63
|
return e + (t - e) * n;
|
|
66
64
|
}
|
|
67
|
-
function
|
|
65
|
+
function bs(e, t) {
|
|
68
66
|
const n = He(e), o = He(t), s = ue(n.locator), r = ue(o.locator), c = w(s), i = w(r), a = c !== i, l = !a && n.sha256 !== o.sha256, u = [];
|
|
69
67
|
a && u.push({
|
|
70
68
|
kind: "entry-locator-changed",
|
|
@@ -148,7 +146,7 @@ function Jt(e) {
|
|
|
148
146
|
provenance: { ...e.provenance }
|
|
149
147
|
};
|
|
150
148
|
}
|
|
151
|
-
function
|
|
149
|
+
function _s(e) {
|
|
152
150
|
const t = e.resources.find((n) => n.resourceId === e.entryResourceId);
|
|
153
151
|
if (!t)
|
|
154
152
|
throw new Error(`Visual revision ${e.visualRevisionId} is missing its entry resource.`);
|
|
@@ -213,7 +211,7 @@ const qt = /* @__PURE__ */ new Set([
|
|
|
213
211
|
".sog",
|
|
214
212
|
".rad"
|
|
215
213
|
]);
|
|
216
|
-
async function
|
|
214
|
+
async function vs(e, t = {}) {
|
|
217
215
|
const n = [];
|
|
218
216
|
let o = await Qt(e, n);
|
|
219
217
|
const s = await en(o, n);
|
|
@@ -540,23 +538,23 @@ const fn = {
|
|
|
540
538
|
inertiaCount: 0,
|
|
541
539
|
materialCount: 0
|
|
542
540
|
};
|
|
543
|
-
async function
|
|
544
|
-
var W, X, b, V, H, Y,
|
|
545
|
-
const t = performance.now(), n = (/* @__PURE__ */ new Date()).toISOString(), o = [], s = (
|
|
541
|
+
async function Rs(e) {
|
|
542
|
+
var W, X, b, V, H, Y, Te, Pe, we, Me, Oe, xe, De, Ue, Le, ke, $e, Fe, Ge, Ve, Be;
|
|
543
|
+
const t = performance.now(), n = (/* @__PURE__ */ new Date()).toISOString(), o = [], s = (O) => {
|
|
546
544
|
var ze;
|
|
547
545
|
o.push({
|
|
548
|
-
...
|
|
549
|
-
primPath:
|
|
550
|
-
instanceId:
|
|
546
|
+
...O,
|
|
547
|
+
primPath: O.primPath ?? null,
|
|
548
|
+
instanceId: O.instanceId ?? ((ze = e.instance) == null ? void 0 : ze.nodeId) ?? null,
|
|
551
549
|
execution: {
|
|
552
550
|
at: n,
|
|
553
551
|
durationMs: Math.max(0, performance.now() - t),
|
|
554
|
-
engine:
|
|
555
|
-
...
|
|
552
|
+
engine: O.engine ?? "sim-studio-inspection",
|
|
553
|
+
...O.detail ? { detail: O.detail } : {}
|
|
556
554
|
}
|
|
557
555
|
});
|
|
558
|
-
}, r = (...
|
|
559
|
-
|
|
556
|
+
}, r = (...O) => P(s, ...O), c = await En(e), i = c.facts, a = e.runtime, l = ve(e.bundle), u = Pn(e.runtime), f = L((W = e.runtime) == null ? void 0 : W.physicsProperties), m = $(f == null ? void 0 : f.bodies), d = _n(e.metadata, u), g = L(u == null ? void 0 : u.stage), p = vn(i, u, e.instance), S = $(u == null ? void 0 : u.prims), I = e.instance ? Un(p, d.defaultPrim) : null;
|
|
557
|
+
P(
|
|
560
558
|
s,
|
|
561
559
|
"PKG_ENTRY_PRESENT",
|
|
562
560
|
"asset-package",
|
|
@@ -566,7 +564,7 @@ async function Ns(e) {
|
|
|
566
564
|
c.entryFound ? `资产入口存在:${l}` : `资产包中缺少入口:${l}`,
|
|
567
565
|
c.entryFound ? "无需处理。" : "重新导入完整资产包,并确保入口文件位于包内。",
|
|
568
566
|
{ entry: l, fileCount: e.bundle.files.length }
|
|
569
|
-
), mn(r, i, c, l),
|
|
567
|
+
), mn(r, i, c, l), P(
|
|
570
568
|
s,
|
|
571
569
|
"STAGE_LOADED",
|
|
572
570
|
"stage",
|
|
@@ -576,7 +574,7 @@ async function Ns(e) {
|
|
|
576
574
|
e.runtime ? e.runtime.phase === "ready" ? "Viewer 已完成当前 USD 视觉与 Stage 解析。" : `Viewer 当前加载阶段为 ${e.runtime.phase}。` : "对象尚未进入 Viewer 场景,真实 Stage 加载状态未知。",
|
|
577
575
|
((X = e.runtime) == null ? void 0 : X.phase) === "failed" ? "检查资产依赖、USD 版本、浏览器控制台和 Viewer 错误详情。" : "无需处理。",
|
|
578
576
|
{ phase: ((b = e.runtime) == null ? void 0 : b.phase) ?? null }
|
|
579
|
-
),
|
|
577
|
+
), P(
|
|
580
578
|
s,
|
|
581
579
|
"STAGE_DEFAULTPRIM",
|
|
582
580
|
"stage",
|
|
@@ -588,16 +586,16 @@ async function Ns(e) {
|
|
|
588
586
|
{ defaultPrim: d.defaultPrim },
|
|
589
587
|
I
|
|
590
588
|
);
|
|
591
|
-
const C = d.defaultPrim, v = !!C && i.prims.some((
|
|
592
|
-
|
|
589
|
+
const C = d.defaultPrim, v = !!C && i.prims.some((O) => O.path === C), _ = !!C && S.some((O) => N(O.path) === C), R = v || _, M = S.length > 0, k = i.textual && i.prims.length > 0 && i.dependencies !== null && i.dependencies.references.length === 0, x = R ? "pass" : M || k ? "fail" : "unknown";
|
|
590
|
+
P(
|
|
593
591
|
s,
|
|
594
592
|
"STAGE_ROOT_PRIM",
|
|
595
593
|
"stage",
|
|
596
|
-
|
|
597
|
-
|
|
594
|
+
x,
|
|
595
|
+
x === "fail" ? "error" : "info",
|
|
598
596
|
_ ? "runtime" : v ? "authored" : M ? "runtime" : "probed",
|
|
599
|
-
R ? `根 Prim 存在:${C}` :
|
|
600
|
-
|
|
597
|
+
R ? `根 Prim 存在:${C}` : x === "fail" ? `组合后 Stage 中未找到 defaultPrim 对应的根 Prim:${C ?? "not-authored"}。` : "当前可读入口层没有定位到根 Prim;组合后的运行时 Prim 树尚未取得。",
|
|
598
|
+
x === "fail" ? "校正 defaultPrim,或在默认层中补齐对应根 Prim。" : "等待真实 Stage 完成组合后重新检查。",
|
|
601
599
|
{
|
|
602
600
|
root: C,
|
|
603
601
|
authoredPrimCount: i.prims.length,
|
|
@@ -605,7 +603,7 @@ async function Ns(e) {
|
|
|
605
603
|
staticHierarchyComplete: k
|
|
606
604
|
},
|
|
607
605
|
I
|
|
608
|
-
),
|
|
606
|
+
), P(
|
|
609
607
|
s,
|
|
610
608
|
"STAGE_UPAXIS",
|
|
611
609
|
"stage",
|
|
@@ -615,7 +613,7 @@ async function Ns(e) {
|
|
|
615
613
|
d.upAxis ? `Stage upAxis = ${d.upAxis}` : "未取得 upAxis。",
|
|
616
614
|
d.upAxis ? "无需处理。" : '在根层声明 `upAxis = "Z"` 或 `"Y"`。',
|
|
617
615
|
{ upAxis: d.upAxis }
|
|
618
|
-
),
|
|
616
|
+
), P(
|
|
619
617
|
s,
|
|
620
618
|
"STAGE_METERS_PER_UNIT",
|
|
621
619
|
"stage",
|
|
@@ -625,19 +623,19 @@ async function Ns(e) {
|
|
|
625
623
|
d.metersPerUnit !== null ? `metersPerUnit = ${d.metersPerUnit}` : "未取得 metersPerUnit。",
|
|
626
624
|
d.metersPerUnit !== null && d.metersPerUnit > 0 ? "无需处理。" : "声明有限且大于 0 的 metersPerUnit。",
|
|
627
625
|
{ metersPerUnit: d.metersPerUnit }
|
|
628
|
-
),
|
|
626
|
+
), P(
|
|
629
627
|
s,
|
|
630
628
|
"STAGE_KILOGRAMS_PER_UNIT",
|
|
631
629
|
"stage",
|
|
632
630
|
d.kilogramsPerUnit !== null ? d.kilogramsPerUnit > 0 ? "pass" : "fail" : "unknown",
|
|
633
631
|
d.kilogramsPerUnit !== null && d.kilogramsPerUnit <= 0 ? "error" : "info",
|
|
634
|
-
G(g == null ? void 0 : g.kilogramsPerUnit) !== null ? "runtime" : ((
|
|
632
|
+
G(g == null ? void 0 : g.kilogramsPerUnit) !== null ? "runtime" : ((Te = e.metadata) == null ? void 0 : Te.kilogramsPerUnit) !== void 0 ? "authored" : "probed",
|
|
635
633
|
d.kilogramsPerUnit !== null ? `kilogramsPerUnit = ${d.kilogramsPerUnit}` : "未取得 kilogramsPerUnit。",
|
|
636
634
|
d.kilogramsPerUnit !== null && d.kilogramsPerUnit > 0 ? "无需处理。" : "声明有限且大于 0 的 kilogramsPerUnit。",
|
|
637
635
|
{ kilogramsPerUnit: d.kilogramsPerUnit }
|
|
638
636
|
);
|
|
639
|
-
const D = wn(u, e.scene, (
|
|
640
|
-
|
|
637
|
+
const D = wn(u, e.scene, (Pe = e.instance) == null ? void 0 : Pe.nodeId);
|
|
638
|
+
P(
|
|
641
639
|
s,
|
|
642
640
|
"STAGE_EXTENT",
|
|
643
641
|
"stage",
|
|
@@ -649,7 +647,7 @@ async function Ns(e) {
|
|
|
649
647
|
{ runtimeBounds: D, authoredExtent: d.extent }
|
|
650
648
|
);
|
|
651
649
|
const h = Rn(i, u);
|
|
652
|
-
|
|
650
|
+
P(
|
|
653
651
|
s,
|
|
654
652
|
"GEOM_MESH_COUNT",
|
|
655
653
|
"geometry",
|
|
@@ -659,7 +657,7 @@ async function Ns(e) {
|
|
|
659
657
|
h.meshCount === null ? "未取得网格数量。" : `检测到 ${h.meshCount} 个 Mesh Prim。`,
|
|
660
658
|
h.meshCount ? "无需处理。" : "确认入口层是否包含可渲染几何,或显式标记为无视觉几何。",
|
|
661
659
|
{ meshCount: h.meshCount }
|
|
662
|
-
),
|
|
660
|
+
), P(
|
|
663
661
|
s,
|
|
664
662
|
"GEOM_VERTEX_COUNT",
|
|
665
663
|
"geometry",
|
|
@@ -669,7 +667,7 @@ async function Ns(e) {
|
|
|
669
667
|
h.vertexCount === null ? "未取得顶点数。" : `检测到 ${h.vertexCount} 个顶点。`,
|
|
670
668
|
h.vertexCount ? "无需处理。" : "修复空 Mesh 或补齐顶点数据。",
|
|
671
669
|
{ vertexCount: h.vertexCount }
|
|
672
|
-
),
|
|
670
|
+
), P(
|
|
673
671
|
s,
|
|
674
672
|
"GEOM_TRIANGLE_COUNT",
|
|
675
673
|
"geometry",
|
|
@@ -679,7 +677,7 @@ async function Ns(e) {
|
|
|
679
677
|
h.triangleCount === null ? "未取得三角面数。" : `检测到 ${h.triangleCount} 个三角面。`,
|
|
680
678
|
h.triangleCount ? "无需处理。" : "检查 faceVertexCounts/faceVertexIndices 是否完整。",
|
|
681
679
|
{ triangleCount: h.triangleCount }
|
|
682
|
-
),
|
|
680
|
+
), P(
|
|
683
681
|
s,
|
|
684
682
|
"GEOM_DEGENERATE_FACES",
|
|
685
683
|
"geometry",
|
|
@@ -696,30 +694,30 @@ async function Ns(e) {
|
|
|
696
694
|
},
|
|
697
695
|
void 0,
|
|
698
696
|
E(h.collisionDegenerateTriangles ? "physics" : "visual", "never")
|
|
699
|
-
),
|
|
697
|
+
), P(
|
|
700
698
|
s,
|
|
701
699
|
"GEOM_NORMALS_WINDING",
|
|
702
700
|
"geometry",
|
|
703
701
|
h.normals === null ? "unknown" : ((we = h.orientation) == null ? void 0 : we.toLowerCase()) === "lefthanded" ? "conditional" : h.normals ? "pass" : "conditional",
|
|
704
702
|
h.normals || ((Me = h.orientation) == null ? void 0 : Me.toLowerCase()) === "lefthanded" ? "warning" : "info",
|
|
705
703
|
h.meshSource,
|
|
706
|
-
h.normals === null ? "未取得法线信息。" : ((
|
|
704
|
+
h.normals === null ? "未取得法线信息。" : ((Oe = h.orientation) == null ? void 0 : Oe.toLowerCase()) === "lefthanded" ? "Mesh 使用 leftHanded orientation;真实跨引擎朝向需要运行时复核。" : h.normals ? "Mesh 已提供法线;本检查不替代逐面绕序/流形分析。" : "Mesh 未提供 authored 法线。",
|
|
707
705
|
"检查导出法线、绕序和 negative scale,并在目标渲染器中抽样复核。",
|
|
708
706
|
{ normals: h.normals, orientation: h.orientation }
|
|
709
707
|
);
|
|
710
|
-
const A = ((
|
|
711
|
-
|
|
708
|
+
const A = ((xe = e.instance) == null ? void 0 : xe.localTransform.scale.some((O) => !Number.isFinite(O) || O <= 0)) ?? !1, T = ((De = e.instance) == null ? void 0 : De.localTransform.scale.some((O) => Math.abs(O - 1) > 1e-6)) ?? !1;
|
|
709
|
+
P(
|
|
712
710
|
s,
|
|
713
711
|
"GEOM_TRANSFORM_SCALE",
|
|
714
712
|
"geometry",
|
|
715
|
-
e.instance ? A ? "fail" :
|
|
716
|
-
A ? "error" :
|
|
713
|
+
e.instance ? A ? "fail" : T ? "conditional" : "pass" : "unknown",
|
|
714
|
+
A ? "error" : T ? "warning" : "info",
|
|
717
715
|
"annotated",
|
|
718
|
-
e.instance ? A ? "实例包含零值、负值或非有限缩放。" :
|
|
719
|
-
A ? "修复为零或负的缩放。" :
|
|
716
|
+
e.instance ? A ? "实例包含零值、负值或非有限缩放。" : T ? "实例使用非单位缩放;统一 MuJoCo 物理明确拒绝非单位实例缩放。" : "实例缩放为单位值。" : "没有实例变换信息。",
|
|
717
|
+
A ? "修复为零或负的缩放。" : T ? "在资产导出处烘焙缩放,或让实例恢复单位缩放后再启动统一物理。" : "无需处理。",
|
|
720
718
|
{ scale: ((Ue = e.instance) == null ? void 0 : Ue.localTransform.scale) ?? null },
|
|
721
719
|
I
|
|
722
|
-
),
|
|
720
|
+
), P(
|
|
723
721
|
s,
|
|
724
722
|
"GEOM_PIVOT",
|
|
725
723
|
"geometry",
|
|
@@ -730,7 +728,7 @@ async function Ns(e) {
|
|
|
730
728
|
"在 DCC 中明确 pivot,并使用真实包围盒/轴心可视化人工复核。",
|
|
731
729
|
{ instancePosition: ((Le = e.instance) == null ? void 0 : Le.localTransform.position) ?? null },
|
|
732
730
|
I
|
|
733
|
-
),
|
|
731
|
+
), P(
|
|
734
732
|
s,
|
|
735
733
|
"GEOM_VISUAL_COLLISION_SEPARATION",
|
|
736
734
|
"geometry",
|
|
@@ -747,7 +745,7 @@ async function Ns(e) {
|
|
|
747
745
|
I
|
|
748
746
|
), hn(r, i, e.metadata, p, e.bundle), await pn(r, e.bundle, e.metadata, i, n);
|
|
749
747
|
const z = Dn(i.semanticFields, ((Ve = e.metadata) == null ? void 0 : Ve.semanticFields) ?? []);
|
|
750
|
-
|
|
748
|
+
P(
|
|
751
749
|
s,
|
|
752
750
|
"SEMANTIC_FIELDS",
|
|
753
751
|
"semantics",
|
|
@@ -768,7 +766,7 @@ async function Ns(e) {
|
|
|
768
766
|
e.instance,
|
|
769
767
|
e.asset.capabilities.physics === "authored" ? "usd-authored" : e.asset.capabilities.physics === "none" ? "none" : "unknown"
|
|
770
768
|
), Sn(r, e, i, m, I);
|
|
771
|
-
const ie =
|
|
769
|
+
const ie = Tn(o);
|
|
772
770
|
return {
|
|
773
771
|
assetId: e.asset.assetId,
|
|
774
772
|
instanceId: ((Be = e.instance) == null ? void 0 : Be.nodeId) ?? null,
|
|
@@ -909,11 +907,11 @@ async function pn(e, t, n, o, s) {
|
|
|
909
907
|
);
|
|
910
908
|
}
|
|
911
909
|
function gn(e, t, n, o, s, r, c, i) {
|
|
912
|
-
var h, A,
|
|
913
|
-
const a = t.physics, l = $((n == null ? void 0 : n.physics) && ((h = L(n.physics)) == null ? void 0 : h.rigidBodies)), u = $((n == null ? void 0 : n.physics) && ((A = L(n.physics)) == null ? void 0 : A.colliders)), f = $((n == null ? void 0 : n.physics) && ((
|
|
910
|
+
var h, A, T, z, ie, W, X;
|
|
911
|
+
const a = t.physics, l = $((n == null ? void 0 : n.physics) && ((h = L(n.physics)) == null ? void 0 : h.rigidBodies)), u = $((n == null ? void 0 : n.physics) && ((A = L(n.physics)) == null ? void 0 : A.colliders)), f = $((n == null ? void 0 : n.physics) && ((T = L(n.physics)) == null ? void 0 : T.joints)), m = $((n == null ? void 0 : n.physics) && ((z = L(n.physics)) == null ? void 0 : z.articulationRoots)), d = l.filter((b) => b.enabled !== !1), g = u.filter((b) => b.enabled !== !1), p = Math.max(a.rigidBodyCount, d.length), S = Math.max(a.colliderCount, g.length), I = ((ie = s == null ? void 0 : s.physics) == null ? void 0 : ie.status) ?? "unknown", C = new Set(d.map((b) => N(b.path)).filter((b) => !!b)), v = g.filter((b) => {
|
|
914
912
|
const V = N(b.bodyPath);
|
|
915
913
|
return !!V && !C.has(V);
|
|
916
|
-
}), _ = f.filter((b) => b.enabled !== !1), R = _.filter((b) => N(b.body0) && !C.has(N(b.body0)) || N(b.body1) && !C.has(N(b.body1))), M = Mn(_), k =
|
|
914
|
+
}), _ = f.filter((b) => b.enabled !== !1), R = _.filter((b) => N(b.body0) && !C.has(N(b.body0)) || N(b.body1) && !C.has(N(b.body1))), M = Mn(_), k = On(m.map((b) => N(b.path)).filter((b) => !!b)), x = d.filter((b) => b.kinematicEnabled !== !0), F = x.filter((b) => {
|
|
917
915
|
const V = L(b.mass), H = G(V == null ? void 0 : V.mass) ?? G(b.mass);
|
|
918
916
|
return H === null || H <= 0;
|
|
919
917
|
});
|
|
@@ -947,7 +945,7 @@ function gn(e, t, n, o, s, r, c, i) {
|
|
|
947
945
|
["PHYSICS_COM", a.centerOfMassCount, "physics:centerOfMass"],
|
|
948
946
|
["PHYSICS_INERTIA", a.inertiaCount, "physics:diagonalInertia"]
|
|
949
947
|
]) {
|
|
950
|
-
const Y = V > 0 ||
|
|
948
|
+
const Y = V > 0 || xn(o, b);
|
|
951
949
|
e(
|
|
952
950
|
b,
|
|
953
951
|
"physics",
|
|
@@ -960,14 +958,14 @@ function gn(e, t, n, o, s, r, c, i) {
|
|
|
960
958
|
r
|
|
961
959
|
);
|
|
962
960
|
}
|
|
963
|
-
const D =
|
|
961
|
+
const D = x.length > 0;
|
|
964
962
|
e(
|
|
965
963
|
"PHYSICS_MASS",
|
|
966
964
|
"physics",
|
|
967
|
-
|
|
965
|
+
x.length || a.rigidBodyCount ? D ? F.length ? "fail" : "pass" : a.massCount || a.densityCount ? "pass" : "conditional" : "not-run",
|
|
968
966
|
D && F.length ? "error" : p && !a.massCount && !a.densityCount ? "warning" : "info",
|
|
969
967
|
D ? "runtime" : "authored",
|
|
970
|
-
D ? F.length ? `${F.length}/${
|
|
968
|
+
D ? F.length ? `${F.length}/${x.length} 个动态刚体没有正质量。` : `${x.length} 个动态刚体均具有正质量。` : a.massCount || a.densityCount ? "已声明质量或密度,最终质量由目标物理后端解析。" : p ? "动态刚体缺少可确认的质量或密度。" : "没有动态刚体,本项未执行。",
|
|
971
969
|
F.length ? "为每个动态刚体或其碰撞体声明正质量,或声明可计算质量的密度。" : "无需处理。",
|
|
972
970
|
{
|
|
973
971
|
authoredMassCount: a.massCount,
|
|
@@ -1046,7 +1044,7 @@ function gn(e, t, n, o, s, r, c, i) {
|
|
|
1046
1044
|
);
|
|
1047
1045
|
}
|
|
1048
1046
|
function Sn(e, t, n, o, s) {
|
|
1049
|
-
var k,
|
|
1047
|
+
var k, x, F, D, h;
|
|
1050
1048
|
const r = (k = t.scene) == null ? void 0 : k.physicsState, c = (r == null ? void 0 : r.status) === "ready" ? "pass" : (r == null ? void 0 : r.status) === "unavailable" ? "fail" : (r == null ? void 0 : r.status) === "not-authored" ? "not-run" : "unknown";
|
|
1051
1049
|
e(
|
|
1052
1050
|
"SCENE_PHYSICS_COMPILE",
|
|
@@ -1054,14 +1052,14 @@ function Sn(e, t, n, o, s) {
|
|
|
1054
1052
|
c,
|
|
1055
1053
|
c === "fail" ? "error" : c === "unknown" ? "warning" : "info",
|
|
1056
1054
|
"runtime",
|
|
1057
|
-
c === "pass" ? "Viewer 已完成统一场景 MuJoCo 编译与初始化。" : c === "fail" ? `统一场景物理不可用:${((
|
|
1055
|
+
c === "pass" ? "Viewer 已完成统一场景 MuJoCo 编译与初始化。" : c === "fail" ? `统一场景物理不可用:${((x = r == null ? void 0 : r.issue) == null ? void 0 : x.message) ?? "未提供原因"}` : c === "not-run" ? "当前场景没有已公开的 MuJoCo 物理源。" : `统一场景物理状态:${(r == null ? void 0 : r.status) ?? "not-observed"}。`,
|
|
1058
1056
|
c === "fail" ? "根据 Viewer 返回的错误修复统一场景编译;这是当前唯一会阻止启动的检查。" : "无需处理。",
|
|
1059
1057
|
{ physicsState: r ?? null },
|
|
1060
1058
|
s
|
|
1061
1059
|
);
|
|
1062
1060
|
const i = (F = t.scene) == null ? void 0 : F.deterministic;
|
|
1063
1061
|
if (!i) {
|
|
1064
|
-
for (const [A,
|
|
1062
|
+
for (const [A, T] of [
|
|
1065
1063
|
["SCENE_INITIAL_PENETRATION", "尚未运行固定初态 MuJoCo 检查。"],
|
|
1066
1064
|
["SCENE_BELOW_GROUND", "尚未运行固定初态 MuJoCo 检查。"],
|
|
1067
1065
|
["SCENE_FLOATING", "尚未运行固定初态 MuJoCo 检查。"],
|
|
@@ -1074,7 +1072,7 @@ function Sn(e, t, n, o, s) {
|
|
|
1074
1072
|
"not-run",
|
|
1075
1073
|
"info",
|
|
1076
1074
|
"runtime",
|
|
1077
|
-
|
|
1075
|
+
T,
|
|
1078
1076
|
"在检查页运行“固定步长场景检查”,本项不会使用交互调试结果。",
|
|
1079
1077
|
{ deterministic: null },
|
|
1080
1078
|
s
|
|
@@ -1082,7 +1080,7 @@ function Sn(e, t, n, o, s) {
|
|
|
1082
1080
|
return;
|
|
1083
1081
|
}
|
|
1084
1082
|
if (i.status !== "completed") {
|
|
1085
|
-
for (const [A,
|
|
1083
|
+
for (const [A, T] of [
|
|
1086
1084
|
["SCENE_INITIAL_PENETRATION", "没有可用的 MuJoCo 固定初态数据。"],
|
|
1087
1085
|
["SCENE_BELOW_GROUND", "没有可用的 MuJoCo 固定初态数据。"],
|
|
1088
1086
|
["SCENE_FLOATING", "没有可用的 MuJoCo 固定初态数据。"],
|
|
@@ -1095,7 +1093,7 @@ function Sn(e, t, n, o, s) {
|
|
|
1095
1093
|
i.status === "unavailable" ? "unsupported" : "not-run",
|
|
1096
1094
|
"warning",
|
|
1097
1095
|
"runtime",
|
|
1098
|
-
`${
|
|
1096
|
+
`${T} ${i.reason ?? ""}`.trim(),
|
|
1099
1097
|
"确认场景包含可编译物理后重新运行。",
|
|
1100
1098
|
{ deterministic: i },
|
|
1101
1099
|
s
|
|
@@ -1128,7 +1126,7 @@ function Sn(e, t, n, o, s) {
|
|
|
1128
1126
|
);
|
|
1129
1127
|
const I = new Set(
|
|
1130
1128
|
[...$(a == null ? void 0 : a.contacts), ...$(l == null ? void 0 : l.contacts)].flatMap((A) => [A.instance1, A.instance2]).filter((A) => typeof A == "string")
|
|
1131
|
-
), C = Object.entries(i.bounds).filter(([A,
|
|
1129
|
+
), C = Object.entries(i.bounds).filter(([A, T]) => T.min[2] > 0.02 && !I.has(A));
|
|
1132
1130
|
e(
|
|
1133
1131
|
"SCENE_FLOATING",
|
|
1134
1132
|
"scene",
|
|
@@ -1150,9 +1148,9 @@ function Sn(e, t, n, o, s) {
|
|
|
1150
1148
|
{ overlaps: i.overlaps },
|
|
1151
1149
|
s
|
|
1152
1150
|
);
|
|
1153
|
-
const v = t.scene ?
|
|
1154
|
-
var
|
|
1155
|
-
return A.nodeId === ((
|
|
1151
|
+
const v = t.scene ? Ot(t.scene.doc).find((A) => {
|
|
1152
|
+
var T;
|
|
1153
|
+
return A.nodeId === ((T = t.instance) == null ? void 0 : T.nodeId);
|
|
1156
1154
|
}) : void 0, _ = Object.entries(i.bodyMotion), R = t.instance ? i.bodyMotion[t.instance.nodeId] : void 0, M = (v == null ? void 0 : v.physics.kind) ?? ((h = t.instance) == null ? void 0 : h.physics.kind);
|
|
1157
1155
|
e(
|
|
1158
1156
|
"SCENE_DYNAMIC_STATIC",
|
|
@@ -1496,7 +1494,7 @@ function Nn(e, t) {
|
|
|
1496
1494
|
return s.enabled !== !1 && !!r && (e === r || e.startsWith(`${r}/`));
|
|
1497
1495
|
});
|
|
1498
1496
|
}
|
|
1499
|
-
function
|
|
1497
|
+
function Tn(e) {
|
|
1500
1498
|
const t = Object.fromEntries([
|
|
1501
1499
|
"not-run",
|
|
1502
1500
|
"running",
|
|
@@ -1531,7 +1529,7 @@ function Pn(e) {
|
|
|
1531
1529
|
function et(e, t) {
|
|
1532
1530
|
return e.blocking === "always" ? !0 : e.blocking === "target" && e.targets.includes(t);
|
|
1533
1531
|
}
|
|
1534
|
-
function
|
|
1532
|
+
function Pn(e) {
|
|
1535
1533
|
var t;
|
|
1536
1534
|
return L((t = L(e == null ? void 0 : e.visualDiagnostics)) == null ? void 0 : t.usd);
|
|
1537
1535
|
}
|
|
@@ -1560,10 +1558,10 @@ function Mn(e) {
|
|
|
1560
1558
|
}
|
|
1561
1559
|
return [...t.entries()].filter(([, n]) => n > 1).map(([n]) => n);
|
|
1562
1560
|
}
|
|
1563
|
-
function
|
|
1561
|
+
function On(e) {
|
|
1564
1562
|
return e.filter((t) => e.some((n) => n !== t && n.startsWith(`${t}/`)));
|
|
1565
1563
|
}
|
|
1566
|
-
function
|
|
1564
|
+
function xn(e, t) {
|
|
1567
1565
|
const n = $(e == null ? void 0 : e.bodies);
|
|
1568
1566
|
return n.length ? t === "PHYSICS_DENSITY" ? n.some((o) => {
|
|
1569
1567
|
var s;
|
|
@@ -1683,7 +1681,7 @@ function J(e) {
|
|
|
1683
1681
|
function ge(e) {
|
|
1684
1682
|
return e.map((t) => Number(t.toFixed(4))).join(" × ");
|
|
1685
1683
|
}
|
|
1686
|
-
function
|
|
1684
|
+
function P(e, t, n, o, s, r, c, i, a, l, u) {
|
|
1687
1685
|
const f = u ?? dn[t];
|
|
1688
1686
|
if (!f) throw new Error(`Missing inspection finding contract: ${t}`);
|
|
1689
1687
|
e({
|
|
@@ -1729,15 +1727,15 @@ const Se = Object.freeze({
|
|
|
1729
1727
|
hasCollisionApi: !1,
|
|
1730
1728
|
jointCount: 0
|
|
1731
1729
|
});
|
|
1732
|
-
async function
|
|
1733
|
-
var
|
|
1730
|
+
async function Ns(e) {
|
|
1731
|
+
var x, F, D, h;
|
|
1734
1732
|
const t = ve(e), n = w(e.entryLocator), o = e.files.find((A) => w(A.locator) === n);
|
|
1735
1733
|
if (!o || !/\.(usda|usd)$/i.test(t)) return Se;
|
|
1736
1734
|
const s = new Uint8Array(await o.blob.arrayBuffer());
|
|
1737
1735
|
if (s.length >= 8 && new TextDecoder("ascii").decode(s.subarray(0, 8)) === "PXR-USDC") return Se;
|
|
1738
1736
|
const r = new TextDecoder("utf-8").decode(s);
|
|
1739
1737
|
if (!r.includes("#usda")) return Se;
|
|
1740
|
-
const c = ((
|
|
1738
|
+
const c = ((x = /\bdefaultPrim\s*=\s*"([^"]+)"/.exec(r)) == null ? void 0 : x[1]) ?? null, i = ((F = /\bupAxis\s*=\s*"([^"]+)"/.exec(r)) == null ? void 0 : F[1]) ?? null, a = (D = /\bmetersPerUnit\s*=\s*([0-9.eE+-]+)/.exec(r)) == null ? void 0 : D[1], l = (h = /\bkilogramsPerUnit\s*=\s*([0-9.eE+-]+)/.exec(r)) == null ? void 0 : h[1], u = Z(Q(r, /\breferences?\s*=\s*@([^@]+)@/g)), f = Z(Q(r, /\bpayload\s*=\s*@([^@]+)@/g)), m = Z([...r.matchAll(/\bsubLayers\s*=\s*\[([\s\S]*?)\]/g)].flatMap((A) => [...A[1].matchAll(/@([^@]+)@/g)].map((T) => T[1].trim()))), d = Z(Q(r, /\bmaterial:binding\s*=\s*<([^>]+)>/g)), g = Z(Q(r, /\bdef\s+Material\s+"([^"]+)"/g)), p = Z(Q(r, /@([^@]+\.(?:png|jpe?g|exr|ktx2))@/gi)), S = Z([...r.matchAll(/\b(semantic:[A-Za-z0-9_:]+)\s*=/g)].map((A) => A[1])), I = /\bfloat3\[\]\s+extent\s*=\s*\[\s*\(([^)]+)\)\s*,\s*\(([^)]+)\)\s*\]/.exec(r), C = I ? nt(I[1]) : null, v = I ? nt(I[2]) : null, _ = Ft(r), R = e.files.map((A) => ({
|
|
1741
1739
|
path: K(A.locator),
|
|
1742
1740
|
blob: A.blob
|
|
1743
1741
|
})), [M, k] = await Promise.all([
|
|
@@ -1786,13 +1784,13 @@ function nt(e) {
|
|
|
1786
1784
|
function Z(e) {
|
|
1787
1785
|
return [...new Set(e)].sort((t, n) => t.localeCompare(n));
|
|
1788
1786
|
}
|
|
1789
|
-
const Bn = { instanceIds: [], primaryId: null }, st = "scene-instance:";
|
|
1787
|
+
const Ts = "sim-studio.session@1", Bn = { instanceIds: [], primaryId: null }, st = "scene-instance:";
|
|
1790
1788
|
function ot(e) {
|
|
1791
1789
|
if (!e.startsWith(st)) return null;
|
|
1792
1790
|
const t = e.slice(st.length);
|
|
1793
1791
|
return t.length > 0 ? t : null;
|
|
1794
1792
|
}
|
|
1795
|
-
function
|
|
1793
|
+
function Ps(e) {
|
|
1796
1794
|
let t = null;
|
|
1797
1795
|
for (const n of e)
|
|
1798
1796
|
ot(n.objectName) !== null && Number.isFinite(n.distance) && (t === null || n.distance < t.distance) && (t = n);
|
|
@@ -1832,7 +1830,7 @@ function Ms(e, t) {
|
|
|
1832
1830
|
const s = e.primaryId !== null && n.has(e.primaryId) ? e.primaryId : o[o.length - 1] ?? null;
|
|
1833
1831
|
return { instanceIds: o, primaryId: s };
|
|
1834
1832
|
}
|
|
1835
|
-
function
|
|
1833
|
+
function Os(e, t = e.assets) {
|
|
1836
1834
|
const n = Object.isFrozen(e) ? e : je(Ke(e));
|
|
1837
1835
|
return {
|
|
1838
1836
|
doc: n,
|
|
@@ -1859,10 +1857,10 @@ function ft(e, t, n) {
|
|
|
1859
1857
|
message: `AI referenced instance ${a}, which does not exist in the scene.`,
|
|
1860
1858
|
instanceId: a
|
|
1861
1859
|
}), { records: o, diagnostics: s };
|
|
1862
|
-
const l =
|
|
1860
|
+
const l = Tt(r, c);
|
|
1863
1861
|
if (l.diagnostics.length > 0)
|
|
1864
1862
|
return s.push(...l.diagnostics), { records: o, diagnostics: s };
|
|
1865
|
-
o.push(
|
|
1863
|
+
o.push(Pt(c, {
|
|
1866
1864
|
batchId: n.batchId,
|
|
1867
1865
|
label: n.label,
|
|
1868
1866
|
// Provenance matters: the undo stack and audit log distinguish AI edits
|
|
@@ -1873,7 +1871,7 @@ function ft(e, t, n) {
|
|
|
1873
1871
|
}
|
|
1874
1872
|
return { records: o, diagnostics: s };
|
|
1875
1873
|
}
|
|
1876
|
-
function
|
|
1874
|
+
function xs(e, t, n) {
|
|
1877
1875
|
const o = ft(e, t, n);
|
|
1878
1876
|
if (o.diagnostics.length > 0)
|
|
1879
1877
|
return { doc: e, result: { applied: [], diagnostics: o.diagnostics, rejected: !0 } };
|
|
@@ -1904,7 +1902,7 @@ function zn(e, t) {
|
|
|
1904
1902
|
}
|
|
1905
1903
|
}
|
|
1906
1904
|
function jn(e, t) {
|
|
1907
|
-
const n = new Set(
|
|
1905
|
+
const n = new Set(xt(t.root).map((o) => o.nodeId));
|
|
1908
1906
|
return "nodeId" in e && !n.has(e.nodeId) ? e.nodeId : e.type === "node.add" && e.parentNodeId !== t.root.nodeId && !n.has(e.parentNodeId) ? e.parentNodeId : null;
|
|
1909
1907
|
}
|
|
1910
1908
|
function Ds(e, t, n, o = {}) {
|
|
@@ -2153,7 +2151,7 @@ function ss(e) {
|
|
|
2153
2151
|
format: "sim-studio.delivery-evidence@1",
|
|
2154
2152
|
schemaVersion: 1,
|
|
2155
2153
|
subjectDigest: e.subjectDigest,
|
|
2156
|
-
profileDigest:
|
|
2154
|
+
profileDigest: at(e.profile),
|
|
2157
2155
|
validator: { ...e.validator },
|
|
2158
2156
|
axes: rs(e.axes)
|
|
2159
2157
|
};
|
|
@@ -2163,7 +2161,7 @@ function ss(e) {
|
|
|
2163
2161
|
};
|
|
2164
2162
|
}
|
|
2165
2163
|
function os(e, t) {
|
|
2166
|
-
const n =
|
|
2164
|
+
const n = at(t.profile);
|
|
2167
2165
|
return e.format === "sim-studio.delivery-evidence@1" && e.schemaVersion === 1 && e.subjectDigest === t.subjectDigest && e.profileDigest === n && e.validator.id === t.validator.id && e.validator.version === t.validator.version && e.validator.optionsDigest === t.validator.optionsDigest && e.evidenceDigest === Et(is(e));
|
|
2168
2166
|
}
|
|
2169
2167
|
function Gs(e, t) {
|
|
@@ -2226,7 +2224,7 @@ class y extends Error {
|
|
|
2226
2224
|
}
|
|
2227
2225
|
}
|
|
2228
2226
|
async function as(e, t = {}) {
|
|
2229
|
-
hs(e.document), At(e.assetCatalog), It(e.resourceManifest), Ct(e.assetCatalog, e.resourceManifest),
|
|
2227
|
+
hs(e.document), At(e.assetCatalog), It(e.resourceManifest), Ct(e.assetCatalog, e.resourceManifest), it(e.editorial, e.document);
|
|
2230
2228
|
const n = Jn(e.document, e.assetCatalog);
|
|
2231
2229
|
pt(n, e.assetCatalog), bt(n, e.assetCatalog);
|
|
2232
2230
|
const o = te(n), s = te(e.editorial), r = te(e.assetCatalog), c = te(e.resourceManifest), i = {
|
|
@@ -2301,7 +2299,7 @@ async function zs(e, t = {}) {
|
|
|
2301
2299
|
const g = u, p = f, S = m, I = d;
|
|
2302
2300
|
At(S), It(I), pt(g, S), Ct(S, I);
|
|
2303
2301
|
const C = await us(n, I, t), v = bt(g, S);
|
|
2304
|
-
return
|
|
2302
|
+
return it(p, v), {
|
|
2305
2303
|
document: v,
|
|
2306
2304
|
editorial: p,
|
|
2307
2305
|
assetCatalog: S,
|
|
@@ -2443,22 +2441,25 @@ function Ct(e, t) {
|
|
|
2443
2441
|
}
|
|
2444
2442
|
}
|
|
2445
2443
|
async function us(e, t, n) {
|
|
2446
|
-
const o =
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2444
|
+
const o = n.resourceReadMode ?? "all";
|
|
2445
|
+
if (o === "none") return [];
|
|
2446
|
+
const s = [];
|
|
2447
|
+
for (const r of t.resources) {
|
|
2448
|
+
if (o === "embedded" && r.storage.kind === "remote") continue;
|
|
2449
|
+
const c = r.storage.kind === "embedded" ? await ds(e, r) : await fs(r, n);
|
|
2450
|
+
if (U(c) !== r.sha256)
|
|
2450
2451
|
throw new y(
|
|
2451
2452
|
"SCENE_PACKAGE_RESOURCE_HASH_MISMATCH",
|
|
2452
|
-
`Resource hash mismatch: ${
|
|
2453
|
+
`Resource hash mismatch: ${r.resourceId}.`
|
|
2453
2454
|
);
|
|
2454
|
-
if (
|
|
2455
|
+
if (c.byteLength !== r.byteSize)
|
|
2455
2456
|
throw new y(
|
|
2456
2457
|
"SCENE_PACKAGE_RESOURCE_SIZE_MISMATCH",
|
|
2457
|
-
`Resource byteSize mismatch: ${
|
|
2458
|
+
`Resource byteSize mismatch: ${r.resourceId}.`
|
|
2458
2459
|
);
|
|
2459
|
-
|
|
2460
|
+
s.push({ sha256: r.sha256, mediaType: r.mediaType, bytes: c });
|
|
2460
2461
|
}
|
|
2461
|
-
return
|
|
2462
|
+
return s.sort((r, c) => r.sha256.localeCompare(c.sha256));
|
|
2462
2463
|
}
|
|
2463
2464
|
async function ds(e, t) {
|
|
2464
2465
|
const n = e.file(de(t));
|
|
@@ -2592,9 +2593,9 @@ export {
|
|
|
2592
2593
|
Ko as ASSET_CATEGORIES,
|
|
2593
2594
|
Hs as COMMAND_DIAGNOSTIC,
|
|
2594
2595
|
Ys as CREATE_NODE_DIAGNOSTIC,
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2596
|
+
ya as DEFAULT_NODE_ORIGIN,
|
|
2597
|
+
Qi as DEFAULT_PLACEMENT_POLICY,
|
|
2598
|
+
ea as DEFAULT_SNAP,
|
|
2598
2599
|
$s as DELIVERY_EVIDENCE_FORMAT,
|
|
2599
2600
|
Ls as DELIVERY_PROFILE_FORMAT,
|
|
2600
2601
|
Js as DiagnosticBag,
|
|
@@ -2604,47 +2605,51 @@ export {
|
|
|
2604
2605
|
Yo as ID_PREFIX,
|
|
2605
2606
|
Jo as INSTANCE_ROLES,
|
|
2606
2607
|
Zo as INSTANCE_ROLE_LABELS,
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2608
|
+
fi as INTAKE_DIAGNOSTIC,
|
|
2609
|
+
mi as ISAAC_SIM_M1_PROFILE,
|
|
2610
|
+
Ia as NODE_ORIGIN_PRESETS,
|
|
2610
2611
|
Kn as PACKAGE_SCENE_FORMAT,
|
|
2611
2612
|
ht as RESOURCE_MANIFEST_FORMAT,
|
|
2612
2613
|
Zs as SCENE_DIAGNOSTIC,
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2614
|
+
Or as SCENE_DOCUMENT_FILE_NAME,
|
|
2615
|
+
xr as SCENE_DOCUMENT_FORMAT,
|
|
2616
|
+
Dr as SCENE_FILE_DIAGNOSTIC,
|
|
2616
2617
|
mt as SCENE_PACKAGE_FORMAT,
|
|
2617
2618
|
Us as SCENE_PACKAGE_SCHEMA_VERSION,
|
|
2618
2619
|
Dt as SCENE_SCHEMA_VERSION,
|
|
2619
|
-
|
|
2620
|
+
Ur as STUDIO_ASSET_SOURCE_ERROR,
|
|
2620
2621
|
Ws as STUDIO_DOCUMENT_DOMAIN_API_VERSION,
|
|
2621
2622
|
Xs as STUDIO_DOMAIN_DIAGNOSTIC,
|
|
2622
|
-
|
|
2623
|
+
Lr as STUDIO_SESSION_ERROR,
|
|
2624
|
+
Ts as STUDIO_SESSION_SNAPSHOT_FORMAT,
|
|
2625
|
+
hi as SceneHistory,
|
|
2623
2626
|
y as ScenePackageError,
|
|
2624
2627
|
qs as SimStudioError,
|
|
2628
|
+
kr as StudioSessionSnapshotError,
|
|
2625
2629
|
ks as USD_DELIVERY_PLAN_FORMAT,
|
|
2626
2630
|
Fs as USD_EXPORT_EVIDENCE_FORMAT,
|
|
2627
2631
|
Yt as VISUAL_ASSET_CAPABILITIES,
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2632
|
+
ta as adaptiveGridStepForBounds,
|
|
2633
|
+
pi as anchorReferences,
|
|
2634
|
+
xs as applyAiCommands,
|
|
2631
2635
|
Ds as applyAiCommandsToHost,
|
|
2632
|
-
|
|
2636
|
+
Tt as applyCommand,
|
|
2633
2637
|
Nt as applyCommandBatch,
|
|
2634
2638
|
Gs as applyDeliveryEvidenceFreshness,
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2639
|
+
na as applyDelta,
|
|
2640
|
+
sa as applyRotate,
|
|
2641
|
+
oa as applyScale,
|
|
2642
|
+
ra as applyTranslate,
|
|
2643
|
+
it as assertEditorialState,
|
|
2644
|
+
gi as assertExplicitDependenciesCoverDerived,
|
|
2641
2645
|
pt as assertSceneCatalogConsistency,
|
|
2642
|
-
|
|
2643
|
-
|
|
2646
|
+
$r as assertStudioAssetSourceMatchesRevision,
|
|
2647
|
+
Fr as assertStudioSessionSnapshot,
|
|
2648
|
+
Si as assertUsdDeliveryPlanV4,
|
|
2644
2649
|
Qs as assertValidSceneDoc,
|
|
2645
2650
|
w as assetResourceLocatorKey,
|
|
2646
2651
|
Wo as assetRevisionForNode,
|
|
2647
|
-
|
|
2652
|
+
Ei as assignPrimNames,
|
|
2648
2653
|
eo as buildAddAsset,
|
|
2649
2654
|
_t as buildAddNode,
|
|
2650
2655
|
to as buildAddVisualAsset,
|
|
@@ -2673,36 +2678,36 @@ export {
|
|
|
2673
2678
|
vo as buildSetVariants,
|
|
2674
2679
|
Ro as buildSetVisible,
|
|
2675
2680
|
No as buildSetVisualAppearance,
|
|
2676
|
-
|
|
2677
|
-
|
|
2681
|
+
To as buildSetVisualRenderLayer,
|
|
2682
|
+
Po as buildSetVisualSelectionMode,
|
|
2678
2683
|
wo as buildTransformNode,
|
|
2679
2684
|
Mo as buildUngroupNode,
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2685
|
+
yi as buildUsdDeliveryPlan,
|
|
2686
|
+
Oo as calculateAssetFactsHash,
|
|
2687
|
+
at as calculateDeliveryProfileDigest,
|
|
2688
|
+
Gr as calculateSceneContentHash,
|
|
2689
|
+
Ii as calculateUsdDeliveryPlanDigest,
|
|
2690
|
+
Ci as calculateUsdPackageDigest,
|
|
2686
2691
|
Vs as calculateValidatorOptionsDigest,
|
|
2687
2692
|
vt as calculateVisualAssetFactsHash,
|
|
2688
|
-
|
|
2689
|
-
|
|
2693
|
+
Ai as canonicalDocumentHash,
|
|
2694
|
+
Vr as canonicalEntryUrl,
|
|
2690
2695
|
Lt as canonicalRemoteResourceUrl,
|
|
2691
2696
|
Ke as cloneData,
|
|
2692
2697
|
Xo as collectReferencedRevisionIds,
|
|
2693
|
-
|
|
2698
|
+
xo as compareStrings,
|
|
2694
2699
|
qo as composeLocalTransforms,
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2700
|
+
Br as copyStudioAssetSource,
|
|
2701
|
+
bi as createAssetCatalog,
|
|
2702
|
+
_i as createAssetInterpretation,
|
|
2698
2703
|
Do as createAssetNodeFromRevision,
|
|
2699
|
-
|
|
2704
|
+
vi as createAssetRevision,
|
|
2700
2705
|
Uo as createBoundingBoxPlaceholderNode,
|
|
2701
|
-
|
|
2706
|
+
Pt as createCommandRecord,
|
|
2702
2707
|
Qo as createDefaultCoordinateSystem,
|
|
2703
2708
|
er as createDefaultEnvironment,
|
|
2704
2709
|
ss as createDeliveryValidationEvidence,
|
|
2705
|
-
|
|
2710
|
+
zr as createEditorialState,
|
|
2706
2711
|
tr as createIdentityTransform,
|
|
2707
2712
|
nr as createSceneAssetNode,
|
|
2708
2713
|
sr as createSceneDocument,
|
|
@@ -2711,29 +2716,30 @@ export {
|
|
|
2711
2716
|
as as createScenePackage,
|
|
2712
2717
|
Bs as createScenePackageFromHost,
|
|
2713
2718
|
Mt as createScenePlaceholderNode,
|
|
2714
|
-
|
|
2719
|
+
Os as createSceneReader,
|
|
2715
2720
|
ir as createSceneVisualNode,
|
|
2716
|
-
|
|
2721
|
+
As as createSeededPlaceholderBatch,
|
|
2722
|
+
jr as createStudioAssetClosureRef,
|
|
2717
2723
|
Rt as createUlid,
|
|
2718
|
-
|
|
2724
|
+
Ri as createUsdExportEvidence,
|
|
2719
2725
|
Jt as createVisualAssetRevision,
|
|
2720
2726
|
Lo as createVisualNodeFromRevision,
|
|
2721
2727
|
ar as deepEqualData,
|
|
2722
2728
|
je as deepFreeze,
|
|
2723
2729
|
ko as defaultPhysicsForAsset,
|
|
2724
2730
|
cr as defaultRoleForCategory,
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2731
|
+
Ni as deriveSourceDependencies,
|
|
2732
|
+
Ti as detectLayout,
|
|
2733
|
+
bs as diffAssetRevisions,
|
|
2734
|
+
Kr as editorialNodeState,
|
|
2735
|
+
Hr as editorialStateToHost,
|
|
2736
|
+
ia as effectiveGridStep,
|
|
2737
|
+
aa as evaluatePlacement,
|
|
2738
|
+
Pi as extensionOf,
|
|
2739
|
+
wi as extractReferences,
|
|
2734
2740
|
lr as findAssetRevision,
|
|
2735
2741
|
ur as findAssetRevisionByAssetId,
|
|
2736
|
-
|
|
2742
|
+
Mi as findCatalogEntryByRuntimeRevision,
|
|
2737
2743
|
dr as findSceneAssetNode,
|
|
2738
2744
|
fr as findSceneDomainNode,
|
|
2739
2745
|
mr as findSceneNode,
|
|
@@ -2742,99 +2748,100 @@ export {
|
|
|
2742
2748
|
gr as findSceneVisualNode,
|
|
2743
2749
|
Sr as findVisualAssetRevision,
|
|
2744
2750
|
Er as findVisualAssetRevisionByAssetId,
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2751
|
+
ca as footprintOverlaps,
|
|
2752
|
+
Ca as getStudioAssetDimensions,
|
|
2753
|
+
Aa as getStudioNodeFrame,
|
|
2754
|
+
ba as getStudioPhysicsFacts,
|
|
2755
|
+
_a as getStudioSelectionFrame,
|
|
2750
2756
|
yr as insertSceneNode,
|
|
2751
|
-
|
|
2757
|
+
Ns as inspectPublicUsd,
|
|
2752
2758
|
ot as instanceIdFromName,
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2759
|
+
Oi as intakePackage,
|
|
2760
|
+
vs as intakeVisualFiles,
|
|
2761
|
+
xi as invertCommand,
|
|
2756
2762
|
os as isDeliveryEvidenceCurrent,
|
|
2757
|
-
|
|
2758
|
-
|
|
2763
|
+
la as isSupportSurfaceNormal,
|
|
2764
|
+
Di as isTextualLayer,
|
|
2759
2765
|
Ie as isTextualLayerBytes,
|
|
2760
|
-
|
|
2761
|
-
|
|
2766
|
+
Ui as isUsdPath,
|
|
2767
|
+
Ot as listSceneAssetNodes,
|
|
2762
2768
|
Ir as listSceneDomainNodes,
|
|
2763
2769
|
Cr as listScenePlaceholderNodes,
|
|
2764
2770
|
Ar as listSceneVisualNodes,
|
|
2765
2771
|
br as localTransformFromWorld,
|
|
2766
|
-
|
|
2767
|
-
|
|
2772
|
+
Li as makeRepair,
|
|
2773
|
+
ua as multiplyQuaternions,
|
|
2768
2774
|
$o as nextCopyLabel,
|
|
2769
|
-
|
|
2770
|
-
|
|
2775
|
+
va as nodeOriginPivot,
|
|
2776
|
+
Ra as nodeOriginPresetLocal,
|
|
2771
2777
|
Fo as normalizeDocumentDomains,
|
|
2772
|
-
|
|
2778
|
+
Yr as normalizeEditorialCamera,
|
|
2773
2779
|
zt as normalizePackagePath,
|
|
2774
|
-
|
|
2780
|
+
Jr as normalizePackageResourcePath,
|
|
2775
2781
|
Ce as normalizePath,
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2782
|
+
da as normalizePlacementPolicy,
|
|
2783
|
+
fa as normalizeQuaternion,
|
|
2784
|
+
Zr as normalizeRemoteSource,
|
|
2779
2785
|
ue as normalizeResourceLocator,
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2786
|
+
Wr as normalizeSceneDocument,
|
|
2787
|
+
Xr as normalizeScopes,
|
|
2788
|
+
ki as normalizeSourceBundle,
|
|
2789
|
+
qr as packagePathFromLocator,
|
|
2784
2790
|
_r as parentWorldTransformForNode,
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2791
|
+
Qr as parseSceneDocument,
|
|
2792
|
+
ei as pathMatchesPrefix,
|
|
2793
|
+
Ps as pickInstance,
|
|
2794
|
+
ma as placeAtPoint,
|
|
2795
|
+
ha as placementVolumesOverlap,
|
|
2790
2796
|
ft as prepareAiCommands,
|
|
2791
|
-
|
|
2797
|
+
ti as prepareStudioAssetSource,
|
|
2792
2798
|
Jn as projectSceneDocument,
|
|
2793
2799
|
Ms as pruneSelection,
|
|
2794
|
-
|
|
2795
|
-
|
|
2800
|
+
$i as readManifestText,
|
|
2801
|
+
ni as readSceneDocument,
|
|
2796
2802
|
zs as readScenePackage,
|
|
2797
2803
|
Go as referencedRevisionIds,
|
|
2798
|
-
|
|
2799
|
-
|
|
2804
|
+
si as remoteUrlFromLocator,
|
|
2805
|
+
Fi as removeReference,
|
|
2800
2806
|
vr as removeSceneNode,
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2807
|
+
Gi as replaceReferenceTarget,
|
|
2808
|
+
Vi as requiresUsdCompilation,
|
|
2809
|
+
Bi as resolveExportVariantSelection,
|
|
2810
|
+
zi as resolveFrom,
|
|
2811
|
+
Na as resolveNodeOriginLocal,
|
|
2806
2812
|
Zn as restoreSceneDocument,
|
|
2807
2813
|
He as revisionEntryResource,
|
|
2808
|
-
|
|
2809
|
-
|
|
2814
|
+
ji as revisionResourceByLocator,
|
|
2815
|
+
Ki as revisionResourceLocatorKeys,
|
|
2810
2816
|
Vo as roundDecimals,
|
|
2811
|
-
|
|
2812
|
-
|
|
2817
|
+
Rs as runModelInspection,
|
|
2818
|
+
Hi as sanitizeIdentifier,
|
|
2813
2819
|
$t as scanDependencies,
|
|
2814
|
-
|
|
2820
|
+
pa as seatOnFloor,
|
|
2815
2821
|
ws as selectAt,
|
|
2816
|
-
|
|
2822
|
+
oi as serializeSceneDocument,
|
|
2817
2823
|
jt as simStudioVersion,
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2824
|
+
Yi as slugFromRoot,
|
|
2825
|
+
ga as snapValue,
|
|
2826
|
+
Ji as sortRepairs,
|
|
2821
2827
|
Bo as sortStable,
|
|
2822
|
-
|
|
2823
|
-
|
|
2828
|
+
ri as sourceBundleFromLocalSource,
|
|
2829
|
+
ii as sourceRevisionIdOf,
|
|
2824
2830
|
Rr as stableStringify,
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2831
|
+
Zi as stripExternalReferences,
|
|
2832
|
+
ai as studioAssetSourceFingerprint,
|
|
2833
|
+
ci as studioSessionSnapshotDigest,
|
|
2834
|
+
Wi as toSlug,
|
|
2835
|
+
Sa as unionBounds,
|
|
2829
2836
|
Nr as updateSceneAssetNode,
|
|
2830
|
-
|
|
2831
|
-
|
|
2837
|
+
Tr as updateSceneNode,
|
|
2838
|
+
Xi as validateDeliveryProfile,
|
|
2832
2839
|
zo as validateDocumentDomains,
|
|
2833
2840
|
Ae as validateSceneDoc,
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2841
|
+
li as verifyStudioAssetSourceFacts,
|
|
2842
|
+
_s as visualRevisionEntryResource,
|
|
2843
|
+
Pr as visualRevisionForNode,
|
|
2844
|
+
xt as walkSceneNodes,
|
|
2838
2845
|
wr as worldTransformForNode,
|
|
2839
|
-
|
|
2846
|
+
ui as writeSceneDocument
|
|
2840
2847
|
};
|