@nebula-spatial/viewer 0.5.14 → 0.5.15
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/CHANGELOG.md +19 -0
- package/dist/assets/{usd-worker-CPCXyXkl.js → usd-worker-DU-u_iJN.js} +558 -502
- package/dist/{collision-debug-B2bN8P2g.js → collision-debug-1-acufd9.js} +55 -53
- package/dist/{index-BSDalKkd.js → index-YdnQRm_T.js} +9 -9
- package/dist/index.js +1 -1
- package/dist/{mjcf-visual-D6T3a1uQ.js → mjcf-visual-DTO5j9bm.js} +1 -1
- package/dist/{mujoco-runtime-CFQQsRmc.js → mujoco-runtime-gqyaQh9L.js} +1 -1
- package/dist/{session-Ciaw522_.js → session-AUG5EJBJ.js} +7 -7
- package/dist/{session-BUarD9PA.js → session-mJGcCljH.js} +2 -2
- package/dist/{stage-CvP0yaff.js → stage-BVdJLgsW.js} +1 -1
- package/dist/{urdf-session-DcGOHFg2.js → urdf-session-oLRIcAw1.js} +5 -5
- package/dist/{usd-session-DSFtJk4b.js → usd-session-Dexv9ijX.js} +1861 -1805
- package/dist/version.d.ts +1 -1
- package/dist/{xacro-bURYAikr.js → xacro-BjsYN_8k.js} +1 -1
- package/openusd/openusd-runtime-manifest.json +3 -3
- package/openusd/openusd_probe.wasm +0 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ var On = (n, t, e) => t in n ? Cn(n, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var K = (n, t, e) => On(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { Vector3 as U, Box3 as st, Matrix4 as mt, BufferAttribute as bn, Line3 as ct, Plane as An, Vector2 as ht, Triangle as Et, BackSide as Fn, DoubleSide as _n, REVISION as Sn, Ray as zn, FrontSide as He, Mesh as $t, LineSegments as Ve, LineLoop as Bn, Line as Tn, Points as Pn, Sphere as Vn, BatchedMesh as jn, LineBasicMaterial as $n, MeshBasicMaterial as kn, WireframeGeometry as qn, EdgesGeometry as we } from "three";
|
|
5
5
|
import { disposeModelResources as Jn } from "./resources-CHhCm2f7.js";
|
|
6
|
-
import { t as Lt, u as We, v as Hn, w as Wn, x as Yn, U as Xn, p as Gn } from "./index-
|
|
6
|
+
import { t as Lt, u as We, v as Hn, w as Wn, x as Yn, U as Xn, p as Gn } from "./index-YdnQRm_T.js";
|
|
7
7
|
const Zn = /* @__PURE__ */ new Set([
|
|
8
8
|
"E_MJCF_INCLUDE_CYCLE",
|
|
9
9
|
"E_MJCF_PARSE",
|
|
@@ -412,7 +412,7 @@ function ii(n, t, e, i, s) {
|
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
|
-
const En = 0, si = 1, ri = 2, Ye = 2, xe = 1.25, Xe = 1,
|
|
415
|
+
const En = 0, si = 1, ri = 2, Ye = 2, xe = 1.25, Xe = 1, W = 6 * 4 + 4 + 4, z = W / 4, Mn = 65535, fe = Math.pow(2, -24), je = Symbol("SKIP_GENERATION"), vn = {
|
|
416
416
|
strategy: En,
|
|
417
417
|
maxDepth: 40,
|
|
418
418
|
maxLeafSize: 10,
|
|
@@ -458,7 +458,7 @@ function Rt(n) {
|
|
|
458
458
|
function V(n, t) {
|
|
459
459
|
return t[n + 15] === Mn;
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function Y(n, t) {
|
|
462
462
|
return t[n + 6];
|
|
463
463
|
}
|
|
464
464
|
function X(n, t) {
|
|
@@ -629,11 +629,11 @@ function Ue(n, t) {
|
|
|
629
629
|
for (let r = 0; r < 6; r++)
|
|
630
630
|
Nn[e + r] = o[r];
|
|
631
631
|
if (s)
|
|
632
|
-
return t.buffer ? (Un.set(new Uint8Array(t.buffer), n), n + t.buffer.byteLength) : (de[e + 6] = t.offset, ve[i + 14] = t.count, ve[i + 15] = Mn, n +
|
|
632
|
+
return t.buffer ? (Un.set(new Uint8Array(t.buffer), n), n + t.buffer.byteLength) : (de[e + 6] = t.offset, ve[i + 14] = t.count, ve[i + 15] = Mn, n + W);
|
|
633
633
|
{
|
|
634
|
-
const { left: r, right: a, splitAxis: c } = t, d = n +
|
|
634
|
+
const { left: r, right: a, splitAxis: c } = t, d = n + W;
|
|
635
635
|
let f = Ue(d, r);
|
|
636
|
-
const l = n /
|
|
636
|
+
const l = n / W, p = f / W - l;
|
|
637
637
|
if (p > ui)
|
|
638
638
|
throw new Error("MeshBVH: Cannot store relative child node offset greater than 32 bits.");
|
|
639
639
|
return de[e + 6] = p, de[e + 7] = c, Ue(f, a);
|
|
@@ -678,7 +678,7 @@ function pi(n, t) {
|
|
|
678
678
|
count: o.offset + o.count - s.offset
|
|
679
679
|
}, a = new Float32Array(6 * r.count);
|
|
680
680
|
a.offset = r.offset, n.computePrimitiveBounds(r.offset, r.count, a), n._roots = i.map((c) => {
|
|
681
|
-
const d = di(n, a, c.offset, c.count, t, r), f = Ne(d), l = new e(
|
|
681
|
+
const d = di(n, a, c.offset, c.count, t, r), f = Ne(d), l = new e(W * f);
|
|
682
682
|
return fi(0, d, l), l;
|
|
683
683
|
});
|
|
684
684
|
}
|
|
@@ -720,7 +720,7 @@ function Le(n, t, e, i, s = null, o = 0, r = 0) {
|
|
|
720
720
|
const { float32Array: a, uint16Array: c, uint32Array: d } = D;
|
|
721
721
|
let f = n * 2;
|
|
722
722
|
if (V(f, c)) {
|
|
723
|
-
const u =
|
|
723
|
+
const u = Y(n, d), p = X(f, c);
|
|
724
724
|
return O(n, a, pt), i(u, p, !1, r, o + n / z, pt);
|
|
725
725
|
} else {
|
|
726
726
|
let b = function(x) {
|
|
@@ -728,13 +728,13 @@ function Le(n, t, e, i, s = null, o = 0, r = 0) {
|
|
|
728
728
|
let N = x * 2;
|
|
729
729
|
for (; !V(N, M); )
|
|
730
730
|
x = $(x), N = x * 2;
|
|
731
|
-
return
|
|
731
|
+
return Y(x, v);
|
|
732
732
|
}, T = function(x) {
|
|
733
733
|
const { uint16Array: M, uint32Array: v } = D;
|
|
734
734
|
let N = x * 2;
|
|
735
735
|
for (; !V(N, M); )
|
|
736
736
|
x = k(x, v), N = x * 2;
|
|
737
|
-
return
|
|
737
|
+
return Y(x, v) + X(N, M);
|
|
738
738
|
};
|
|
739
739
|
const u = $(n), p = k(n, d);
|
|
740
740
|
let S = u, P = p, _, I, m, g;
|
|
@@ -803,9 +803,9 @@ function yi(n, t, e, i) {
|
|
|
803
803
|
0,
|
|
804
804
|
0,
|
|
805
805
|
u
|
|
806
|
-
), pe.clearBuffer(), c += o[p].byteLength /
|
|
806
|
+
), pe.clearBuffer(), c += o[p].byteLength / W, !r); p++)
|
|
807
807
|
;
|
|
808
|
-
if (dt.releasePrimitive(u), jt.clearBuffer(), a += s[f].byteLength /
|
|
808
|
+
if (dt.releasePrimitive(u), jt.clearBuffer(), a += s[f].byteLength / W, r)
|
|
809
809
|
break;
|
|
810
810
|
}
|
|
811
811
|
return Be = !1, r;
|
|
@@ -817,18 +817,18 @@ function nt(n, t, e, i, s, o = 0, r = 0, a = 0, c = 0, d = null, f = !1) {
|
|
|
817
817
|
let h = !1;
|
|
818
818
|
if (E && w)
|
|
819
819
|
f ? h = s(
|
|
820
|
-
|
|
820
|
+
Y(t, I),
|
|
821
821
|
X(t * 2, m),
|
|
822
|
-
|
|
822
|
+
Y(n, S),
|
|
823
823
|
X(n * 2, P),
|
|
824
824
|
c,
|
|
825
825
|
r + t / z,
|
|
826
826
|
a,
|
|
827
827
|
o + n / z
|
|
828
828
|
) : h = s(
|
|
829
|
-
|
|
829
|
+
Y(n, S),
|
|
830
830
|
X(n * 2, P),
|
|
831
|
-
|
|
831
|
+
Y(t, I),
|
|
832
832
|
X(t * 2, m),
|
|
833
833
|
a,
|
|
834
834
|
o + n / z,
|
|
@@ -1040,7 +1040,7 @@ class gi {
|
|
|
1040
1040
|
else {
|
|
1041
1041
|
const i = this._roots;
|
|
1042
1042
|
for (let s = 0; s < i.length; s++) {
|
|
1043
|
-
const o = i[s], r = new Uint32Array(o), a = new Uint16Array(o), c = o.byteLength /
|
|
1043
|
+
const o = i[s], r = new Uint32Array(o), a = new Uint16Array(o), c = o.byteLength / W;
|
|
1044
1044
|
for (let d = 0; d < c; d++) {
|
|
1045
1045
|
const f = z * d, l = 2 * f;
|
|
1046
1046
|
V(l, a) && (r[f + 6] += t);
|
|
@@ -1065,11 +1065,11 @@ class gi {
|
|
|
1065
1065
|
refit() {
|
|
1066
1066
|
const t = this._roots;
|
|
1067
1067
|
for (let e = 0, i = t.length; e < i; e++) {
|
|
1068
|
-
const s = t[e], o = new Uint32Array(s), r = new Uint16Array(s), a = new Float32Array(s), c = s.byteLength /
|
|
1068
|
+
const s = t[e], o = new Uint32Array(s), r = new Uint16Array(s), a = new Float32Array(s), c = s.byteLength / W;
|
|
1069
1069
|
for (let d = c - 1; d >= 0; d--) {
|
|
1070
1070
|
const f = d * z, l = f * 2;
|
|
1071
1071
|
if (V(l, r)) {
|
|
1072
|
-
const p =
|
|
1072
|
+
const p = Y(f, o), S = X(l, r);
|
|
1073
1073
|
this.writePrimitiveRangeBounds(p, S, St, 0), a.set(St, f);
|
|
1074
1074
|
} else {
|
|
1075
1075
|
const p = $(f), S = k(f, o);
|
|
@@ -1108,7 +1108,7 @@ class gi {
|
|
|
1108
1108
|
const p = f[l];
|
|
1109
1109
|
if (c = hi(this, l, i, s, e, d), c)
|
|
1110
1110
|
break;
|
|
1111
|
-
d += p.byteLength /
|
|
1111
|
+
d += p.byteLength / W;
|
|
1112
1112
|
}
|
|
1113
1113
|
return c;
|
|
1114
1114
|
}
|
|
@@ -1751,7 +1751,7 @@ function Di(n, t = null) {
|
|
|
1751
1751
|
function l(u, p, S = !1) {
|
|
1752
1752
|
const P = u * 2;
|
|
1753
1753
|
if (V(P, a)) {
|
|
1754
|
-
const _ =
|
|
1754
|
+
const _ = Y(u, r), I = X(P, a);
|
|
1755
1755
|
let m = 1 / 0, g = 1 / 0, y = 1 / 0, w = -1 / 0, E = -1 / 0, h = -1 / 0;
|
|
1756
1756
|
for (let A = 3 * _, B = 3 * (_ + I); A < B; A++) {
|
|
1757
1757
|
let b = i[A];
|
|
@@ -1764,7 +1764,7 @@ function Di(n, t = null) {
|
|
|
1764
1764
|
let m = S, g = !1, y = !1;
|
|
1765
1765
|
if (t) {
|
|
1766
1766
|
if (!m) {
|
|
1767
|
-
const b = _ / z + p /
|
|
1767
|
+
const b = _ / z + p / W, T = I / z + p / W;
|
|
1768
1768
|
g = t.has(b), y = t.has(T), m = !g && !y;
|
|
1769
1769
|
}
|
|
1770
1770
|
} else
|
|
@@ -1821,7 +1821,7 @@ function zi(n, t, e, i, s, o, r) {
|
|
|
1821
1821
|
function Re(n, t, e, i, s, o, r) {
|
|
1822
1822
|
const { float32Array: a, uint16Array: c, uint32Array: d } = D, f = n * 2;
|
|
1823
1823
|
if (V(f, c)) {
|
|
1824
|
-
const u =
|
|
1824
|
+
const u = Y(n, d), p = X(f, c);
|
|
1825
1825
|
Ui(t, e, i, u, p, s, o, r);
|
|
1826
1826
|
} else {
|
|
1827
1827
|
const u = $(n);
|
|
@@ -1840,7 +1840,7 @@ function De(n, t, e, i, s, o) {
|
|
|
1840
1840
|
const { float32Array: r, uint16Array: a, uint32Array: c } = D;
|
|
1841
1841
|
let d = n * 2;
|
|
1842
1842
|
if (V(d, a)) {
|
|
1843
|
-
const l =
|
|
1843
|
+
const l = Y(n, c), u = X(d, a);
|
|
1844
1844
|
return Li(t, e, i, l, u, s, o);
|
|
1845
1845
|
} else {
|
|
1846
1846
|
const l = $e(n, c), u = Vi[l], S = i.direction[u] >= 0;
|
|
@@ -1869,7 +1869,7 @@ function Ce(n, t, e, i, s = null) {
|
|
|
1869
1869
|
const { float32Array: o, uint16Array: r, uint32Array: a } = D;
|
|
1870
1870
|
let c = n * 2;
|
|
1871
1871
|
if (s === null && (e.boundingBox || e.computeBoundingBox(), an.set(e.boundingBox.min, e.boundingBox.max, i), s = an), V(c, r)) {
|
|
1872
|
-
const f = t.geometry, l = f.index, u = f.attributes.position, p = e.index, S = e.attributes.position, P =
|
|
1872
|
+
const f = t.geometry, l = f.index, u = f.attributes.position, p = e.index, S = e.attributes.position, P = Y(n, a), _ = X(c, r);
|
|
1873
1873
|
if (Ot.copy(i).invert(), e.boundsTree)
|
|
1874
1874
|
return O(n, o, ne), ne.matrix.copy(Ot), ne.needsUpdate = !0, e.boundsTree.shapecast({
|
|
1875
1875
|
intersectsBounds: (m) => ne.intersectsBox(m),
|
|
@@ -1949,7 +1949,7 @@ function Yi(n, t = null) {
|
|
|
1949
1949
|
function l(u, p, S = !1) {
|
|
1950
1950
|
const P = u * 2;
|
|
1951
1951
|
if (V(P, a)) {
|
|
1952
|
-
const _ =
|
|
1952
|
+
const _ = Y(u, r), I = X(P, a);
|
|
1953
1953
|
let m = 1 / 0, g = 1 / 0, y = 1 / 0, w = -1 / 0, E = -1 / 0, h = -1 / 0;
|
|
1954
1954
|
for (let A = _, B = _ + I; A < B; A++) {
|
|
1955
1955
|
const b = 3 * n.resolveTriangleIndex(A);
|
|
@@ -1966,7 +1966,7 @@ function Yi(n, t = null) {
|
|
|
1966
1966
|
let m = S, g = !1, y = !1;
|
|
1967
1967
|
if (t) {
|
|
1968
1968
|
if (!m) {
|
|
1969
|
-
const b = _ / z + p /
|
|
1969
|
+
const b = _ / z + p / W, T = I / z + p / W;
|
|
1970
1970
|
g = t.has(b), y = t.has(T), m = !g && !y;
|
|
1971
1971
|
}
|
|
1972
1972
|
} else
|
|
@@ -1992,7 +1992,7 @@ function Xi(n, t, e, i, s, o, r) {
|
|
|
1992
1992
|
function Oe(n, t, e, i, s, o, r) {
|
|
1993
1993
|
const { float32Array: a, uint16Array: c, uint32Array: d } = D, f = n * 2;
|
|
1994
1994
|
if (V(f, c)) {
|
|
1995
|
-
const u =
|
|
1995
|
+
const u = Y(n, d), p = X(f, c);
|
|
1996
1996
|
Ci(t, e, i, u, p, s, o, r);
|
|
1997
1997
|
} else {
|
|
1998
1998
|
const u = $(n);
|
|
@@ -2011,7 +2011,7 @@ function Fe(n, t, e, i, s, o) {
|
|
|
2011
2011
|
const { float32Array: r, uint16Array: a, uint32Array: c } = D;
|
|
2012
2012
|
let d = n * 2;
|
|
2013
2013
|
if (V(d, a)) {
|
|
2014
|
-
const l =
|
|
2014
|
+
const l = Y(n, c), u = X(d, a);
|
|
2015
2015
|
return Oi(t, e, i, l, u, s, o);
|
|
2016
2016
|
} else {
|
|
2017
2017
|
const l = $e(n, c), u = Gi[l], S = i.direction[u] >= 0;
|
|
@@ -2040,7 +2040,7 @@ function ze(n, t, e, i, s = null) {
|
|
|
2040
2040
|
const { float32Array: o, uint16Array: r, uint32Array: a } = D;
|
|
2041
2041
|
let c = n * 2;
|
|
2042
2042
|
if (s === null && (e.boundingBox || e.computeBoundingBox(), ln.set(e.boundingBox.min, e.boundingBox.max, i), s = ln), V(c, r)) {
|
|
2043
|
-
const f = t.geometry, l = f.index, u = f.attributes.position, p = e.index, S = e.attributes.position, P =
|
|
2043
|
+
const f = t.geometry, l = f.index, u = f.attributes.position, p = e.index, S = e.attributes.position, P = Y(n, a), _ = X(c, r);
|
|
2044
2044
|
if (zt.copy(i).invert(), e.boundsTree)
|
|
2045
2045
|
return O(n, o, re), re.matrix.copy(zt), re.needsUpdate = !0, e.boundsTree.shapecast({
|
|
2046
2046
|
intersectsBounds: (m) => re.intersectsBox(m),
|
|
@@ -2155,7 +2155,7 @@ class me extends Bi {
|
|
|
2155
2155
|
function c(d) {
|
|
2156
2156
|
for (let f = 0; f < d.length; f++) {
|
|
2157
2157
|
const l = d[f], u = new Uint32Array(l), p = new Uint16Array(l);
|
|
2158
|
-
for (let S = 0, P = l.byteLength /
|
|
2158
|
+
for (let S = 0, P = l.byteLength / W; S < P; S++) {
|
|
2159
2159
|
const _ = z * S, I = 2 * _;
|
|
2160
2160
|
V(I, p) || (u[_ + 6] = u[_ + 6] / z - S);
|
|
2161
2161
|
}
|
|
@@ -2588,7 +2588,7 @@ class Rs {
|
|
|
2588
2588
|
this.source = t;
|
|
2589
2589
|
const e = t.original;
|
|
2590
2590
|
if (ys(e))
|
|
2591
|
-
for (const i of e.files) this.entries.set(
|
|
2591
|
+
for (const i of e.files) this.entries.set(H(i.path), i.file);
|
|
2592
2592
|
else typeof Blob < "u" && e instanceof Blob ? this.entries.set(t.entryPath ?? t.filename ?? "asset", e) : e instanceof ArrayBuffer ? this.entries.set(t.entryPath ?? t.filename ?? "asset", new Blob([e])) : typeof e == "object" && e !== null && "kind" in e && e.kind === "buffer" && this.entries.set(t.entryPath ?? t.filename ?? "asset", new Blob([e.buffer]));
|
|
2593
2593
|
}
|
|
2594
2594
|
paths() {
|
|
@@ -2598,7 +2598,7 @@ class Rs {
|
|
|
2598
2598
|
return this.entries.size > 0;
|
|
2599
2599
|
}
|
|
2600
2600
|
put(t, e) {
|
|
2601
|
-
this.entries.set(
|
|
2601
|
+
this.entries.set(H(t), e);
|
|
2602
2602
|
}
|
|
2603
2603
|
relativePaths(t = "", e = !1) {
|
|
2604
2604
|
return [...this.relativeEntries(t, e)].map(([i]) => i);
|
|
@@ -2607,7 +2607,7 @@ class Rs {
|
|
|
2607
2607
|
return Object.fromEntries(this.relativeEntries(t, e));
|
|
2608
2608
|
}
|
|
2609
2609
|
*relativeEntries(t = "", e = !1) {
|
|
2610
|
-
const i =
|
|
2610
|
+
const i = H(t), s = i ? `${i}/` : "";
|
|
2611
2611
|
for (const [o, r] of this.entries)
|
|
2612
2612
|
if (!s || o.startsWith(s)) yield [s ? o.slice(s.length) : o, r];
|
|
2613
2613
|
else if (e) {
|
|
@@ -2620,15 +2620,15 @@ class Rs {
|
|
|
2620
2620
|
resolve(t, e = "") {
|
|
2621
2621
|
const i = this.find(t, e);
|
|
2622
2622
|
if (i) return i;
|
|
2623
|
-
const s =
|
|
2624
|
-
if (this.source.url) return
|
|
2623
|
+
const s = H(e).split("/").slice(0, -1).join("/");
|
|
2624
|
+
if (this.source.url) return H(`${s}/${t.replace(/^package:\/\//, "")}`);
|
|
2625
2625
|
throw ft(`Simulation resource not found: ${t}`, "E_ASSET_RESOURCE_NOT_FOUND");
|
|
2626
2626
|
}
|
|
2627
2627
|
find(t, e = "") {
|
|
2628
|
-
const i =
|
|
2628
|
+
const i = H(t.replace(/^package:\/\//, ""));
|
|
2629
2629
|
if (Nt(i)) return this.entries.has(i) ? i : null;
|
|
2630
|
-
const s =
|
|
2631
|
-
for (const r of [
|
|
2630
|
+
const s = H(e).split("/").slice(0, -1).join("/");
|
|
2631
|
+
for (const r of [H(`${s}/${t.replace(/^package:\/\//, "")}`), i])
|
|
2632
2632
|
if (this.entries.has(r)) return r;
|
|
2633
2633
|
const o = this.paths().filter(
|
|
2634
2634
|
(r) => !Nt(r) && (r === i || r.endsWith(`/${i}`) || i.endsWith(`/${r}`))
|
|
@@ -2654,7 +2654,7 @@ class Rs {
|
|
|
2654
2654
|
}
|
|
2655
2655
|
async ensure(t, e = this.source.signal) {
|
|
2656
2656
|
if (Lt(e), this.disposed) throw new DOMException("The resource package was disposed.", "AbortError");
|
|
2657
|
-
const i =
|
|
2657
|
+
const i = H(t);
|
|
2658
2658
|
if (this.entries.has(i)) return;
|
|
2659
2659
|
const s = this.failures.get(i);
|
|
2660
2660
|
if (s) throw s;
|
|
@@ -2711,7 +2711,7 @@ class Rs {
|
|
|
2711
2711
|
}
|
|
2712
2712
|
/** The recorded failure for a resource, if a previous read already failed. */
|
|
2713
2713
|
failureOf(t) {
|
|
2714
|
-
return this.failures.get(
|
|
2714
|
+
return this.failures.get(H(t));
|
|
2715
2715
|
}
|
|
2716
2716
|
objectUrl(t) {
|
|
2717
2717
|
const e = this.resolve(t);
|
|
@@ -2740,7 +2740,7 @@ class Rs {
|
|
|
2740
2740
|
* entry directory does not contain falls back to the whole package.
|
|
2741
2741
|
*/
|
|
2742
2742
|
texturesUnderEntryDirectory(t) {
|
|
2743
|
-
const e =
|
|
2743
|
+
const e = H(t);
|
|
2744
2744
|
return e ? this.paths().filter((i) => i.startsWith(`${e}/`) && /\d{4}\.[^/]*$/i.test(i)) : [];
|
|
2745
2745
|
}
|
|
2746
2746
|
objectUrlIfPresent(t, e = "") {
|
|
@@ -2750,15 +2750,17 @@ class Rs {
|
|
|
2750
2750
|
findPresent(t, e = "") {
|
|
2751
2751
|
if (Nt(t)) {
|
|
2752
2752
|
if (this.entries.has(t)) return t;
|
|
2753
|
-
const
|
|
2754
|
-
return
|
|
2755
|
-
}
|
|
2756
|
-
const i =
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2753
|
+
const c = this.bindPackageReference(t, e);
|
|
2754
|
+
return c === t ? null : this.findPresent(c, e);
|
|
2755
|
+
}
|
|
2756
|
+
const i = H(e), s = i ? `${i}/` : "", o = H(t), r = H(s ? `${s}${o}` : o);
|
|
2757
|
+
if (this.entries.has(r)) return r;
|
|
2758
|
+
const a = s ? this.paths().filter((c) => {
|
|
2759
|
+
if (!c.startsWith(s)) return !1;
|
|
2760
|
+
const d = c.slice(s.length);
|
|
2761
|
+
return d === o || o.endsWith(`/${d}`);
|
|
2760
2762
|
}) : [];
|
|
2761
|
-
return
|
|
2763
|
+
return a.length === 1 ? a[0] : this.find(t);
|
|
2762
2764
|
}
|
|
2763
2765
|
/**
|
|
2764
2766
|
* Rewrites a protocol reference (`https://bucket/asset/textures/a.png`,
|
|
@@ -2769,7 +2771,7 @@ class Rs {
|
|
|
2769
2771
|
* References that are not URLs, or that bind to nothing, are returned as-is.
|
|
2770
2772
|
*/
|
|
2771
2773
|
bindPackageReference(t, e = "") {
|
|
2772
|
-
const i =
|
|
2774
|
+
const i = H(e), s = i ? `${i}/` : "", o = hs(t).flatMap((a) => a.split("/")).filter(Boolean);
|
|
2773
2775
|
if (!o.length) return t;
|
|
2774
2776
|
let r = null;
|
|
2775
2777
|
for (const a of this.paths()) {
|
|
@@ -2796,9 +2798,9 @@ async function Ds(n, t) {
|
|
|
2796
2798
|
return e.text();
|
|
2797
2799
|
}
|
|
2798
2800
|
function Cs(n) {
|
|
2799
|
-
return
|
|
2801
|
+
return H(n);
|
|
2800
2802
|
}
|
|
2801
|
-
function
|
|
2803
|
+
function H(n) {
|
|
2802
2804
|
if (Nt(n)) return n;
|
|
2803
2805
|
const t = [];
|
|
2804
2806
|
for (const e of n.replaceAll("\\", "/").split("/"))
|
|
@@ -10,7 +10,7 @@ import { createCadDocumentSession as tr, getCadDocumentRenderResource as ir, for
|
|
|
10
10
|
import { CSS2DObject as nr, CSS2DRenderer as rr } from "three/addons/renderers/CSS2DRenderer.js";
|
|
11
11
|
import { viewerRuntimeAssetUrls as Yt } from "@nebula-spatial/viewer/runtime-assets";
|
|
12
12
|
import sr from "@mujoco/mujoco/mujoco.wasm?url";
|
|
13
|
-
const ar = "0.5.
|
|
13
|
+
const ar = "0.5.15", or = "@nebula-spatial/viewer", Wt = "__NEBULA_SPATIAL_VIEWER_BANNER_PRINTED__";
|
|
14
14
|
function Gt() {
|
|
15
15
|
const r = `%c ${or} %c v${ar} `;
|
|
16
16
|
console.log(r, "background:#111827;color:#ffffff;padding:4px 10px;border-radius:4px 0 0 4px;font-weight:700;", "background:#10B981;color:#ffffff;padding:4px 10px;border-radius:0 4px 4px 0;font-weight:700;");
|
|
@@ -8961,7 +8961,7 @@ function Yo(r, e, t) {
|
|
|
8961
8961
|
function se(r) {
|
|
8962
8962
|
const e = [];
|
|
8963
8963
|
for (const t of r.replaceAll("\\", "/").split("/"))
|
|
8964
|
-
!t || t === "." || (t === ".." ? e.pop() : e.push(t));
|
|
8964
|
+
!t || t === "." || (t === ".." ? e.length && e.at(-1) !== ".." ? e.pop() : e.push("..") : e.push(t));
|
|
8965
8965
|
return e.join("/");
|
|
8966
8966
|
}
|
|
8967
8967
|
async function Wo(r, e, t) {
|
|
@@ -9544,7 +9544,7 @@ const Ko = {
|
|
|
9544
9544
|
clearColor: Ee.dark
|
|
9545
9545
|
},
|
|
9546
9546
|
async createSession(e, t) {
|
|
9547
|
-
const { createModelSession: i } = await import("./session-
|
|
9547
|
+
const { createModelSession: i } = await import("./session-mJGcCljH.js");
|
|
9548
9548
|
return i(e, t);
|
|
9549
9549
|
}
|
|
9550
9550
|
});
|
|
@@ -9628,7 +9628,7 @@ const tl = {
|
|
|
9628
9628
|
clearColor: Ee.dark
|
|
9629
9629
|
},
|
|
9630
9630
|
async createSession(e, t) {
|
|
9631
|
-
const { createSimulationSession: i } = await import("./session-
|
|
9631
|
+
const { createSimulationSession: i } = await import("./session-AUG5EJBJ.js").then((n) => n.a);
|
|
9632
9632
|
return i(e, t);
|
|
9633
9633
|
}
|
|
9634
9634
|
});
|
|
@@ -10805,14 +10805,14 @@ function td(r) {
|
|
|
10805
10805
|
const e = r;
|
|
10806
10806
|
return e.usdQuery ? e.usdQuery : !r.stage || !r.pxr ? null : e.usdQuery = ml(r.stage, r.pxr);
|
|
10807
10807
|
}
|
|
10808
|
-
const fl = 1, vl = 3, gl = "
|
|
10808
|
+
const fl = 1, vl = 3, gl = "26ba7dc16b5a87a490fb", bl = {
|
|
10809
10809
|
file: "openusd_probe.js",
|
|
10810
10810
|
sha256: "83a14d264f2348a0899de8f1bc0c021fdcd8cae554ef545fb9e5b88da6f30b4e",
|
|
10811
10811
|
bytes: 95918
|
|
10812
10812
|
}, yl = {
|
|
10813
10813
|
file: "openusd_probe.wasm",
|
|
10814
|
-
sha256: "
|
|
10815
|
-
bytes:
|
|
10814
|
+
sha256: "ee1fa0050c8d220e13666325f81fc730940b6704a0900952cbef1505def8c3b4",
|
|
10815
|
+
bytes: 10659670
|
|
10816
10816
|
}, xl = {
|
|
10817
10817
|
schemaVersion: fl,
|
|
10818
10818
|
apiVersion: vl,
|
|
@@ -10902,7 +10902,7 @@ function rd(r = {}) {
|
|
|
10902
10902
|
}
|
|
10903
10903
|
let Zi = null;
|
|
10904
10904
|
function sd() {
|
|
10905
|
-
return Zi ?? (Zi = import("./usd-session-
|
|
10905
|
+
return Zi ?? (Zi = import("./usd-session-Dexv9ijX.js").then(() => {
|
|
10906
10906
|
})), Zi;
|
|
10907
10907
|
}
|
|
10908
10908
|
function El(r) {
|
|
@@ -11128,7 +11128,7 @@ function Ln(r, e) {
|
|
|
11128
11128
|
function Dn() {
|
|
11129
11129
|
return new Worker(new URL(
|
|
11130
11130
|
/* @vite-ignore */
|
|
11131
|
-
"" + new URL("assets/usd-worker-
|
|
11131
|
+
"" + new URL("assets/usd-worker-DU-u_iJN.js", import.meta.url).href,
|
|
11132
11132
|
import.meta.url
|
|
11133
11133
|
), {
|
|
11134
11134
|
type: "module",
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as r, v as s, A as o, w as U, U as E, u as _, y as d, B as D, C as R, E as S, F as i, k as u, G as c, H as C, I as O } from "./index-
|
|
1
|
+
import { D as r, v as s, A as o, w as U, U as E, u as _, y as d, B as D, C as R, E as S, F as i, k as u, G as c, H as C, I as O } from "./index-YdnQRm_T.js";
|
|
2
2
|
import { configureCadTextBuilder as m } from "@nebula-spatial/cad-loader";
|
|
3
3
|
export {
|
|
4
4
|
r as DEFAULT_GROUND_GRID_SCALE,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as v, s as E } from "./session-
|
|
1
|
+
import { c as v, s as E } from "./session-AUG5EJBJ.js";
|
|
2
2
|
import { Group as q, Euler as z, BoxGeometry as G, SphereGeometry as N, CylinderGeometry as P, CapsuleGeometry as $, PlaneGeometry as I, Mesh as X } from "three";
|
|
3
3
|
import { disposeModelResources as j } from "./resources-CHhCm2f7.js";
|
|
4
4
|
function U(f) {
|
|
@@ -3,7 +3,7 @@ var B = (v, t, e) => t in v ? F(v, t, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var f = (v, t, e) => B(v, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import L from "@mujoco/mujoco";
|
|
5
5
|
import { Quaternion as D, Vector3 as q } from "three";
|
|
6
|
-
import { b as R, z as C } from "./index-
|
|
6
|
+
import { b as R, z as C } from "./index-YdnQRm_T.js";
|
|
7
7
|
let z = 0;
|
|
8
8
|
function V(v, t) {
|
|
9
9
|
const e = `/viewer-simulation-${++z}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as Je, f as ze, c as Ve, a as ke, b as $e, g as Be, w as Xe, h as Ie, p as se, S as je, e as He } from "./collision-debug-
|
|
1
|
+
import { d as Je, f as ze, c as Ve, a as ke, b as $e, g as Be, w as Xe, h as Ie, p as se, S as je, e as He } from "./collision-debug-1-acufd9.js";
|
|
2
2
|
import { disposeModelResources as ae } from "./resources-CHhCm2f7.js";
|
|
3
|
-
import { D as We } from "./index-
|
|
4
|
-
import { S as oe } from "./stage-
|
|
3
|
+
import { D as We } from "./index-YdnQRm_T.js";
|
|
4
|
+
import { S as oe } from "./stage-BVdJLgsW.js";
|
|
5
5
|
import { Color as Ye, LinearSRGBColorSpace as Ke, SRGBColorSpace as Ce, MeshPhysicalMaterial as Qe, Float32BufferAttribute as Z, DataTexture as Ze, RGBAFormat as xe, UnsignedByteType as et, NoColorSpace as tt, RepeatWrapping as rt, LinearFilter as st, LinearMipmapLinearFilter as ot, BufferGeometry as fe, Group as Ee, Mesh as Ae, PlaneGeometry as Oe, BoxGeometry as Re, SphereGeometry as ie, Matrix4 as nt, CylinderGeometry as Fe, CapsuleGeometry as Te, BufferAttribute as le } from "three";
|
|
6
6
|
const X = 0.7, ne = 0.2, at = 110 * Math.PI / 180;
|
|
7
7
|
function it(t, e = {}) {
|
|
@@ -516,7 +516,7 @@ function St(t, e) {
|
|
|
516
516
|
const U = e.format;
|
|
517
517
|
if (U === "usd" || U === "usda" || U === "usdc" || U === "usdz") {
|
|
518
518
|
(l = e.reportProgress) == null || l.call(e, "usd-visual", "正在解析 USD 视觉场景...");
|
|
519
|
-
const A = await (await import("./usd-session-
|
|
519
|
+
const A = await (await import("./usd-session-Dexv9ijX.js")).loadUsdSimulation(t, e, a);
|
|
520
520
|
if (w || e.signal.aborted)
|
|
521
521
|
throw A.dispose(), ce();
|
|
522
522
|
T = A, u = { root: A.visual.root, sync() {
|
|
@@ -532,7 +532,7 @@ function St(t, e) {
|
|
|
532
532
|
}
|
|
533
533
|
if (U === "urdf" || U === "xacro") {
|
|
534
534
|
(N = e.reportProgress) == null || N.call(e, "urdf", "正在解析 URDF 场景与运动学结构...");
|
|
535
|
-
const A = await (await import("./urdf-session-
|
|
535
|
+
const A = await (await import("./urdf-session-oLRIcAw1.js")).loadUrdfSimulation(t, e, a);
|
|
536
536
|
if (w || e.signal.aborted)
|
|
537
537
|
throw A.dispose(), ce();
|
|
538
538
|
E = A.asset, o = A.stage, P = A.inspection, c = A.dispose, f = A.step, n = A.reset, i = A.play, b = A.pause, p = A.isPlaying, M = () => A.capabilities, S = () => A.physics, m = !1, v = !1, g = A.warning ?? null, $(), W();
|
|
@@ -556,7 +556,7 @@ function St(t, e) {
|
|
|
556
556
|
(_e = e.reportProgress) == null || _e.call(e, "compile", "正在编译物理模型与参数...");
|
|
557
557
|
const L = await ut(E);
|
|
558
558
|
Q(w, e.signal), (ge = e.reportProgress) == null || ge.call(e, "runtime", "正在初始化物理内核...");
|
|
559
|
-
const { MujocoRuntime: A } = await import("./mujoco-runtime-
|
|
559
|
+
const { MujocoRuntime: A } = await import("./mujoco-runtime-gqyaQh9L.js");
|
|
560
560
|
s = new A(), await s.initialize(L, {
|
|
561
561
|
baseUrl: e.options.mujocoBaseUrl,
|
|
562
562
|
wasmModule: e.options.mujocoWasmModule
|
|
@@ -564,7 +564,7 @@ function St(t, e) {
|
|
|
564
564
|
} catch (L) {
|
|
565
565
|
const A = se(L, e.signal, "mjcf-physics");
|
|
566
566
|
s == null || s.dispose(), s = null;
|
|
567
|
-
const { compileMjcfPreview: K } = await import("./mjcf-visual-
|
|
567
|
+
const { compileMjcfPreview: K } = await import("./mjcf-visual-DTO5j9bm.js");
|
|
568
568
|
let z;
|
|
569
569
|
try {
|
|
570
570
|
z = K(E);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DataTexture as ne, LinearMipmapLinearFilter as ke, LinearFilter as Xe, Loader as J, LoaderUtils as _e, FileLoader as Ve, TextureLoader as Me, RepeatWrapping as ue, ClampToEdgeWrapping as pe, Texture as Y, MeshPhongMaterial as W, MeshLambertMaterial as Se, ColorManagement as N, Color as k, SRGBColorSpace as X, EquirectangularReflectionMapping as Ge, Matrix4 as L, Group as ce, Bone as fe, PropertyBinding as ee, Object3D as Z, PerspectiveCamera as Ne, PointLight as he, MathUtils as B, SpotLight as $e, DirectionalLight as ze, SkinnedMesh as je, Mesh as Fe, LineBasicMaterial as He, Line as We, Vector3 as V, Skeleton as Ye, AmbientLight as qe, BufferGeometry as re, Float32BufferAttribute as j, Uint16BufferAttribute as Ke, Matrix3 as Ze, Vector2 as Qe, ShapeUtils as Je, Vector4 as et, Euler as z, AnimationClip as tt, Quaternion as G, VectorKeyframeTrack as nt, QuaternionKeyframeTrack as de, NumberKeyframeTrack as rt, LoadingManager as st, LinearSRGBColorSpace as me, RGBAFormat as Ie, UnsignedByteType as Ae, NoColorSpace as at, MeshPhysicalMaterial as Re, Box3 as ot } from "three";
|
|
2
2
|
import { DRACOLoader as it } from "three/examples/jsm/loaders/DRACOLoader.js";
|
|
3
3
|
import { GLTFLoader as lt } from "three/examples/jsm/loaders/GLTFLoader.js";
|
|
4
|
-
import { D as ct } from "./index-
|
|
5
|
-
import { d as ge, a as ye, S as ut } from "./stage-
|
|
4
|
+
import { D as ct } from "./index-YdnQRm_T.js";
|
|
5
|
+
import { d as ge, a as ye, S as ut } from "./stage-BVdJLgsW.js";
|
|
6
6
|
import { TGALoader as pt } from "three/examples/jsm/loaders/TGALoader.js";
|
|
7
7
|
import * as ft from "three/examples/jsm/libs/fflate.module.js";
|
|
8
8
|
import { unzlibSync as ht } from "three/examples/jsm/libs/fflate.module.js";
|
|
@@ -3,7 +3,7 @@ var S = (a, t, e) => t in a ? R(a, t, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var s = (a, t, e) => S(a, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import * as i from "three";
|
|
5
5
|
import { Quaternion as P, Vector3 as V } from "three";
|
|
6
|
-
import { V as b, D as A, y as W } from "./index-
|
|
6
|
+
import { V as b, D as A, y as W } from "./index-YdnQRm_T.js";
|
|
7
7
|
import { disposeModelResources as T } from "./resources-CHhCm2f7.js";
|
|
8
8
|
const v = 1, B = (
|
|
9
9
|
/* glsl */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var We = Object.defineProperty;
|
|
2
2
|
var Ce = (i, e, n) => e in i ? We(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
|
|
3
3
|
var A = (i, e, n) => Ce(i, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { d as Ge, f as Te, c as Ve, a as Je, b as ye, M as Be, i as Qe, h as Xe, w as be, j as ge, S as we, p as Ke } from "./collision-debug-
|
|
5
|
-
import { S as Ze, m as ve } from "./stage-
|
|
4
|
+
import { d as Ge, f as Te, c as Ve, a as Je, b as ye, M as Be, i as Qe, h as Xe, w as be, j as ge, S as we, p as Ke } from "./collision-debug-1-acufd9.js";
|
|
5
|
+
import { S as Ze, m as ve } from "./stage-BVdJLgsW.js";
|
|
6
6
|
import { Quaternion as O, Euler as X, LoadingManager as Pe, Group as L, Mesh as U, MeshLambertMaterial as Ye, MeshPhongMaterial as Me, MeshStandardMaterial as oe, Matrix4 as I, TextureLoader as He, SRGBColorSpace as et, RepeatWrapping as tt, BoxGeometry as re, SphereGeometry as ae, CylinderGeometry as _e, CapsuleGeometry as De, Vector3 as z, MathUtils as it, Matrix3 as Re, Box3 as Ae, AxesHelper as nt, ArrowHelper as $e, Line as st, BufferGeometry as ot, LineBasicMaterial as Ee, Float32BufferAttribute as rt, MeshBasicMaterial as je, LineSegments as at, EdgesGeometry as lt } from "three";
|
|
7
|
-
import { c as Se } from "./session-
|
|
7
|
+
import { c as Se } from "./session-AUG5EJBJ.js";
|
|
8
8
|
import { GLTFLoader as ct } from "three/examples/jsm/loaders/GLTFLoader.js";
|
|
9
9
|
import { ColladaLoader as ut } from "three/examples/jsm/loaders/ColladaLoader.js";
|
|
10
10
|
import { disposeModelResources as N } from "./resources-CHhCm2f7.js";
|
|
@@ -1124,7 +1124,7 @@ async function Jt(i, e, n) {
|
|
|
1124
1124
|
const l = e.format === "xacro";
|
|
1125
1125
|
if (l) {
|
|
1126
1126
|
(q = e.reportProgress) == null || q.call(e, "xacro", "正在展开 Xacro 宏与依赖文件...");
|
|
1127
|
-
const { expandXacro: v } = await import("./xacro-
|
|
1127
|
+
const { expandXacro: v } = await import("./xacro-BjsYN_8k.js");
|
|
1128
1128
|
s = await v(s, t, n, e.options.xacro, e.signal);
|
|
1129
1129
|
}
|
|
1130
1130
|
if (e.signal.aborted) throw Q();
|
|
@@ -1174,7 +1174,7 @@ async function Jt(i, e, n) {
|
|
|
1174
1174
|
try {
|
|
1175
1175
|
const G = await vt(o);
|
|
1176
1176
|
if (e.signal.aborted || R) throw Q();
|
|
1177
|
-
const Z = await import("./mujoco-runtime-
|
|
1177
|
+
const Z = await import("./mujoco-runtime-gqyaQh9L.js");
|
|
1178
1178
|
if (v = new Z.MujocoRuntime(), await v.initialize(G, {
|
|
1179
1179
|
baseUrl: e.options.mujocoBaseUrl,
|
|
1180
1180
|
wasmModule: e.options.mujocoWasmModule
|