@nebula-spatial/viewer 0.5.0 → 0.5.1

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as i, v as o } from "./index-D2vtjYht.js";
1
+ import { c as i, v as o } from "./index-CXdFFc74.js";
2
2
  import { configureCadTextBuilder as t } from "@nebula-spatial/cad-loader";
3
3
  export {
4
4
  t as configureViewerText,
@@ -1,6 +1,6 @@
1
- import { e as v, s as E } from "./session-DHPMjyl3.js";
1
+ import { e as v, s as E } from "./session-BhTeAhTq.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
- import { b as j } from "./stage-D-BewE6x.js";
3
+ import { b as j } from "./stage-DBmU5D0V.js";
4
4
  function U(f) {
5
5
  const y = f.extension.documents, l = new q();
6
6
  l.name = f.name;
@@ -1,7 +1,7 @@
1
1
  var Ae = Object.defineProperty;
2
2
  var Oe = (o, e, s) => e in o ? Ae(o, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : o[e] = s;
3
3
  var B = (o, e, s) => Oe(o, typeof e != "symbol" ? e + "" : e, s);
4
- import { b as W, S as K } from "./stage-D-BewE6x.js";
4
+ import { b as W, S as K } from "./stage-DBmU5D0V.js";
5
5
  import { LineBasicMaterial as Ge, WireframeGeometry as Ce, LineSegments as Re, EdgesGeometry as Z, Vector3 as ce, Color as Pe, LinearSRGBColorSpace as Ue, SRGBColorSpace as be, MeshPhysicalMaterial as Le, Float32BufferAttribute as H, DataTexture as Te, RGBAFormat as Fe, UnsignedByteType as Ne, NoColorSpace as De, RepeatWrapping as Ie, LinearFilter as $e, LinearMipmapLinearFilter as Be, BufferGeometry as oe, Group as fe, Mesh as me, PlaneGeometry as Ee, BoxGeometry as we, SphereGeometry as Q, Matrix4 as ke, CylinderGeometry as je, CapsuleGeometry as Se, BufferAttribute as ee } from "three";
6
6
  function de(o, e, s) {
7
7
  if (e.throwIfAborted(), o instanceof Error && (o.name === "AbortError" || ["E_ABORTED", "E_SUPERSEDED"].includes(String(o.code)))) throw o;
@@ -584,7 +584,7 @@ function wt(o, e) {
584
584
  const N = e.format;
585
585
  if (N === "usd" || N === "usda" || N === "usdc" || N === "usdz") {
586
586
  (g = e.reportProgress) == null || g.call(e, "usd", "正在解析 USD 场景与物理刚体...");
587
- const p = await (await import("./usd-session-yEFMGOIp.js")).loadUsdSimulation(o, e, s);
587
+ const p = await (await import("./usd-session-DmO4QMLH.js")).loadUsdSimulation(o, e, s);
588
588
  if (h || e.signal.aborted)
589
589
  throw p.dispose(), se();
590
590
  v = p.asset, r = p.binding, l = p.dispose, _ = p.hasAnimation === !0, n = p.hasPhysics || _ ? p.step : null, c = p.reset, w = p.hasPhysics || _, d = p.hasPhysics, y = p.fallback ? { ...p.fallback, stage: "physics-fallback" } : p.visualWarning ? { ...p.visualWarning, stage: "visual-adaptation" } : null, (M = e.reportProgress) == null || M.call(e, "stage", "正在构建三维场景与环境光影..."), u = new K(r.root, e.options.simulationTheme, p.runtime), p.runtime && (t = p.runtime), f = p.collision ?? null, f && (f.root.visible = !1, u.attachAuxiliary(f.root)), G();
@@ -592,7 +592,7 @@ function wt(o, e) {
592
592
  }
593
593
  if (N === "urdf" || N === "xacro") {
594
594
  (R = e.reportProgress) == null || R.call(e, "urdf", "正在解析 URDF 场景与运动学结构...");
595
- const p = await (await import("./urdf-session-DsE5uC-u.js")).loadUrdfSimulation(o, e, s);
595
+ const p = await (await import("./urdf-session-BtARifnH.js")).loadUrdfSimulation(o, e, s);
596
596
  if (h || e.signal.aborted)
597
597
  throw p.dispose(), se();
598
598
  v = p.asset, u = p.stage, b = p.inspection, l = p.dispose, n = p.step, c = p.reset, i = p.play, a = p.pause, m = p.isPlaying, S = () => p.capabilities, E = () => p.physics, w = !1, d = !1, y = p.warning ?? null, G();
@@ -621,7 +621,7 @@ function wt(o, e) {
621
621
  } catch (D) {
622
622
  const p = de(D, e.signal, "mjcf-physics");
623
623
  t == null || t.dispose(), t = null;
624
- const { compileMjcfPreview: q } = await import("./mjcf-visual-NkIASi_6.js");
624
+ const { compileMjcfPreview: q } = await import("./mjcf-visual-BnZWMjcp.js");
625
625
  let $;
626
626
  try {
627
627
  $ = q(v);
@@ -1,7 +1,7 @@
1
1
  import { DataTexture as N, LinearMipmapLinearFilter as re, LinearFilter as se, LoadingManager as oe, Loader as ae, Texture as X, TextureLoader as ie, LinearSRGBColorSpace as G, SRGBColorSpace as le, RGBAFormat as K, UnsignedByteType as J, NoColorSpace as ce, Mesh as ue, MeshPhysicalMaterial as Z, MeshPhongMaterial as k, MeshLambertMaterial as fe, Color as C, Group as pe, Box3 as de, Vector3 as he } from "three";
2
2
  import { DRACOLoader as me } from "three/examples/jsm/loaders/DRACOLoader.js";
3
3
  import { GLTFLoader as ge } from "three/examples/jsm/loaders/GLTFLoader.js";
4
- import { d as Y, a as q, S as ye, b as j } from "./stage-D-BewE6x.js";
4
+ import { d as Y, a as q, S as ye, b as j } from "./stage-DBmU5D0V.js";
5
5
  import { TGALoader as we } from "three/examples/jsm/loaders/TGALoader.js";
6
6
  import { FBXLoader as be } from "three/examples/jsm/loaders/FBXLoader.js";
7
7
  import { unzlibSync as xe } from "three/examples/jsm/libs/fflate.module.js";
@@ -177,7 +177,7 @@ async function Te(e, t, n) {
177
177
  return l = new be(m).parse(e, ""), await Promise.all(p), t.signal.throwIfAborted(), { root: l, textures: d };
178
178
  } catch (u) {
179
179
  if (s.abort(u), await Promise.allSettled(p), l) {
180
- const { disposeModelResources: w } = await import("./stage-D-BewE6x.js").then((f) => f.r);
180
+ const { disposeModelResources: w } = await import("./stage-DBmU5D0V.js").then((f) => f.r);
181
181
  w(l, d);
182
182
  } else for (const w of d) w.dispose();
183
183
  throw u;
@@ -3,7 +3,7 @@ var P = (n, e, t) => e in n ? w(n, e, { enumerable: !0, configurable: !0, writab
3
3
  var a = (n, e, t) => P(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  import * as r from "three";
5
5
  import { Quaternion as y, Vector3 as C } from "three";
6
- import { V as x } from "./index-D2vtjYht.js";
6
+ import { V as x } from "./index-CXdFFc74.js";
7
7
  const m = 1, S = (
8
8
  /* glsl */
9
9
  `
@@ -1,8 +1,8 @@
1
1
  var un = Object.defineProperty;
2
2
  var fn = (n, t, i) => t in n ? un(n, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : n[t] = i;
3
3
  var $ = (n, t, i) => fn(n, typeof t != "symbol" ? t + "" : t, i);
4
- import { d as dn, b as pn, e as oi, c as mn, a as ri, r as hn, S as ai, p as yn } from "./session-DHPMjyl3.js";
5
- import { b as ft, S as gn, m as ci } from "./stage-D-BewE6x.js";
4
+ import { d as dn, b as pn, e as oi, c as mn, a as ri, r as hn, S as ai, p as yn } from "./session-BhTeAhTq.js";
5
+ import { b as ft, S as gn, m as ci } from "./stage-DBmU5D0V.js";
6
6
  import { Quaternion as K, Euler as Zt, LoadingManager as Ci, Group as ut, Mesh as C, MeshLambertMaterial as wn, MeshPhongMaterial as li, MeshStandardMaterial as Je, Matrix4 as H, TextureLoader as bn, SRGBColorSpace as xn, RepeatWrapping as An, BoxGeometry as He, SphereGeometry as Ze, CylinderGeometry as Ni, CapsuleGeometry as qi, Vector3 as z, MathUtils as Mn, Matrix3 as ui, Box3 as it, BufferAttribute as Oi, Line3 as dt, Plane as Vi, Vector2 as gt, Triangle as $t, BackSide as vn, DoubleSide as Pn, REVISION as Wi, Ray as Sn, FrontSide as fi, LineSegments as Qe, LineLoop as Gi, Line as Ye, Points as Xi, Sphere as Tn, BatchedMesh as Rn, AxesHelper as Bn, ArrowHelper as di, BufferGeometry as _n, LineBasicMaterial as pi, Float32BufferAttribute as En, MeshBasicMaterial as mi, EdgesGeometry as zn } from "three";
7
7
  import { GLTFLoader as Un } from "three/examples/jsm/loaders/GLTFLoader.js";
8
8
  import { ColladaLoader as Fn } from "three/examples/jsm/loaders/ColladaLoader.js";
@@ -3124,7 +3124,7 @@ async function yo(n, t, i) {
3124
3124
  const r = t.format === "xacro";
3125
3125
  if (r) {
3126
3126
  (E = t.reportProgress) == null || E.call(t, "xacro", "正在展开 Xacro 宏与依赖文件...");
3127
- const { expandXacro: U } = await import("./xacro-D8OfZ2xw.js");
3127
+ const { expandXacro: U } = await import("./xacro-B8n3d29Q.js");
3128
3128
  s = await U(s, e, i, t.options.xacro, t.signal);
3129
3129
  }
3130
3130
  if (t.signal.aborted) throw Jt();
@@ -1,8 +1,8 @@
1
1
  import { Mesh as te, FrontSide as vt, DoubleSide as Pt, MeshPhysicalMaterial as ie, DataTexture as Je, UnsignedByteType as Ze, RGBAFormat as Ke, NoColorSpace as K, Float32BufferAttribute as At, SRGBColorSpace as Qe, RepeatWrapping as q, Color as ut, Texture as lt, MeshStandardMaterial as He, TextureLoader as pt, MirroredRepeatWrapping as ft, ClampToEdgeWrapping as dt, Group as Ee, Vector3 as N, Quaternion as ee, Matrix4 as pe, Box3 as Te, Sphere as Dt, SphereGeometry as Mt, BoxGeometry as Rt, SkinnedMesh as Me, Skeleton as It, AnimationMixer as Ot, LoopRepeat as Tt } from "three";
2
- import { n as Nt, c as $t, a as Re, b as Lt, d as Ct, p as Gt, S as et } from "./session-DHPMjyl3.js";
2
+ import { n as Nt, c as $t, a as Re, b as Lt, d as Ct, p as Gt, S as et } from "./session-BhTeAhTq.js";
3
3
  import { ConvexGeometry as Bt } from "three/examples/jsm/geometries/ConvexGeometry.js";
4
4
  import { createUSDLoadedModel as Ft, buildUSDScene as kt } from "@openusd-wasm/three-loader";
5
- import { b as mt } from "./stage-D-BewE6x.js";
5
+ import { b as mt } from "./stage-DBmU5D0V.js";
6
6
  function Vt(e) {
7
7
  var s, d;
8
8
  const t = e.stage;
package/dist/version.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Viewer 版本号。必须与 package.json 的 version 保持一致,
3
3
  * check-boundary 脚本会在构建前校验两者是否漂移。
4
4
  */
5
- export declare const viewerVersion = "0.5.0";
5
+ export declare const viewerVersion = "0.5.1";
@@ -1,4 +1,4 @@
1
- import { n as bt } from "./session-DHPMjyl3.js";
1
+ import { n as bt } from "./session-BhTeAhTq.js";
2
2
  function _t(t) {
3
3
  const e = t.split(/[\\/]/g);
4
4
  return e.pop(), e.length === 0 ? "./" : e.join("/") + "/";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nebula-spatial/viewer",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Read-only Three.js viewer facade",
5
5
  "license": "ISC",
6
6
  "engines": {
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@mujoco/mujoco": "^3.12.0",
44
- "@nebula-spatial/cad-loader": "^0.3.0",
44
+ "@nebula-spatial/cad-loader": "^0.3.1",
45
45
  "@openusd-wasm/three-loader": "^0.0.13",
46
46
  "three-mesh-bvh": "^0.9.5",
47
47
  "xacro-parser": "0.3.11"