@nebula-spatial/viewer 0.4.1 → 0.4.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/CHANGELOG.md +6 -0
- package/README.md +4 -1
- package/dist/{index-D0lW4RQP.js → index-C9CW-EyW.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{session-DNMxzxd5.js → session-B-qVl3Yy.js} +162 -163
- package/dist/{session-B4uKXhdV.js → session-B2SfkK9o.js} +1 -1
- package/dist/{stage-CFr9ZkwQ.js → stage-D-Q_zul6.js} +1 -1
- package/dist/{usd-session-DDWM5msM.js → usd-session-DCuV_H-Y.js} +191 -175
- package/package.json +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { d as
|
|
5
|
-
import { ConvexGeometry as
|
|
6
|
-
import { LineBasicMaterial as
|
|
7
|
-
import { GLTFLoader as
|
|
8
|
-
import { OBJLoader as
|
|
9
|
-
import { STLLoader as
|
|
10
|
-
class
|
|
1
|
+
var Se = Object.defineProperty;
|
|
2
|
+
var Ae = (o, e, t) => e in o ? Se(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var q = (o, e, t) => Ae(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { d as ve, S as ue } from "./stage-D-Q_zul6.js";
|
|
5
|
+
import { ConvexGeometry as Me } from "three/examples/jsm/geometries/ConvexGeometry.js";
|
|
6
|
+
import { LineBasicMaterial as Oe, EdgesGeometry as W, LineSegments as $e, Group as z, MeshStandardMaterial as ye, Mesh as N, PlaneGeometry as Re, BoxGeometry as X, SphereGeometry as te, CylinderGeometry as re, CapsuleGeometry as be, Vector3 as T, BufferGeometry as Pe, BufferAttribute as ce, Euler as J, MathUtils as Ue, Matrix3 as fe, Matrix4 as k, Quaternion as ge, LoadingManager as Fe } from "three";
|
|
7
|
+
import { GLTFLoader as De } from "three/examples/jsm/loaders/GLTFLoader.js";
|
|
8
|
+
import { OBJLoader as qe } from "three/examples/jsm/loaders/OBJLoader.js";
|
|
9
|
+
import { STLLoader as Ge } from "three/examples/jsm/loaders/STLLoader.js";
|
|
10
|
+
class Y {
|
|
11
11
|
constructor(e, t) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
q(this, "root");
|
|
13
|
+
q(this, "bodies", /* @__PURE__ */ new Map());
|
|
14
|
+
q(this, "disposed", !1);
|
|
15
15
|
this.runtime = e, this.root = t.root;
|
|
16
16
|
const r = e.mujoco, n = e.model;
|
|
17
17
|
for (const [l, u] of t.bindings) {
|
|
18
18
|
const c = r.mj_name2id(n, r.mjtObj.mjOBJ_BODY.value, l);
|
|
19
|
-
if (c < 0) throw
|
|
19
|
+
if (c < 0) throw me(`Physics body missing for visual link: ${l}`, "E_SIMULATION_BIND");
|
|
20
20
|
u.userData.bodyId = c, this.bodies.set(c, u);
|
|
21
21
|
}
|
|
22
|
-
if (this.bodies.size !== t.expectedLinkCount) throw
|
|
22
|
+
if (this.bodies.size !== t.expectedLinkCount) throw me("Visual body binding count mismatch.", "E_SIMULATION_BIND");
|
|
23
23
|
this.sync();
|
|
24
24
|
}
|
|
25
25
|
sync() {
|
|
@@ -32,19 +32,19 @@ class W {
|
|
|
32
32
|
this.root.updateMatrixWorld(!0);
|
|
33
33
|
}
|
|
34
34
|
dispose() {
|
|
35
|
-
this.disposed || (this.disposed = !0, this.bodies.clear(),
|
|
35
|
+
this.disposed || (this.disposed = !0, this.bodies.clear(), ve(this.root));
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function me(o, e) {
|
|
39
39
|
return Object.assign(new Error(o), { code: e });
|
|
40
40
|
}
|
|
41
|
-
class
|
|
41
|
+
class Ce {
|
|
42
42
|
constructor(e) {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
q(this, "entries", /* @__PURE__ */ new Map());
|
|
44
|
+
q(this, "objectUrls", /* @__PURE__ */ new Map());
|
|
45
45
|
this.source = e;
|
|
46
46
|
const t = e.original;
|
|
47
|
-
if (
|
|
47
|
+
if (Ie(t))
|
|
48
48
|
for (const r of t.files) this.entries.set(A(r.path), r.file);
|
|
49
49
|
else typeof Blob < "u" && t instanceof Blob ? this.entries.set(e.entryPath ?? e.filename ?? "asset", t) : t instanceof ArrayBuffer ? this.entries.set(e.entryPath ?? e.filename ?? "asset", new Blob([t])) : typeof t == "object" && t !== null && "kind" in t && t.kind === "buffer" && this.entries.set(e.entryPath ?? e.filename ?? "asset", new Blob([t.buffer]));
|
|
50
50
|
}
|
|
@@ -137,20 +137,20 @@ function A(o) {
|
|
|
137
137
|
!t || t === "." || (t === ".." && e.length && e.at(-1) !== ".." ? e.pop() : e.push(t));
|
|
138
138
|
return e.join("/");
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function Ie(o) {
|
|
141
141
|
return typeof o == "object" && o !== null && "kind" in o && o.kind === "files";
|
|
142
142
|
}
|
|
143
143
|
function U(o, e) {
|
|
144
144
|
return Object.assign(new Error(o), { code: e });
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function we() {
|
|
147
147
|
return { errors: [], warnings: [], approximations: [], droppedFeatures: [] };
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function _e(o) {
|
|
150
150
|
const e = Object.freeze({ schemaVersion: 1, ...o });
|
|
151
|
-
return
|
|
151
|
+
return Ne(e), e;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Ne(o) {
|
|
154
154
|
if (!o.id.trim() || !o.name.trim()) throw x("Asset IR id and name are required.", "E_ASSET_IR_INVALID");
|
|
155
155
|
if (o.source.format !== "usd" && o.links.length === 0) throw x("Asset IR requires at least one link.", "E_ASSET_IR_INVALID");
|
|
156
156
|
const e = /* @__PURE__ */ new Set();
|
|
@@ -171,7 +171,7 @@ function x(o, e) {
|
|
|
171
171
|
async function ze(o, e, t) {
|
|
172
172
|
var i;
|
|
173
173
|
const r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set(), u = async (s, m) => {
|
|
174
|
-
if (l.has(s)) throw
|
|
174
|
+
if (l.has(s)) throw K(`MJCF include cycle: ${s}`, "E_MJCF_INCLUDE_CYCLE");
|
|
175
175
|
l.add(s);
|
|
176
176
|
const b = Ve(m, s);
|
|
177
177
|
r.set(s, b);
|
|
@@ -184,14 +184,14 @@ async function ze(o, e, t) {
|
|
|
184
184
|
};
|
|
185
185
|
await u(e, o);
|
|
186
186
|
const c = (i = r.get(e)) == null ? void 0 : i.querySelector("mujoco");
|
|
187
|
-
if (!c || n.size === 0) throw
|
|
188
|
-
return
|
|
187
|
+
if (!c || n.size === 0) throw K("MJCF requires a mujoco root and at least one named body.", "E_MJCF_PARSE");
|
|
188
|
+
return _e({
|
|
189
189
|
id: c.getAttribute("model") || e,
|
|
190
190
|
name: c.getAttribute("model") || e,
|
|
191
191
|
source: { format: "mjcf", uri: e },
|
|
192
192
|
links: [...n].map((s) => ({ id: s, name: s, visuals: [], collisions: [] })),
|
|
193
193
|
joints: [],
|
|
194
|
-
diagnostics:
|
|
194
|
+
diagnostics: we(),
|
|
195
195
|
extension: { files: t, xml: o, documents: r }
|
|
196
196
|
});
|
|
197
197
|
}
|
|
@@ -252,42 +252,41 @@ function xe(o, e) {
|
|
|
252
252
|
}
|
|
253
253
|
function Ve(o, e) {
|
|
254
254
|
const t = new DOMParser().parseFromString(o, "application/xml"), r = t.querySelector("parsererror");
|
|
255
|
-
if (r) throw
|
|
255
|
+
if (r) throw K(`MJCF XML parse failed (${e}): ${r.textContent ?? ""}`, "E_MJCF_PARSE");
|
|
256
256
|
return t;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function K(o, e) {
|
|
259
259
|
return Object.assign(new Error(o), { code: e });
|
|
260
260
|
}
|
|
261
|
-
const Xe = 1476466, Je = 0.72, He = 20;
|
|
262
|
-
function
|
|
263
|
-
return new
|
|
261
|
+
const Xe = 1476466, Je = 0.72, He = 20, We = 1;
|
|
262
|
+
function Ye() {
|
|
263
|
+
return new Oe({
|
|
264
264
|
color: Xe,
|
|
265
265
|
transparent: !0,
|
|
266
266
|
opacity: Je,
|
|
267
267
|
depthTest: !1
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
|
-
function Ye(o, e) {
|
|
271
|
-
const t = new Oe(
|
|
272
|
-
new $e(o, He),
|
|
273
|
-
e
|
|
274
|
-
);
|
|
275
|
-
return t.renderOrder = 9, t;
|
|
276
|
-
}
|
|
277
|
-
const me = 0.68;
|
|
278
270
|
function Ze(o, e) {
|
|
279
|
-
|
|
271
|
+
let t = new W(o, He);
|
|
272
|
+
t.getAttribute("position").count === 0 && (t.dispose(), t = new W(o, We)), t.getAttribute("position").count === 0 && (t.dispose(), t = new W(o, 0));
|
|
273
|
+
const r = new $e(t, e);
|
|
274
|
+
return r.renderOrder = 9, r;
|
|
275
|
+
}
|
|
276
|
+
const de = 0.68;
|
|
277
|
+
function Qe(o, e) {
|
|
278
|
+
if (e < 0) return de;
|
|
280
279
|
const t = o.mat_roughness[e];
|
|
281
280
|
if (t >= 0) return t;
|
|
282
281
|
const r = o.mat_shininess[e];
|
|
283
|
-
return !Number.isFinite(r) || r <= 0 ?
|
|
282
|
+
return !Number.isFinite(r) || r <= 0 ? de : Math.sqrt(2 / (r + 2));
|
|
284
283
|
}
|
|
285
|
-
function
|
|
284
|
+
function Ke(o, e) {
|
|
286
285
|
if (e < 0) return 0;
|
|
287
286
|
const t = o.mat_metallic[e];
|
|
288
287
|
return Number.isFinite(t) && t >= 0 ? t : 0;
|
|
289
288
|
}
|
|
290
|
-
function
|
|
289
|
+
function Z(o, e = !1) {
|
|
291
290
|
const t = o.model, r = o.mujoco, n = new z();
|
|
292
291
|
n.name = "MuJoCo scene";
|
|
293
292
|
const l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
|
|
@@ -298,13 +297,13 @@ function Y(o, e = !1) {
|
|
|
298
297
|
s.name = i, s.userData.bodyId = c, l.set(c, s), u.set(i, s), n.add(s);
|
|
299
298
|
}
|
|
300
299
|
if (e && l.set(0, n), e) {
|
|
301
|
-
const c =
|
|
300
|
+
const c = Ye();
|
|
302
301
|
let i = 0;
|
|
303
302
|
for (let s = 0; s < t.ngeom; s += 1) {
|
|
304
303
|
if (r.mj_id2name(t, r.mjtObj.mjOBJ_GEOM.value, s) === "__viewer_default_ground__" || t.geom_contype[s] === 0 && t.geom_conaffinity[s] === 0) continue;
|
|
305
|
-
const b = l.get(t.geom_bodyid[s]), h =
|
|
304
|
+
const b = l.get(t.geom_bodyid[s]), h = et(o, s);
|
|
306
305
|
if (!b || !h) continue;
|
|
307
|
-
const p =
|
|
306
|
+
const p = Ze(h, c);
|
|
308
307
|
h.dispose(), p.userData.geomId = s, i += 1;
|
|
309
308
|
const f = s * 3, a = s * 4;
|
|
310
309
|
p.position.fromArray(t.geom_pos, f), p.quaternion.set(t.geom_quat[a + 1], t.geom_quat[a + 2], t.geom_quat[a + 3], t.geom_quat[a]), b.add(p);
|
|
@@ -313,35 +312,35 @@ function Y(o, e = !1) {
|
|
|
313
312
|
} else
|
|
314
313
|
for (let c = 0; c < t.ngeom; c += 1) {
|
|
315
314
|
if (t.geom_group[c] > 2) continue;
|
|
316
|
-
const i = l.get(t.geom_bodyid[c]), s =
|
|
315
|
+
const i = l.get(t.geom_bodyid[c]), s = tt(o, c);
|
|
317
316
|
if (!i || !s) continue;
|
|
318
|
-
const m = c * 4, b = t.geom_matid[c], h = new
|
|
317
|
+
const m = c * 4, b = t.geom_matid[c], h = new ye({
|
|
319
318
|
opacity: t.geom_rgba[m + 3],
|
|
320
319
|
transparent: t.geom_rgba[m + 3] < 1,
|
|
321
|
-
roughness:
|
|
322
|
-
metalness:
|
|
320
|
+
roughness: Qe(t, b),
|
|
321
|
+
metalness: Ke(t, b)
|
|
323
322
|
});
|
|
324
323
|
if (h.color.setRGB(t.geom_rgba[m], t.geom_rgba[m + 1], t.geom_rgba[m + 2]), b >= 0 && [0.5, 0.5, 0.5, 1].every((d, _) => t.geom_rgba[m + _] === d)) {
|
|
325
324
|
const d = b * 4;
|
|
326
325
|
h.color.setRGB(t.mat_rgba[d], t.mat_rgba[d + 1], t.mat_rgba[d + 2]), h.opacity = t.mat_rgba[d + 3], h.transparent = h.opacity < 1;
|
|
327
326
|
}
|
|
328
|
-
const p = new
|
|
327
|
+
const p = new N(s, h), f = c * 3, a = c * 4;
|
|
329
328
|
p.position.fromArray(t.geom_pos, f), p.quaternion.set(t.geom_quat[a + 1], t.geom_quat[a + 2], t.geom_quat[a + 3], t.geom_quat[a]), i.add(p);
|
|
330
329
|
}
|
|
331
330
|
return { root: n, bindings: u, expectedLinkCount: u.size };
|
|
332
331
|
}
|
|
333
|
-
function
|
|
332
|
+
function et(o, e) {
|
|
334
333
|
const t = o.model, r = o.mujoco, n = e * 3, l = t.geom_size[n], u = t.geom_size[n + 1], c = t.geom_size[n + 2], i = t.geom_type[e];
|
|
335
334
|
if (i === r.mjtGeom.mjGEOM_PLANE.value)
|
|
336
335
|
return new Re(Math.max(l * 2, 2), Math.max(u * 2, 2), 10, 10);
|
|
337
336
|
if (i === r.mjtGeom.mjGEOM_BOX.value) return new X(l * 2, u * 2, c * 2);
|
|
338
|
-
if (i === r.mjtGeom.mjGEOM_SPHERE.value) return new
|
|
337
|
+
if (i === r.mjtGeom.mjGEOM_SPHERE.value) return new te(l, 20, 12);
|
|
339
338
|
if (i === r.mjtGeom.mjGEOM_CYLINDER.value) {
|
|
340
|
-
const s = new
|
|
339
|
+
const s = new re(l, l, u * 2, 24);
|
|
341
340
|
return s.rotateX(Math.PI / 2), s;
|
|
342
341
|
}
|
|
343
342
|
if (i === r.mjtGeom.mjGEOM_CAPSULE.value) {
|
|
344
|
-
const s = new
|
|
343
|
+
const s = new be(l, u * 2, 6, 16);
|
|
345
344
|
return s.rotateX(Math.PI / 2), s;
|
|
346
345
|
}
|
|
347
346
|
if (i === r.mjtGeom.mjGEOM_MESH.value) {
|
|
@@ -349,88 +348,88 @@ function Ke(o, e) {
|
|
|
349
348
|
t.mesh_faceadr[s], t.mesh_facenum[s];
|
|
350
349
|
const h = [];
|
|
351
350
|
for (let p = m; p < m + b; p++) h.push(new T(t.mesh_vert[p * 3], t.mesh_vert[p * 3 + 1], t.mesh_vert[p * 3 + 2]));
|
|
352
|
-
return new
|
|
351
|
+
return new Me(h);
|
|
353
352
|
}
|
|
354
353
|
return new X(Math.max(l * 2, 0.02), Math.max(u * 2, 0.02), Math.max(c * 2, 0.02));
|
|
355
354
|
}
|
|
356
|
-
function
|
|
355
|
+
function tt(o, e) {
|
|
357
356
|
const t = o.model, r = o.mujoco, n = e * 3, l = t.geom_size[n], u = t.geom_size[n + 1], c = t.geom_size[n + 2], i = t.geom_type[e];
|
|
358
357
|
if (i === r.mjtGeom.mjGEOM_BOX.value) return new X(l * 2, u * 2, c * 2);
|
|
359
|
-
if (i === r.mjtGeom.mjGEOM_SPHERE.value) return new
|
|
358
|
+
if (i === r.mjtGeom.mjGEOM_SPHERE.value) return new te(l, 24, 16);
|
|
360
359
|
if (i === r.mjtGeom.mjGEOM_CYLINDER.value) {
|
|
361
|
-
const a = new
|
|
360
|
+
const a = new re(l, l, u * 2, 24);
|
|
362
361
|
return a.rotateX(Math.PI / 2), a;
|
|
363
362
|
}
|
|
364
363
|
if (i === r.mjtGeom.mjGEOM_CAPSULE.value) {
|
|
365
|
-
const a = new
|
|
364
|
+
const a = new be(l, u * 2, 6, 16);
|
|
366
365
|
return a.rotateX(Math.PI / 2), a;
|
|
367
366
|
}
|
|
368
367
|
if (i !== r.mjtGeom.mjGEOM_MESH.value) return null;
|
|
369
368
|
const s = t.geom_dataid[e], m = t.mesh_vertadr[s], b = t.mesh_vertnum[s], h = t.mesh_faceadr[s], p = t.mesh_facenum[s], f = new Pe();
|
|
370
|
-
return f.setAttribute("position", new
|
|
369
|
+
return f.setAttribute("position", new ce(Float32Array.from(t.mesh_vert.subarray(m * 3, (m + b) * 3)), 3)), f.setIndex(new ce(Uint32Array.from(t.mesh_face.subarray(h * 3, (h + p) * 3)), 1)), f.computeVertexNormals(), f;
|
|
371
370
|
}
|
|
372
|
-
function
|
|
371
|
+
function C(o, e) {
|
|
373
372
|
if (!o) return [...e];
|
|
374
373
|
const t = o.trim().split(/\s+/).map(Number);
|
|
375
|
-
if (t.some((r) => !Number.isFinite(r))) throw
|
|
374
|
+
if (t.some((r) => !Number.isFinite(r))) throw D(`Invalid numeric value: ${o}`, "E_URDF_PARSE");
|
|
376
375
|
return t;
|
|
377
376
|
}
|
|
378
377
|
function V(o) {
|
|
379
378
|
const e = (o == null ? void 0 : o.querySelector("origin")) ?? null;
|
|
380
|
-
return { position:
|
|
379
|
+
return { position: C((e == null ? void 0 : e.getAttribute("xyz")) ?? null, [0, 0, 0]), rotationRpy: C((e == null ? void 0 : e.getAttribute("rpy")) ?? null, [0, 0, 0]) };
|
|
381
380
|
}
|
|
382
|
-
function
|
|
381
|
+
function pe(o, e, t) {
|
|
383
382
|
const r = o.querySelector("geometry"), n = r == null ? void 0 : r.querySelector("box");
|
|
384
|
-
if (n) return { type: "box", size:
|
|
383
|
+
if (n) return { type: "box", size: C(n.getAttribute("size"), [1, 1, 1]) };
|
|
385
384
|
const l = r == null ? void 0 : r.querySelector("sphere");
|
|
386
385
|
if (l) return { type: "sphere", radius: F(l.getAttribute("radius"), 1) };
|
|
387
386
|
const u = r == null ? void 0 : r.querySelector("cylinder");
|
|
388
387
|
if (u) return { type: "cylinder", radius: F(u.getAttribute("radius"), 1), length: F(u.getAttribute("length"), 1) };
|
|
389
388
|
const c = r == null ? void 0 : r.querySelector("mesh"), i = c == null ? void 0 : c.getAttribute("filename");
|
|
390
|
-
return i ? { type: "mesh", resourcePath: t.resolve(i, e), scale:
|
|
391
|
-
}
|
|
392
|
-
function
|
|
393
|
-
const n =
|
|
394
|
-
if (!n) throw
|
|
395
|
-
const l =
|
|
396
|
-
id:
|
|
397
|
-
name:
|
|
398
|
-
inertial:
|
|
389
|
+
return i ? { type: "mesh", resourcePath: t.resolve(i, e), scale: C(c.getAttribute("scale"), [1, 1, 1]) } : null;
|
|
390
|
+
}
|
|
391
|
+
function rt(o, e, t) {
|
|
392
|
+
const n = lt(o, "URDF").querySelector("robot");
|
|
393
|
+
if (!n) throw D("URDF requires a robot root element.", "E_URDF_PARSE");
|
|
394
|
+
const l = we(), u = [...n.querySelectorAll("link")].map((i) => ({
|
|
395
|
+
id: I(i, "name"),
|
|
396
|
+
name: I(i, "name"),
|
|
397
|
+
inertial: ut(i),
|
|
399
398
|
visuals: [...i.querySelectorAll("visual")].map((s) => {
|
|
400
399
|
var h;
|
|
401
|
-
const m =
|
|
400
|
+
const m = pe(s, e, t), b = C(((h = s.querySelector("color")) == null ? void 0 : h.getAttribute("rgba")) ?? null, [0.68, 0.72, 0.7, 1]);
|
|
402
401
|
return m ? { origin: V(s), geometry: m, color: b } : null;
|
|
403
402
|
}).filter((s) => !!s),
|
|
404
403
|
collisions: [...i.querySelectorAll("collision")].map((s) => {
|
|
405
|
-
const m =
|
|
404
|
+
const m = pe(s, e, t);
|
|
406
405
|
return m ? { origin: V(s), geometry: m } : null;
|
|
407
406
|
}).filter((s) => !!s)
|
|
408
407
|
})), c = [...n.querySelectorAll("joint")].map((i) => {
|
|
409
408
|
var f;
|
|
410
409
|
const s = i.querySelector("limit"), m = i.querySelector("dynamics"), b = m ? F(m.getAttribute("damping"), 0) : 0, h = m ? F(m.getAttribute("friction"), 0) : 0, p = m && (b > 0 || h > 0) ? { damping: b, friction: h } : void 0;
|
|
411
410
|
return {
|
|
412
|
-
id:
|
|
411
|
+
id: I(i, "name"),
|
|
413
412
|
type: i.getAttribute("type") ?? "fixed",
|
|
414
|
-
parent:
|
|
415
|
-
child:
|
|
413
|
+
parent: I(i.querySelector("parent"), "link"),
|
|
414
|
+
child: I(i.querySelector("child"), "link"),
|
|
416
415
|
origin: V(i),
|
|
417
|
-
axis:
|
|
416
|
+
axis: C(((f = i.querySelector("axis")) == null ? void 0 : f.getAttribute("xyz")) ?? null, [1, 0, 0]),
|
|
418
417
|
...s ? { limits: { lower: F(s.getAttribute("lower"), 0), upper: F(s.getAttribute("upper"), 0) } } : {},
|
|
419
418
|
...p ? { dynamics: p } : {}
|
|
420
419
|
};
|
|
421
420
|
});
|
|
422
|
-
return n.querySelector("transmission, gazebo") && l.droppedFeatures.push({ code: "UNSUPPORTED_URDF_EXTENSION", message: "URDF transmission/gazebo extensions are not compiled." }),
|
|
421
|
+
return n.querySelector("transmission, gazebo") && l.droppedFeatures.push({ code: "UNSUPPORTED_URDF_EXTENSION", message: "URDF transmission/gazebo extensions are not compiled." }), _e({ id: n.getAttribute("name") || e, name: n.getAttribute("name") || e, source: { format: "urdf", uri: e }, links: u, joints: c, diagnostics: l, extension: { files: t } });
|
|
423
422
|
}
|
|
424
|
-
function
|
|
425
|
-
const e = new k(), t = new
|
|
423
|
+
function he(o) {
|
|
424
|
+
const e = new k(), t = new ge().setFromEuler(new J(...o.rotationRpy, "XYZ"));
|
|
426
425
|
return e.compose(new T().fromArray(o.position), t, new T(1, 1, 1));
|
|
427
426
|
}
|
|
428
|
-
function
|
|
427
|
+
function ee(o) {
|
|
429
428
|
if (o.type === "continuous" || !o.limits) return 0;
|
|
430
429
|
const { lower: e, upper: t } = o.limits;
|
|
431
430
|
return !Number.isFinite(e) || !Number.isFinite(t) ? 0 : Ue.clamp(0, e, t);
|
|
432
431
|
}
|
|
433
|
-
function
|
|
432
|
+
function ot(o) {
|
|
434
433
|
let e;
|
|
435
434
|
if (o.type === "box")
|
|
436
435
|
e = [o.size[0] / 2, o.size[1] / 2, o.size[2] / 2];
|
|
@@ -447,7 +446,7 @@ function rt(o) {
|
|
|
447
446
|
t.push(new T(r, n, l));
|
|
448
447
|
return t;
|
|
449
448
|
}
|
|
450
|
-
function
|
|
449
|
+
function st(o, e, t) {
|
|
451
450
|
let r = 0;
|
|
452
451
|
const n = new Map(o.links.map((s) => [s.id, s])), l = (s) => {
|
|
453
452
|
let m = 1 / 0;
|
|
@@ -455,17 +454,17 @@ function ot(o, e, t) {
|
|
|
455
454
|
const f = n.get(h);
|
|
456
455
|
if (f) {
|
|
457
456
|
for (const a of f.collisions) {
|
|
458
|
-
const d =
|
|
457
|
+
const d = ot(a.geometry);
|
|
459
458
|
if (!d) {
|
|
460
459
|
s && (r += 1);
|
|
461
460
|
continue;
|
|
462
461
|
}
|
|
463
|
-
const _ = p.clone().multiply(
|
|
462
|
+
const _ = p.clone().multiply(he(a.origin));
|
|
464
463
|
for (const y of d)
|
|
465
464
|
m = Math.min(m, y.applyMatrix4(_).z);
|
|
466
465
|
}
|
|
467
466
|
for (const a of t.get(h) ?? []) {
|
|
468
|
-
const d = p.clone().multiply(
|
|
467
|
+
const d = p.clone().multiply(he(a.origin)), _ = s ? ee(a) : 0;
|
|
469
468
|
_ && a.type === "revolute" ? d.multiply(new k().makeRotationAxis(new T().fromArray(a.axis).normalize(), _)) : _ && a.type === "prismatic" && d.multiply(new k().makeTranslation(a.axis[0] * _, a.axis[1] * _, a.axis[2] * _)), b(a.child, d);
|
|
470
469
|
}
|
|
471
470
|
}
|
|
@@ -477,24 +476,24 @@ function ot(o, e, t) {
|
|
|
477
476
|
message: `自动落地忽略了 ${r} 个网格碰撞体`
|
|
478
477
|
}), Number.isFinite(i) ? Math.max(0, 0.015 - i) : 0;
|
|
479
478
|
}
|
|
480
|
-
async function
|
|
479
|
+
async function nt(o) {
|
|
481
480
|
const e = o.extension.files, t = /* @__PURE__ */ new Map(), r = new Set(o.joints.map((a) => a.child));
|
|
482
481
|
for (const a of o.joints) t.set(a.parent, [...t.get(a.parent) ?? [], a]);
|
|
483
482
|
const n = o.links.filter((a) => !r.has(a.id));
|
|
484
|
-
if (n.length !== 1) throw
|
|
485
|
-
const l =
|
|
483
|
+
if (n.length !== 1) throw D(`URDF requires exactly one root link; found ${n.length}.`, "E_URDF_COMPILE");
|
|
484
|
+
const l = st(o, n[0].id, t);
|
|
486
485
|
l > 0 && o.diagnostics.approximations.push({
|
|
487
486
|
code: "AUTO_GROUNDED_FREE_ROOT",
|
|
488
487
|
message: `自由根初始高度自动抬升 ${l.toFixed(4)} m`
|
|
489
488
|
});
|
|
490
|
-
const u = o.joints.filter((a) =>
|
|
489
|
+
const u = o.joints.filter((a) => ee(a) !== 0);
|
|
491
490
|
u.length && o.diagnostics.approximations.push({
|
|
492
491
|
code: "JOINT_REFERENCE_CLAMPED",
|
|
493
492
|
message: `${u.length} 个关节的默认参考值已夹到合法限位`
|
|
494
493
|
});
|
|
495
494
|
const c = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = [], m = async (a) => {
|
|
496
495
|
var g;
|
|
497
|
-
if (a.type === "box") return `type="box" size="${a.size.map((
|
|
496
|
+
if (a.type === "box") return `type="box" size="${a.size.map((E) => E / 2).join(" ")}"`;
|
|
498
497
|
if (a.type === "sphere") return `type="sphere" size="${a.radius}"`;
|
|
499
498
|
if (a.type === "cylinder") return `type="cylinder" size="${a.radius} ${a.length / 2}"`;
|
|
500
499
|
const d = (g = a.resourcePath.split(".").pop()) == null ? void 0 : g.toLowerCase();
|
|
@@ -502,17 +501,17 @@ async function st(o) {
|
|
|
502
501
|
const _ = `${a.resourcePath}|${a.scale.join(" ")}`;
|
|
503
502
|
let y = i.get(_);
|
|
504
503
|
if (!y) {
|
|
505
|
-
const
|
|
506
|
-
i.set(_,
|
|
504
|
+
const E = { name: `mesh_${i.size}`, path: a.resourcePath, scale: a.scale };
|
|
505
|
+
i.set(_, E), c.set(`${E.name}.${d}`, await e.bytes(a.resourcePath)), y = E;
|
|
507
506
|
}
|
|
508
507
|
return `type="mesh" mesh="${y.name}"`;
|
|
509
508
|
}, b = async (a, d) => {
|
|
510
|
-
var
|
|
509
|
+
var E, $;
|
|
511
510
|
const _ = o.links.find((w) => w.id === a), y = [...(d == null ? void 0 : d.origin.position) ?? [0, 0, 0]];
|
|
512
511
|
d || (y[2] += l);
|
|
513
|
-
const g = [`<body name="${
|
|
512
|
+
const g = [`<body name="${Q(a)}" pos="${y.join(" ")}" euler="${((d == null ? void 0 : d.origin.rotationRpy) ?? [0, 0, 0]).join(" ")}">`];
|
|
514
513
|
if (_.inertial) {
|
|
515
|
-
const { origin: w, mass: v, tensor: S } = _.inertial, R = new
|
|
514
|
+
const { origin: w, mass: v, tensor: S } = _.inertial, R = new fe().setFromMatrix4(new k().makeRotationFromEuler(new J(...w.rotationRpy, "XYZ"))), P = new fe().set(S[0], S[3], S[4], S[3], S[1], S[5], S[4], S[5], S[2]);
|
|
516
515
|
P.premultiply(R).multiply(R.clone().transpose());
|
|
517
516
|
const M = P.elements;
|
|
518
517
|
g.push(`<inertial pos="${w.position.join(" ")}" mass="${v}" fullinertia="${[M[0], M[4], M[8], M[3], M[6], M[7]].join(" ")}"/>`);
|
|
@@ -521,10 +520,10 @@ async function st(o) {
|
|
|
521
520
|
else if (["fixed", "planar", "floating"].includes(d.type))
|
|
522
521
|
(d == null ? void 0 : d.type) === "floating" && (g.push("<freejoint/>"), s.push(0, 0, 0, 1, 0, 0, 0));
|
|
523
522
|
else {
|
|
524
|
-
const w = d.type === "prismatic" ? "slide" : "hinge", v = d.type !== "continuous" && !!d.limits && Number.isFinite(d.limits.lower) && Number.isFinite(d.limits.upper), S =
|
|
523
|
+
const w = d.type === "prismatic" ? "slide" : "hinge", v = d.type !== "continuous" && !!d.limits && Number.isFinite(d.limits.lower) && Number.isFinite(d.limits.upper), S = ee(d);
|
|
525
524
|
s.push(S);
|
|
526
|
-
const R = ((
|
|
527
|
-
g.push(`<joint name="${
|
|
525
|
+
const R = ((E = d.dynamics) == null ? void 0 : E.damping) ?? 0, P = (($ = d.dynamics) == null ? void 0 : $.friction) ?? 0;
|
|
526
|
+
g.push(`<joint name="${Q(d.id)}" type="${w}" axis="${d.axis.join(" ")}"${v ? ` limited="true" range="${d.limits.lower} ${d.limits.upper}" ref="${S}"` : ""} damping="${R}" frictionloss="${P}"/>`);
|
|
528
527
|
}
|
|
529
528
|
for (const w of _.collisions) {
|
|
530
529
|
const v = await m(w.geometry);
|
|
@@ -539,10 +538,10 @@ async function st(o) {
|
|
|
539
538
|
return {
|
|
540
539
|
format: "mjcf",
|
|
541
540
|
files: c,
|
|
542
|
-
xml: `<mujoco model="${
|
|
541
|
+
xml: `<mujoco model="${Q(o.name)}"><compiler angle="radian" autolimits="true"/><option gravity="0 0 -9.81"/><asset>${p}</asset><worldbody><geom name="__viewer_default_ground__" type="plane" size="5 5 0.1" contype="1" conaffinity="1" friction="0.8 0.01 0.0002"/>${h}</worldbody>${f}</mujoco>`
|
|
543
542
|
};
|
|
544
543
|
}
|
|
545
|
-
async function
|
|
544
|
+
async function it(o) {
|
|
546
545
|
const e = o.extension.files, t = new z();
|
|
547
546
|
t.name = o.name;
|
|
548
547
|
const r = /* @__PURE__ */ new Map();
|
|
@@ -550,29 +549,29 @@ async function nt(o) {
|
|
|
550
549
|
const l = new z();
|
|
551
550
|
l.name = n.id, r.set(n.id, l), t.add(l);
|
|
552
551
|
for (const u of n.visuals) {
|
|
553
|
-
const c = await
|
|
552
|
+
const c = await at(u, e), i = new z();
|
|
554
553
|
i.position.fromArray(u.origin.position), i.quaternion.setFromEuler(new J(...u.origin.rotationRpy, "XYZ")), i.add(c), l.add(i);
|
|
555
554
|
}
|
|
556
555
|
}
|
|
557
556
|
return { root: t, bindings: r, expectedLinkCount: o.links.length };
|
|
558
557
|
}
|
|
559
|
-
async function
|
|
558
|
+
async function at(o, e) {
|
|
560
559
|
var u, c, i;
|
|
561
|
-
const t = new
|
|
560
|
+
const t = new ye({ color: o.color ? void 0 : 11385011, opacity: ((u = o.color) == null ? void 0 : u[3]) ?? 1, transparent: (((c = o.color) == null ? void 0 : c[3]) ?? 1) < 1 });
|
|
562
561
|
o.color && t.color.setRGB(o.color[0], o.color[1], o.color[2]);
|
|
563
562
|
const r = o.geometry;
|
|
564
|
-
if (r.type === "box") return new
|
|
565
|
-
if (r.type === "sphere") return new
|
|
563
|
+
if (r.type === "box") return new N(new X(...r.size), t);
|
|
564
|
+
if (r.type === "sphere") return new N(new te(r.radius, 24, 16), t);
|
|
566
565
|
if (r.type === "cylinder") {
|
|
567
|
-
const s = new
|
|
568
|
-
return s.quaternion.copy(new
|
|
566
|
+
const s = new N(new re(r.radius, r.radius, r.length, 24), t);
|
|
567
|
+
return s.quaternion.copy(new ge().setFromEuler(new J(Math.PI / 2, 0, 0))), s;
|
|
569
568
|
}
|
|
570
569
|
const n = (i = r.resourcePath.split(".").pop()) == null ? void 0 : i.toLowerCase();
|
|
571
570
|
await e.ensure(r.resourcePath);
|
|
572
571
|
let l;
|
|
573
|
-
if (n === "stl") l = new
|
|
572
|
+
if (n === "stl") l = new N(new Ge().parse(await e.getBlob(r.resourcePath).arrayBuffer()), t);
|
|
574
573
|
else if (n === "obj")
|
|
575
|
-
l = new
|
|
574
|
+
l = new qe().parse(await e.getBlob(r.resourcePath).text()), l.traverse((s) => {
|
|
576
575
|
"material" in s && (s.material = t);
|
|
577
576
|
});
|
|
578
577
|
else if (n === "gltf" || n === "glb") {
|
|
@@ -583,73 +582,73 @@ async function it(o, e) {
|
|
|
583
582
|
} catch {
|
|
584
583
|
return m;
|
|
585
584
|
}
|
|
586
|
-
}), l = (await new
|
|
587
|
-
} else throw
|
|
585
|
+
}), l = (await new De(s).parseAsync(await e.getBlob(r.resourcePath).arrayBuffer(), "")).scene;
|
|
586
|
+
} else throw D(`Unsupported URDF visual mesh: .${n ?? ""}`, "E_URDF_VISUAL");
|
|
588
587
|
return l.scale.fromArray(r.scale), l;
|
|
589
588
|
}
|
|
590
|
-
function
|
|
589
|
+
function lt(o, e) {
|
|
591
590
|
const t = new DOMParser().parseFromString(o, "application/xml"), r = t.querySelector("parsererror");
|
|
592
|
-
if (r) throw
|
|
591
|
+
if (r) throw D(`${e} XML parse failed: ${r.textContent ?? ""}`, `E_${e}_PARSE`);
|
|
593
592
|
return t;
|
|
594
593
|
}
|
|
595
|
-
function
|
|
594
|
+
function I(o, e) {
|
|
596
595
|
const t = o == null ? void 0 : o.getAttribute(e);
|
|
597
|
-
if (!t) throw
|
|
596
|
+
if (!t) throw D(`Missing ${e}.`, "E_URDF_PARSE");
|
|
598
597
|
return t;
|
|
599
598
|
}
|
|
600
599
|
function F(o, e) {
|
|
601
600
|
const t = Number(o);
|
|
602
601
|
return Number.isFinite(t) ? t : e;
|
|
603
602
|
}
|
|
604
|
-
function
|
|
603
|
+
function Q(o) {
|
|
605
604
|
return o.replaceAll("&", "&").replaceAll('"', """).replaceAll("<", "<").replaceAll(">", ">");
|
|
606
605
|
}
|
|
607
|
-
function
|
|
606
|
+
function D(o, e) {
|
|
608
607
|
return Object.assign(new Error(o), { code: e });
|
|
609
608
|
}
|
|
610
|
-
function
|
|
609
|
+
function ut(o) {
|
|
611
610
|
var l;
|
|
612
611
|
const e = o.querySelector("inertial");
|
|
613
612
|
if (!e) return;
|
|
614
613
|
const t = e.querySelector("inertia"), r = Number((l = e.querySelector("mass")) == null ? void 0 : l.getAttribute("value")), n = ["ixx", "iyy", "izz", "ixy", "ixz", "iyz"].map((u) => Number(t == null ? void 0 : t.getAttribute(u)));
|
|
615
|
-
if (!(r > 0) || n.some((u) => !Number.isFinite(u))) throw
|
|
614
|
+
if (!(r > 0) || n.some((u) => !Number.isFinite(u))) throw D("Invalid URDF inertia.", "E_URDF_PARSE");
|
|
616
615
|
return { origin: V(e), mass: r, tensor: n };
|
|
617
616
|
}
|
|
618
|
-
function
|
|
619
|
-
const t = new
|
|
617
|
+
function ct(o, e) {
|
|
618
|
+
const t = new Ce(o);
|
|
620
619
|
let r = null, n = null, l = null, u = null, c = null, i = !1, s = !0, m = !1, b = null, h, p = null, f = null, a = null;
|
|
621
620
|
const d = () => {
|
|
622
621
|
i = !0, s = !1;
|
|
623
622
|
}, _ = (async () => {
|
|
624
|
-
var y, g,
|
|
623
|
+
var y, g, E, $, w, v, S, R, P, M, oe, se;
|
|
625
624
|
try {
|
|
626
625
|
const O = e.format;
|
|
627
626
|
if (O === "usd" || O === "usda" || O === "usdc" || O === "usdz") {
|
|
628
627
|
(y = e.reportProgress) == null || y.call(e, "usd", "正在解析 USD 场景与物理刚体...");
|
|
629
|
-
const
|
|
628
|
+
const j = await (await import("./usd-session-DCuV_H-Y.js")).loadUsdSimulation(o, e, t);
|
|
630
629
|
if (i || e.signal.aborted)
|
|
631
|
-
throw
|
|
632
|
-
p =
|
|
630
|
+
throw j.dispose(), Ee();
|
|
631
|
+
p = j.asset, n = j.binding, l = j.dispose, u = j.hasPhysics ? j.step : null, c = j.reset, s = j.hasPhysics, m = j.hasPhysics, b = j.fallback ? { ...j.fallback, stage: "physics-fallback" } : null, (g = e.reportProgress) == null || g.call(e, "stage", "正在构建三维场景与环境光影..."), f = new ue(n.root, e.options.simulationTheme, j.runtime), j.runtime ? (r = j.runtime, a = new Y(r, Z(r, !0))) : a = j.collision ?? null, a && (a.root.visible = !1, f.attachAuxiliary(a.root));
|
|
633
632
|
return;
|
|
634
633
|
}
|
|
635
634
|
let L = o.entryPath ?? o.filename;
|
|
636
635
|
if (!L && O === "mjcf") {
|
|
637
|
-
const
|
|
638
|
-
for (const
|
|
639
|
-
const
|
|
640
|
-
if (
|
|
641
|
-
L =
|
|
636
|
+
const ie = t.paths().filter((j) => j.toLowerCase().endsWith(".xml"));
|
|
637
|
+
for (const j of ["scene.xml", "model.xml", "main.xml"]) {
|
|
638
|
+
const ae = ie.find((le) => le.toLowerCase().endsWith(`/${j}`) || le.toLowerCase() === j);
|
|
639
|
+
if (ae) {
|
|
640
|
+
L = ae;
|
|
642
641
|
break;
|
|
643
642
|
}
|
|
644
643
|
}
|
|
645
644
|
}
|
|
646
|
-
L ?? (L = O === "urdf" ? "asset.urdf" : "asset.xml"), (
|
|
645
|
+
L ?? (L = O === "urdf" ? "asset.urdf" : "asset.xml"), (E = e.reportProgress) == null || E.call(e, "fetch", "正在读取模型描述与依赖资源...");
|
|
647
646
|
const { MujocoRuntime: je } = await import("./mujoco-runtime-s85kwjo7.js");
|
|
648
647
|
r = new je();
|
|
649
|
-
const
|
|
650
|
-
|
|
648
|
+
const ne = await Le(o, t);
|
|
649
|
+
G(i, e.signal);
|
|
651
650
|
let B, H;
|
|
652
|
-
O === "urdf" ? (($ = e.reportProgress) == null || $.call(e, "parse", "正在解析 URDF 结构与连杆..."), p =
|
|
651
|
+
O === "urdf" ? (($ = e.reportProgress) == null || $.call(e, "parse", "正在解析 URDF 结构与连杆..."), p = rt(ne, L, t), (w = e.reportProgress) == null || w.call(e, "compile", "正在编译物理碰撞体与惯性矩阵..."), B = await nt(p), G(i, e.signal), (v = e.reportProgress) == null || v.call(e, "runtime", "正在初始化物理内核..."), await r.initialize(B, e.options.mujocoBaseUrl), m = !0, G(i, e.signal), (S = e.reportProgress) == null || S.call(e, "visual", "正在构建视觉渲染网格..."), H = await it(p)) : ((R = e.reportProgress) == null || R.call(e, "parse", "正在解析 MJCF 场景与连杆..."), p = await ze(ne, L, t), (P = e.reportProgress) == null || P.call(e, "compile", "正在编译物理模型与参数..."), B = await ke(p), G(i, e.signal), (M = e.reportProgress) == null || M.call(e, "runtime", "正在初始化物理内核..."), await r.initialize(B, e.options.mujocoBaseUrl), m = !0, G(i, e.signal), (oe = e.reportProgress) == null || oe.call(e, "visual", "正在构建视觉渲染网格..."), H = Z(r)), G(i, e.signal), (se = e.reportProgress) == null || se.call(e, "stage", "正在构建三维场景与环境光影..."), n = new Y(r, H), f = new ue(n.root, e.options.simulationTheme, r), a = new Y(r, Z(r, !0)), a.root.visible = !1, f.attachAuxiliary(a.root);
|
|
653
652
|
} catch (O) {
|
|
654
653
|
throw f == null || f.dispose(), f = null, n == null || n.dispose(), n = null, r == null || r.dispose(), t.dispose(), O;
|
|
655
654
|
}
|
|
@@ -664,8 +663,8 @@ function ut(o, e) {
|
|
|
664
663
|
getFitBounds() {
|
|
665
664
|
return (f == null ? void 0 : f.getModelBounds()) ?? null;
|
|
666
665
|
},
|
|
667
|
-
beforeRender(y, g,
|
|
668
|
-
return f == null ? void 0 : f.beforeRender(y, g,
|
|
666
|
+
beforeRender(y, g, E) {
|
|
667
|
+
return f == null ? void 0 : f.beforeRender(y, g, E);
|
|
669
668
|
},
|
|
670
669
|
get capabilities() {
|
|
671
670
|
return { canPlay: m, canPause: m, canReset: m, hasPhysics: m, canToggleGround: !0, canToggleCollision: a !== null };
|
|
@@ -698,7 +697,7 @@ function ut(o, e) {
|
|
|
698
697
|
bodyCount: y.nbody - 1,
|
|
699
698
|
jointCount: y.njnt,
|
|
700
699
|
geomCount: y.ngeom,
|
|
701
|
-
bodies: Array.from({ length: y.nbody - 1 }, (
|
|
700
|
+
bodies: Array.from({ length: y.nbody - 1 }, (E, $) => {
|
|
702
701
|
const w = $ + 1;
|
|
703
702
|
return { id: w, name: g.mj_id2name(y, g.mjtObj.mjOBJ_BODY.value, w), mass: y.body_mass[w], inertia: Array.from(y.body_inertia.slice(w * 3, w * 3 + 3)) };
|
|
704
703
|
}),
|
|
@@ -709,8 +708,8 @@ function ut(o, e) {
|
|
|
709
708
|
return r != null && r.model || u ? (y) => {
|
|
710
709
|
if (i || !s || !n) return !1;
|
|
711
710
|
if (u) {
|
|
712
|
-
const
|
|
713
|
-
return
|
|
711
|
+
const E = u(y);
|
|
712
|
+
return E && (a == null || a.sync()), E;
|
|
714
713
|
}
|
|
715
714
|
const g = r.step(y);
|
|
716
715
|
return g && (n.sync(), a == null || a.sync(), f == null || f.updateForceLine()), g;
|
|
@@ -725,11 +724,11 @@ function ut(o, e) {
|
|
|
725
724
|
reset() {
|
|
726
725
|
i || !n || (c ? c() : (r == null || r.reset(), n.sync()), a == null || a.sync(), f == null || f.updateForceLine());
|
|
727
726
|
},
|
|
728
|
-
beginGrab(y, g,
|
|
729
|
-
return (f == null ? void 0 : f.beginGrab(y, g,
|
|
727
|
+
beginGrab(y, g, E) {
|
|
728
|
+
return (f == null ? void 0 : f.beginGrab(y, g, E)) ?? !1;
|
|
730
729
|
},
|
|
731
|
-
moveGrab(y, g,
|
|
732
|
-
f == null || f.moveGrab(y, g,
|
|
730
|
+
moveGrab(y, g, E) {
|
|
731
|
+
f == null || f.moveGrab(y, g, E);
|
|
733
732
|
},
|
|
734
733
|
endGrab() {
|
|
735
734
|
f == null || f.endGrab();
|
|
@@ -742,21 +741,21 @@ function ut(o, e) {
|
|
|
742
741
|
}
|
|
743
742
|
};
|
|
744
743
|
}
|
|
745
|
-
function
|
|
746
|
-
if (o || e.aborted) throw
|
|
744
|
+
function G(o, e) {
|
|
745
|
+
if (o || e.aborted) throw Ee();
|
|
747
746
|
}
|
|
748
|
-
function
|
|
747
|
+
function Ee() {
|
|
749
748
|
return Object.assign(new Error("Simulation load aborted."), { name: "AbortError", code: "E_ABORTED" });
|
|
750
749
|
}
|
|
751
|
-
const
|
|
750
|
+
const gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
752
751
|
__proto__: null,
|
|
753
|
-
createSimulationSession:
|
|
752
|
+
createSimulationSession: ct
|
|
754
753
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
755
754
|
export {
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
755
|
+
Y as S,
|
|
756
|
+
Ze as a,
|
|
757
|
+
we as b,
|
|
758
|
+
Ye as c,
|
|
759
|
+
_e as d,
|
|
760
|
+
gt as s
|
|
762
761
|
};
|