@nebula-spatial/viewer 0.5.7 → 0.5.8

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.
@@ -1,7 +1,7 @@
1
- import { d as Je, f as ze, c as Ve, a as $e, b as Be, g as ke, w as Xe, h as Ie, p as se, S as je, e as He } from "./collision-debug-B2CISPB9.js";
1
+ import { d as Je, f as ze, c as Ve, a as $e, b as Be, g as ke, w as Xe, h as Ie, p as se, S as je, e as He } from "./collision-debug-B9HJ34H8.js";
2
2
  import { disposeModelResources as ae } from "./resources-CHhCm2f7.js";
3
- import { D as We } from "./index-BTAC6njT.js";
4
- import { S as oe } from "./stage-DUC-YNhD.js";
3
+ import { D as We } from "./index-CIMsZtyY.js";
4
+ import { S as oe } from "./stage-C2FchK6h.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 ce, Group as Ee, Mesh as Ae, PlaneGeometry as Oe, BoxGeometry as Re, SphereGeometry as ie, Matrix4 as nt, CylinderGeometry as Fe, CapsuleGeometry as Ne, 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-BUD3KtCr.js")).loadUsdSimulation(t, e, a);
519
+ const A = await (await import("./usd-session-Cb1e-Bx8.js")).loadUsdSimulation(t, e, a);
520
520
  if (w || e.signal.aborted)
521
521
  throw A.dispose(), fe();
522
522
  N = 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
  (T = e.reportProgress) == null || T.call(e, "urdf", "正在解析 URDF 场景与运动学结构...");
535
- const A = await (await import("./urdf-session-E0Nnr4Vs.js")).loadUrdfSimulation(t, e, a);
535
+ const A = await (await import("./urdf-session-CjGG32Zy.js")).loadUrdfSimulation(t, e, a);
536
536
  if (w || e.signal.aborted)
537
537
  throw A.dispose(), fe();
538
538
  E = A.asset, o = A.stage, P = A.inspection, f = A.dispose, c = A.step, n = A.reset, i = A.play, v = A.pause, p = A.isPlaying, M = () => A.capabilities, S = () => A.physics, m = !1, b = !1, g = A.warning ?? null, B(), 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-CAyK0LHM.js");
559
+ const { MujocoRuntime: A } = await import("./mujoco-runtime-B9AZiFiG.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-BVT3h87h.js");
567
+ const { compileMjcfPreview: K } = await import("./mjcf-visual-DCfPUwyh.js");
568
568
  let z;
569
569
  try {
570
570
  z = K(E);
@@ -581,7 +581,7 @@ function St(t, e) {
581
581
  const qe = Ge(s, !1, E.diagnostics), we = E.diagnostics.droppedFeatures.find((L) => L.code.startsWith("MJCF_"));
582
582
  we && (g = { ...we, stage: "visual-material" }), Q(w, e.signal), (ve = e.reportProgress) == null || ve.call(e, "stage", "正在构建三维场景与环境光影..."), u = new je(s, qe), o = new oe(u.root, e.options.simulationTheme, s);
583
583
  const Me = Ge(s, !0, E.diagnostics);
584
- Me.root.children.length > 0 ? (d = new je(s, Me), d.root.visible = !1) : d = null, d && o.attachAuxiliary(d.root), B(), h = He(
584
+ Me.root.children.length > 0 ? (d = new je(s, Me, { accelerateRaycast: !1 }), d.root.visible = !1) : d = null, d && o.attachAuxiliary(d.root), B(), h = He(
585
585
  s,
586
586
  "mjcf",
587
587
  () => {
@@ -3,7 +3,7 @@ var S = (a, t, e) => t in a ? R(a, t, { enumerable: !0, configurable: !0, writab
3
3
  var s = (a, t, e) => S(a, typeof t != "symbol" ? t + "" : t, e);
4
4
  import * as i from "three";
5
5
  import { Quaternion as C, Vector3 as V } from "three";
6
- import { V as b, D as A, w as W } from "./index-BTAC6njT.js";
6
+ import { V as b, D as A, w as W } from "./index-CIMsZtyY.js";
7
7
  import { disposeModelResources as T } from "./resources-CHhCm2f7.js";
8
8
  const v = 1, B = (
9
9
  /* glsl */
@@ -475,7 +475,7 @@ class rt {
475
475
  }
476
476
  beginGrab(t, e, r) {
477
477
  if (!this.runtime || this.disposed) return !1;
478
- this.pointerRay(t, e, r);
478
+ this.pointerRay(t, e, r), this.raycaster.firstHitOnly = !0;
479
479
  const o = this.raycaster.intersectObject(this.model, !0).find((d) => d.object.isMesh);
480
480
  if (!o) return !1;
481
481
  const n = this.findBodyGroup(o.object);