@nebula-spatial/viewer 0.5.13 → 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 +45 -0
- package/README.md +32 -34
- package/dist/assets/types.d.ts +10 -1
- package/dist/assets/{usd-worker-CPCXyXkl.js → usd-worker-DU-u_iJN.js} +558 -502
- package/dist/{collision-debug-Aey5D_9r.js → collision-debug-1-acufd9.js} +55 -53
- package/dist/{index-DbJbq4N_.js → index-YdnQRm_T.js} +850 -836
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{mjcf-visual-B3UBh_gG.js → mjcf-visual-DTO5j9bm.js} +1 -1
- package/dist/{mujoco-runtime-BPCq2bmg.js → mujoco-runtime-gqyaQh9L.js} +1 -1
- package/dist/runtime-paths-Dj0itY6G.js +8 -0
- package/dist/{session-52jx0mHi.js → session-AUG5EJBJ.js} +7 -7
- package/dist/{session-C0KFNp50.js → session-mJGcCljH.js} +132 -129
- package/dist/simulation/usd-preload.d.ts +2 -0
- package/dist/simulation/usd-prewarm.d.ts +6 -0
- package/dist/{stage-PhbBBoMY.js → stage-BVdJLgsW.js} +1 -1
- package/dist/{urdf-session-DPOKRNNw.js → urdf-session-oLRIcAw1.js} +5 -5
- package/dist/{usd-session-Co9oFkxC.js → usd-session-Dexv9ijX.js} +1861 -1807
- package/dist/version.d.ts +1 -1
- package/dist/{xacro-B50iFe4M.js → xacro-BjsYN_8k.js} +1 -1
- package/draco/draco_decoder.wasm +0 -0
- package/draco/draco_wasm_wrapper.js +117 -0
- package/openusd/openusd-runtime-manifest.json +3 -3
- package/openusd/openusd_probe.wasm +0 -0
- package/package.json +28 -4
- package/runtime-assets.d.mts +9 -0
- package/runtime-assets.mjs +11 -0
- package/vite.d.mts +7 -0
- package/vite.mjs +115 -0
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type { OpenUsdWasmCompileOptions } from './simulation/openusd-wasm-module
|
|
|
10
10
|
export { compileMujocoWasmModule } from './simulation/mujoco-wasm-module';
|
|
11
11
|
export type { MujocoWasmCompileOptions } from './simulation/mujoco-wasm-module';
|
|
12
12
|
export { preloadUsdViewer } from './simulation/usd-preload';
|
|
13
|
-
export { prewarmUsdWorker } from './simulation/usd-
|
|
13
|
+
export { prewarmUsdWorker } from './simulation/usd-prewarm';
|
|
14
14
|
export type { QueryableUsdModel, UsdAttributeValue, UsdBoundMaterial, UsdMetadataValue, UsdPrimInfo, UsdQuery, } from './simulation/usd-query';
|
|
15
15
|
export type { AssetChangeEvent, AssetControlState, AssetControlChangeEvent, AssetDetectionResult, AssetErrorEvent, AssetErrorSnapshot, AssetFileEntry, AssetFormat, AssetLoaderContext, AssetLoaderContribution, AssetNoticeKind, AssetNoticeSnapshot, AssetPhysicsState, AssetPresentationProfile, AssetPreview, AssetPreviewCapabilities, AssetPreviewKind, AssetPreviewPhase, AssetPreviewSnapshot, AssetResourceResolver, AssetSession, AssetSingleSource, AssetSource, AssetUpAxis, NormalizedAssetSource, OpenAssetOptions, UsdExternalReferenceMode, ViewerAssetOptions, } from './assets/types';
|
|
16
16
|
export { USD_RESOURCE_AUTH, USD_RESOURCE_EXTERNAL_DENIED, USD_RESOURCE_FETCH, USD_RESOURCE_INVALID, USD_RESOURCE_NOT_FOUND, } from './simulation/usd-resource-policy';
|
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);
|