@nebula-spatial/viewer 0.6.3 → 0.6.5
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 +20 -0
- package/dist/asset-ir-CpAQLRUA.js +647 -0
- package/dist/assets/browser-module-shim-CxSGVgIL.js +6 -0
- package/dist/assets/mujoco-physics-worker-8NOXf5Pk.js +5470 -0
- package/dist/assets/{usd-worker-jdyS9s6r.js → usd-worker-HijL9KRX.js} +266 -262
- package/dist/{index-8NPEYTG6.js → index-B_0o0gFp.js} +3854 -3508
- package/dist/index.js +12 -12
- package/dist/{mjcf-visual-U8gS-Yco.js → mjcf-visual-DyxH6Xog.js} +5 -5
- package/dist/mujoco-runtime-BljZEVSG.js +1290 -0
- package/dist/{session-CorUzvdX.js → session-BVP1ulLM.js} +9 -9
- package/dist/{session-ChdKFNGE.js → session-Bk1kzTKV.js} +19 -19
- package/dist/session-EZx1acjF.js +713 -0
- package/dist/simulation/types.d.ts +26 -0
- package/dist/{spark-renderer-B_L1Xkr2.js → spark-renderer-C3is1De3.js} +1 -1
- package/dist/{urdf-session-VIU_OO_x.js → urdf-session-BqSsgeqp.js} +4 -4
- package/dist/usd-session-CO-6k8lr.js +12711 -0
- package/dist/version.d.ts +1 -1
- package/dist/{xacro-BMaNGmce.js → xacro-itfAyoDj.js} +1 -1
- package/openusd/openusd-runtime-manifest.json +3 -3
- package/openusd/openusd_probe.wasm +0 -0
- package/package.json +2 -2
- package/dist/asset-ir-CTNCY5IT.js +0 -637
- package/dist/mujoco-runtime-DiiANmuc.js +0 -791
- package/dist/session-CEVNCYOy.js +0 -562
- package/dist/usd-session-DAQ4VHuu.js +0 -11603
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as s, L as o, Y as r, N as n, U as t, K as c, Z as i, _ as d, $ as U, a0 as S, a1 as E, a2 as _, a3 as l, a4 as D, a5 as R, P as m, a6 as p, a7 as u, m as C, a8 as O, a9 as G, aa as I, ab as N, ac as T, ad as V, ae as f } from "./index-B_0o0gFp.js";
|
|
2
2
|
import { configureCadTextBuilder as x } from "@nebula-spatial/cad-loader";
|
|
3
3
|
export {
|
|
4
4
|
s as DEFAULT_GROUND_GRID_SCALE,
|
|
@@ -6,26 +6,26 @@ export {
|
|
|
6
6
|
r as USD_RESOURCE_EXTERNAL_DENIED,
|
|
7
7
|
n as USD_RESOURCE_FETCH,
|
|
8
8
|
t as USD_RESOURCE_INVALID,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
c as USD_RESOURCE_NOT_FOUND,
|
|
10
|
+
i as axisGizmo,
|
|
11
|
+
d as chooseGroundGridScale,
|
|
12
|
+
U as clampJointValue,
|
|
13
13
|
S as compileMujocoWasmModule,
|
|
14
14
|
E as compileOpenUsdWasmModule,
|
|
15
15
|
x as configureViewerText,
|
|
16
16
|
_ as createSceneInstanceJoints,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
l as createSceneSession,
|
|
18
|
+
D as createViewer,
|
|
19
19
|
R as detectPlyContent,
|
|
20
20
|
m as detectVisualContent,
|
|
21
21
|
p as findInstanceId,
|
|
22
22
|
u as formatGroundGridScale,
|
|
23
23
|
C as getUsdQuery,
|
|
24
24
|
O as isSceneScalarJoint,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
G as jointBlockReason,
|
|
26
|
+
I as preloadUsdViewer,
|
|
27
|
+
N as prewarmUsdWorker,
|
|
28
28
|
T as probeUsdDependencies,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
V as toSceneJointDescriptor,
|
|
30
|
+
f as viewerVersion
|
|
31
31
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Group as q, Euler as G, BoxGeometry as N, SphereGeometry as P, CylinderGeometry as
|
|
1
|
+
import { T as v, X as E, d as z } from "./index-B_0o0gFp.js";
|
|
2
|
+
import { Group as q, Euler as G, BoxGeometry as N, SphereGeometry as P, CylinderGeometry as X, CapsuleGeometry as $, PlaneGeometry as I, Mesh as j } from "three";
|
|
3
3
|
function D(f) {
|
|
4
4
|
const y = f.extension.documents, l = new q();
|
|
5
5
|
l.name = f.name;
|
|
@@ -43,10 +43,10 @@ function D(f) {
|
|
|
43
43
|
if (n === "box") i = new N(2 * r[0], 2 * r[1], 2 * r[2]);
|
|
44
44
|
else if (n === "sphere") i = new P(r[0]);
|
|
45
45
|
else if (n === "cylinder")
|
|
46
|
-
i = new
|
|
46
|
+
i = new X(r[0], r[0], 2 * r[1]), i.rotateX(Math.PI / 2);
|
|
47
47
|
else if (n === "capsule")
|
|
48
|
-
i = new
|
|
49
|
-
else if (n === "plane") i = new
|
|
48
|
+
i = new $(r[0], 2 * r[1]), i.rotateX(Math.PI / 2);
|
|
49
|
+
else if (n === "plane") i = new I(2 * (r[0] || 5), 2 * (r[1] || 5));
|
|
50
50
|
else throw new Error(`MJCF 独立预览暂不支持 geom ${n}`);
|
|
51
51
|
const p = e.getAttribute("material"), o = [...u.querySelectorAll("asset > material")].find((t) => t.getAttribute("name") === p);
|
|
52
52
|
if (p && !o) throw new Error(`Undefined MJCF material: ${p}`);
|