@nebula-spatial/viewer 0.6.5 → 0.6.6
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 +8 -0
- package/README.md +5 -0
- package/dist/assets/mujoco-physics-worker-MMv4Gmu_.js +5482 -0
- package/dist/{asset-ir-CpAQLRUA.js → dynamic-raycast-Ctu2X5u5.js} +135 -105
- package/dist/{index-B_0o0gFp.js → index-DyBfusq5.js} +1047 -1004
- package/dist/index.js +1 -1
- package/dist/{mjcf-visual-DyxH6Xog.js → mjcf-visual-5WZebsIs.js} +3 -3
- package/dist/mujoco-runtime-CZSNQ7An.js +1601 -0
- package/dist/{session-BVP1ulLM.js → session-BerXscrf.js} +11 -11
- package/dist/{session-Bk1kzTKV.js → session-CzJBN0Us.js} +2 -2
- package/dist/session-DXUACJAS.js +719 -0
- package/dist/{spark-renderer-C3is1De3.js → spark-renderer-dvFIUjr0.js} +1 -1
- package/dist/{urdf-session-BqSsgeqp.js → urdf-session-DRHt0jW4.js} +34 -34
- package/dist/{usd-session-CO-6k8lr.js → usd-session-CLU3UR4C.js} +3192 -3177
- package/dist/version.d.ts +1 -1
- package/dist/{xacro-itfAyoDj.js → xacro-BV6bRVpX.js} +1 -1
- package/package.json +1 -1
- package/dist/assets/browser-module-shim-CxSGVgIL.js +0 -6
- package/dist/assets/mujoco-physics-worker-8NOXf5Pk.js +0 -5470
- package/dist/mujoco-runtime-BljZEVSG.js +0 -1290
- package/dist/session-EZx1acjF.js +0 -713
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Group as O, MeshStandardMaterial as Z, Mesh as z, PointsMaterial as H, Points as
|
|
1
|
+
import { Group as O, MeshStandardMaterial as Z, Mesh as z, PointsMaterial as H, Points as Q, Color as j, Box3 as $, Vector3 as b, MeshBasicMaterial as J, BoxGeometry as q } from "three";
|
|
2
2
|
import { PLYLoader as X } from "three/examples/jsm/loaders/PLYLoader.js";
|
|
3
3
|
import { S as ee, a as x } from "./spark.module-kM8pwA1o.js";
|
|
4
|
-
import {
|
|
5
|
-
import { a as re, r as ae } from "./spark-renderer-
|
|
4
|
+
import { Q as te, B as _, D as ne, E as ie } from "./index-DyBfusq5.js";
|
|
5
|
+
import { a as re, r as ae } from "./spark-renderer-dvFIUjr0.js";
|
|
6
6
|
function xe(t, e) {
|
|
7
7
|
let u = !1, s = null, c = null, i = null, o = null, w = null, d = null, h = null, r = null, v = "unsupported", B = null, F = null, k = null, S = "y", G;
|
|
8
|
-
const V =
|
|
8
|
+
const V = P(), T = () => {
|
|
9
9
|
u = !0;
|
|
10
10
|
}, U = () => {
|
|
11
11
|
h && (ae(h), h = null);
|
|
@@ -42,7 +42,7 @@ function xe(t, e) {
|
|
|
42
42
|
vertexColors: a,
|
|
43
43
|
size: Math.max(4e-3, de(l.boundingBox) * 3e-3),
|
|
44
44
|
sizeAttenuation: !0
|
|
45
|
-
}), g = new
|
|
45
|
+
}), g = new Q(l, y);
|
|
46
46
|
g.name = "viewer-visual-ply-points", m.add(g);
|
|
47
47
|
}
|
|
48
48
|
B = null;
|
|
@@ -55,11 +55,11 @@ function xe(t, e) {
|
|
|
55
55
|
});
|
|
56
56
|
if (await a.initialized, u || e.signal.aborted)
|
|
57
57
|
throw a.dispose(), I();
|
|
58
|
-
if (a.name = "viewer-visual-splat", a.position.set(0, 0, 0), (C = e.options.visualAppearance) != null && C.color && (a.recolor = new
|
|
58
|
+
if (a.name = "viewer-visual-splat", a.position.set(0, 0, 0), (C = e.options.visualAppearance) != null && C.color && (a.recolor = new j(...e.options.visualAppearance.color)), ((N = e.options.visualAppearance) == null ? void 0 : N.opacity) !== void 0 && (a.opacity = e.options.visualAppearance.opacity), m.add(a), o = a, B = ((R = a.packedSplats) == null ? void 0 : R.numSplats) ?? ((D = a.extSplats) == null ? void 0 : D.numSplats) ?? ((W = a.paged) == null ? void 0 : W.numSplats) ?? ((L = a.splats) == null ? void 0 : L.getNumSplats()) ?? null, w = pe(a), w.isEmpty()) throw new Error("Gaussian asset has empty bounds.");
|
|
59
59
|
}
|
|
60
60
|
if (S = e.options.upAxis ?? oe(p.kind), _(m, S), A.add(m), m.updateMatrixWorld(!0), r = new $().setFromObject(m), o && w && (o.updateWorldMatrix(!0, !1), r.union(w.clone().applyMatrix4(o.matrixWorld))), r.isEmpty()) throw new Error("Visual asset has no displayable bounds.");
|
|
61
61
|
if (o && e.options.visualSelectionMode !== "exact") {
|
|
62
|
-
const l = r.getSize(new b()), a = new
|
|
62
|
+
const l = r.getSize(new b()), a = new J({
|
|
63
63
|
transparent: !0,
|
|
64
64
|
// The scene picker filters fully transparent materials, while colorWrite
|
|
65
65
|
// keeps this raycastable proxy invisible in the rendered frame.
|
|
@@ -71,16 +71,16 @@ function xe(t, e) {
|
|
|
71
71
|
y.position.copy(g), y.name = "viewer-visual-bounds-proxy", y.userData.viewerVisualBoundsProxy = !0, A.add(y), d = y;
|
|
72
72
|
}
|
|
73
73
|
se(A);
|
|
74
|
-
const
|
|
74
|
+
const M = new ne(
|
|
75
75
|
A,
|
|
76
76
|
e.options.simulationTheme,
|
|
77
77
|
void 0,
|
|
78
78
|
"model"
|
|
79
79
|
);
|
|
80
|
-
|
|
80
|
+
M.setCacheInvalidationCallback(e.invalidateTransmissionCaches), i = M, s = M.root, c = m, k = P() - V;
|
|
81
81
|
})();
|
|
82
82
|
return E.catch((n) => {
|
|
83
|
-
F = n instanceof Error ? n.message : String(n), k =
|
|
83
|
+
F = n instanceof Error ? n.message : String(n), k = P() - V;
|
|
84
84
|
}), {
|
|
85
85
|
id: `visual-${Math.random().toString(36).slice(2)}`,
|
|
86
86
|
opened: E,
|
|
@@ -230,7 +230,7 @@ function me(t) {
|
|
|
230
230
|
function I() {
|
|
231
231
|
return Object.assign(new Error("Visual asset load aborted."), { name: "AbortError", code: "E_ABORTED" });
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function P() {
|
|
234
234
|
return typeof performance > "u" ? Date.now() : performance.now();
|
|
235
235
|
}
|
|
236
236
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataTexture as ne, LinearMipmapLinearFilter as Xe, LinearFilter as _e, Loader as J, LoaderUtils as Ve, FileLoader as Ge, TextureLoader as Se, RepeatWrapping as pe, ClampToEdgeWrapping as fe, Texture as Y, MeshPhongMaterial as W, MeshLambertMaterial as Fe, ColorManagement as N, Color as k, SRGBColorSpace as X, EquirectangularReflectionMapping as Ne, Matrix4 as L, Group as ce, Bone as he, PropertyBinding as ee, Object3D as Z, PerspectiveCamera as $e, PointLight as de, MathUtils as B, SpotLight as je, DirectionalLight as ze, SkinnedMesh as He, Mesh as Ae, LineBasicMaterial as We, Line as Ye, Vector3 as V, Skeleton as qe, AmbientLight as Ke, BufferGeometry as re, Float32BufferAttribute as z, Uint16BufferAttribute as Ze, Matrix3 as Qe, Vector2 as Je, ShapeUtils as et, Vector4 as tt, Euler as j, AnimationClip as nt, Quaternion as G, VectorKeyframeTrack as rt, QuaternionKeyframeTrack as me, NumberKeyframeTrack as st, LoadingManager as at, LinearSRGBColorSpace as ge, RGBAFormat as Ie, UnsignedByteType as Re, NoColorSpace as ot, MeshPhysicalMaterial as De, Box3 as it } from "three";
|
|
2
2
|
import { DRACOLoader as lt } from "three/examples/jsm/loaders/DRACOLoader.js";
|
|
3
3
|
import { GLTFLoader as ct } from "three/examples/jsm/loaders/GLTFLoader.js";
|
|
4
|
-
import { A as ye, B as we, D as ut, d as ve, E as pt } from "./index-
|
|
4
|
+
import { A as ye, B as we, D as ut, d as ve, E as pt } from "./index-DyBfusq5.js";
|
|
5
5
|
import { TGALoader as ft } from "three/examples/jsm/loaders/TGALoader.js";
|
|
6
6
|
import * as ht from "three/examples/jsm/libs/fflate.module.js";
|
|
7
7
|
import { unzlibSync as dt } from "three/examples/jsm/libs/fflate.module.js";
|
|
@@ -1733,7 +1733,7 @@ async function Lt(o, e, t) {
|
|
|
1733
1733
|
return m = new xt(u).parse(o, ""), await Promise.all(i), e.signal.throwIfAborted(), { root: m, textures: l, textureFailures: f };
|
|
1734
1734
|
} catch (g) {
|
|
1735
1735
|
if (n.abort(g), await Promise.allSettled(i), m) {
|
|
1736
|
-
const { disposeModelResources: d } = await import("./index-
|
|
1736
|
+
const { disposeModelResources: d } = await import("./index-DyBfusq5.js").then((T) => T.af);
|
|
1737
1737
|
d(m, l);
|
|
1738
1738
|
} else for (const d of l) d.dispose();
|
|
1739
1739
|
throw g;
|