@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.
@@ -99,6 +99,12 @@ export interface PhysicsAsset {
99
99
  readonly format: 'mjcf';
100
100
  readonly xml: string;
101
101
  readonly files: ReadonlyMap<string, Uint8Array>;
102
+ /**
103
+ * Soft-body flexes lowered from USD. `vertexCount` is the number of
104
+ * `mjData.flexvert_xpos` entries; surface flexes keep a 1:1 mapping with the
105
+ * source mesh vertices, while volume flexes use the authored tet vertices.
106
+ */
107
+ readonly flexes?: readonly PhysicsFlexBinding[];
102
108
  /** Initial actuator controls in MJCF actuator declaration order. */
103
109
  readonly initialControls?: readonly number[];
104
110
  /**
@@ -141,9 +147,29 @@ export interface PhysicsAsset {
141
147
  /** Lossy adaptations made while lowering USD geometry into MJCF. */
142
148
  readonly approximations?: readonly SimulationDiagnostic[];
143
149
  }
150
+ export interface PhysicsFlexBinding {
151
+ /** MJCF flex name (also used by `mj_name2id(..., mjOBJ_FLEX, name)`). */
152
+ readonly name: string;
153
+ /** Composed USD prim path that authored the deformable body. */
154
+ readonly primPath: string;
155
+ readonly kind: 'surface' | 'volume' | 'curve';
156
+ readonly vertexCount: number;
157
+ /** Triangle indices used when no rendered USD mesh is available. */
158
+ readonly surfaceIndices?: readonly number[];
159
+ /** Tetrahedron indices (4 per element) for volume skins and deformations. */
160
+ readonly tets?: readonly number[];
161
+ /** Segment indices (2 per element) for 1D curve flexes. */
162
+ readonly edges?: readonly number[];
163
+ /** Collision/render radius in meters for 1D curve flexes. */
164
+ readonly radius?: number;
165
+ /** Deformable-pose skin meshes that should follow this flex. */
166
+ readonly skinPaths?: readonly string[];
167
+ }
144
168
  export interface VisualAsset {
145
169
  readonly root: Group;
146
170
  readonly bindings: ReadonlyMap<string, Object3D>;
171
+ /** All renderable body groups, including MJCF bodies without authored names. */
172
+ readonly bodyBindings?: ReadonlyMap<number, Object3D>;
147
173
  readonly expectedLinkCount: number;
148
174
  /** USD/Three animation clips retained for a future playback controller. */
149
175
  readonly animations?: readonly AnimationClip[];
@@ -1,5 +1,5 @@
1
1
  import { b as d } from "./spark.module-kM8pwA1o.js";
2
- import { R as p } from "./index-8NPEYTG6.js";
2
+ import { R as p } from "./index-B_0o0gFp.js";
3
3
  const a = /* @__PURE__ */ new WeakMap();
4
4
  function o(r, e, s) {
5
5
  let n = a.get(e);
@@ -1,8 +1,8 @@
1
1
  var We = Object.defineProperty;
2
2
  var Ce = (i, e, s) => e in i ? We(i, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : i[e] = s;
3
3
  var R = (i, e, s) => Ce(i, typeof e != "symbol" ? e + "" : e, s);
4
- import { c as Ge, b as Te, d as Ve, w as ye, e as ge, p as Je } from "./asset-ir-CTNCY5IT.js";
5
- import { d as I, N as Pe, O as be, t as Be, u as Qe, v as we, M as Xe, P as Ke, i as Ze, B as Ye, Q as ve, S as Me } from "./index-8NPEYTG6.js";
4
+ import { c as Ge, b as Te, d as Ve, w as ye, e as ge, p as Je } from "./asset-ir-CpAQLRUA.js";
5
+ import { d as I, Q as Pe, T as be, t as Be, u as Qe, v as we, M as Xe, V as Ke, i as Ze, D as Ye, W as ve, S as Me } from "./index-B_0o0gFp.js";
6
6
  import { Quaternion as P, Euler as X, LoadingManager as _e, Group as L, Mesh as z, MeshLambertMaterial as He, MeshPhongMaterial as Re, MeshStandardMaterial as oe, TextureLoader as et, SRGBColorSpace as tt, RepeatWrapping as it, BoxGeometry as re, SphereGeometry as ae, CylinderGeometry as De, CapsuleGeometry as qe, Matrix4 as W, Vector3 as O, MathUtils as st, Matrix3 as Ae, Box3 as $e, AxesHelper as nt, ArrowHelper as Ee, Line as ot, BufferGeometry as rt, LineBasicMaterial as je, Float32BufferAttribute as at, MeshBasicMaterial as Se, LineSegments as lt, EdgesGeometry as ct } from "three";
7
7
  import { GLTFLoader as ut } from "three/examples/jsm/loaders/GLTFLoader.js";
8
8
  import { ColladaLoader as dt } from "three/examples/jsm/loaders/ColladaLoader.js";
@@ -1090,7 +1090,7 @@ async function Vt(i, e, s) {
1090
1090
  const a = e.format === "xacro";
1091
1091
  if (a) {
1092
1092
  (q = e.reportProgress) == null || q.call(e, "xacro", "正在展开 Xacro 宏与依赖文件...");
1093
- const { expandXacro: v } = await import("./xacro-BMaNGmce.js");
1093
+ const { expandXacro: v } = await import("./xacro-itfAyoDj.js");
1094
1094
  n = await v(n, t, s, e.options.xacro, e.signal);
1095
1095
  }
1096
1096
  if (e.signal.aborted) throw Q();
@@ -1140,7 +1140,7 @@ async function Vt(i, e, s) {
1140
1140
  try {
1141
1141
  const G = await vt(o);
1142
1142
  if (e.signal.aborted || S) throw Q();
1143
- const Z = await import("./mujoco-runtime-DiiANmuc.js");
1143
+ const Z = await import("./mujoco-runtime-BljZEVSG.js");
1144
1144
  if (v = new Z.MujocoRuntime(), await v.initialize(G, {
1145
1145
  baseUrl: e.options.mujocoBaseUrl,
1146
1146
  wasmModule: e.options.mujocoWasmModule