@nebula-spatial/viewer 0.5.18 → 0.6.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/CHANGELOG.md +83 -35
- package/README.md +5 -0
- package/dist/asset-ir-BXa1EdOy.js +637 -0
- package/dist/assets/source-types.d.ts +10 -0
- package/dist/assets/types.d.ts +61 -6
- package/dist/assets/{usd-worker-B6-1I5dT.js → usd-worker-r6Nuoxlk.js} +671 -584
- package/dist/index-CHf9y9eX.js +17406 -0
- package/dist/index.d.ts +21 -2
- package/dist/index.js +29 -18
- package/dist/{mjcf-visual-CtY2Wk3w.js → mjcf-visual-DxMXiBnu.js} +12 -13
- package/dist/mujoco-runtime-BA88JuDR.js +791 -0
- package/dist/physics-guide-size-CplAlsve.js +12 -0
- package/dist/scene/instances.d.ts +36 -0
- package/dist/scene/joints.d.ts +129 -0
- package/dist/scene/session.d.ts +26 -0
- package/dist/scene/types.d.ts +292 -0
- package/dist/session-DLi-MvLB.js +240 -0
- package/dist/{session-DxTeRKCd.js → session-DqEr1CxY.js} +581 -567
- package/dist/session-ZNb3ZYLq.js +562 -0
- package/dist/simulation/physics-runtime-state.d.ts +73 -0
- package/dist/simulation/types.d.ts +151 -0
- package/dist/simulation/usd-dependency-probe.d.ts +42 -0
- package/dist/simulation/usd-inspection.d.ts +66 -0
- package/dist/spark-renderer-BGF_AaI9.js +25 -0
- package/dist/spark.module-kM8pwA1o.js +9278 -0
- package/dist/types.d.ts +75 -1
- package/dist/ui/camera-axis-gizmo.d.ts +5 -0
- package/dist/urdf-session-CKlR-fOQ.js +1230 -0
- package/dist/usd-session-DyNMsD-v.js +11199 -0
- package/dist/version.d.ts +1 -1
- package/dist/visual/classification.d.ts +20 -0
- package/dist/{xacro-x2TeKQ7T.js → xacro-BCLnc3tY.js} +1 -1
- package/openusd/openusd-runtime-manifest.json +6 -6
- package/openusd/openusd_probe.js +1 -1
- package/openusd/openusd_probe.wasm +0 -0
- package/package.json +2 -1
- package/runtime-assets.d.mts +9 -9
- package/runtime-assets.mjs +11 -11
- package/vite.d.mts +7 -7
- package/vite.mjs +115 -115
- package/dist/collision-debug-BSJoz5J7.js +0 -2947
- package/dist/index-E8DHSeyT.js +0 -11499
- package/dist/mujoco-runtime-fDWdXNEc.js +0 -739
- package/dist/resources-CHhCm2f7.js +0 -27
- package/dist/session-DB-osaBL.js +0 -801
- package/dist/stage-BnRjc-Rp.js +0 -592
- package/dist/urdf-session-Q_c3Rd1M.js +0 -1264
- package/dist/usd-session-tW3LxVFs.js +0 -10647
package/dist/assets/types.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ export type AssetSource = AssetSingleSource | Extract<CadLoadSource, {
|
|
|
25
25
|
export interface AssetResourceResolver {
|
|
26
26
|
resolve(path: string, options?: {
|
|
27
27
|
readonly signal?: AbortSignal;
|
|
28
|
+
readonly url?: string;
|
|
29
|
+
readonly canonicalPath?: string;
|
|
28
30
|
}): string | URL | Blob | Promise<string | URL | Blob>;
|
|
29
31
|
/**
|
|
30
32
|
* Optional metadata-only view of resources available through this resolver.
|
|
@@ -119,8 +121,9 @@ export interface OpenAssetOptions {
|
|
|
119
121
|
* Which authored axis is "up". FBX first uses a supported positive Y/Z
|
|
120
122
|
* declaration from GlobalSettings, then falls back to 'y' when it is missing
|
|
121
123
|
* or cannot be read. GLB/glTF default to 'y' per the glTF coordinate
|
|
122
|
-
* convention.
|
|
123
|
-
*
|
|
124
|
+
* convention. Gaussian/3DGS assets default to 'y-down' because their source
|
|
125
|
+
* +Y points down. An explicit value always wins. 'y' rotates authored +Y into
|
|
126
|
+
* world +Z; 'y-down' rotates authored +Y into world -Z.
|
|
124
127
|
*
|
|
125
128
|
* Also seeds the initial up axis of simulation assets. URDF/XACRO/MJCF are
|
|
126
129
|
* Z-up by specification; USD defaults to 'z' because the loader has already
|
|
@@ -129,11 +132,21 @@ export interface OpenAssetOptions {
|
|
|
129
132
|
* consistent with what is rendered.
|
|
130
133
|
*/
|
|
131
134
|
readonly upAxis?: AssetUpAxis;
|
|
135
|
+
/** Gaussian bounds are the default; exact mode enables per-splat raycasts. */
|
|
136
|
+
readonly visualSelectionMode?: 'bounds' | 'exact';
|
|
137
|
+
readonly visualAppearance?: {
|
|
138
|
+
/** Linear RGB in 0..1. */
|
|
139
|
+
readonly color?: readonly [number, number, number];
|
|
140
|
+
readonly opacity?: number;
|
|
141
|
+
};
|
|
132
142
|
/** CAD-specific compatibility options. `filename` and `signal` above take precedence. */
|
|
133
143
|
readonly cad?: Omit<CadOpenOptions, 'filename' | 'signal'>;
|
|
134
144
|
}
|
|
135
|
-
/**
|
|
136
|
-
|
|
145
|
+
/**
|
|
146
|
+
* World axis a model was authored to treat as up. `'y-down'` means source +Y
|
|
147
|
+
* points down, so it maps to world -Z. See `OpenAssetOptions.upAxis`.
|
|
148
|
+
*/
|
|
149
|
+
export type AssetUpAxis = 'y' | 'y-down' | 'z';
|
|
137
150
|
export interface AssetPreviewCapabilities {
|
|
138
151
|
readonly canPlay: boolean;
|
|
139
152
|
readonly canPause: boolean;
|
|
@@ -290,9 +303,17 @@ export interface NormalizedAssetSource {
|
|
|
290
303
|
readonly signal: AbortSignal;
|
|
291
304
|
readonly baseUrl: string | null;
|
|
292
305
|
readonly hasResourceResolver: boolean;
|
|
293
|
-
/**
|
|
306
|
+
/** Present when the source carries a prefetched remote entry. */
|
|
307
|
+
readonly entryBlob?: Blob | null;
|
|
308
|
+
/** Known package identities or canonical remote URLs used during resolution. */
|
|
294
309
|
readonly resourcePaths?: readonly string[];
|
|
295
|
-
resolve(path: string,
|
|
310
|
+
resolve(path: string, contextOrSignal?: {
|
|
311
|
+
readonly signal?: AbortSignal;
|
|
312
|
+
readonly url?: string;
|
|
313
|
+
readonly canonicalPath?: string;
|
|
314
|
+
} | AbortSignal): Promise<string>;
|
|
315
|
+
/** Resolves an archive member without remote I/O, for loaders with synchronous URL hooks. */
|
|
316
|
+
resolveSync?(path: string): string | null;
|
|
296
317
|
release(): void;
|
|
297
318
|
}
|
|
298
319
|
export interface AssetDetectionResult {
|
|
@@ -324,6 +345,12 @@ export interface AssetLoaderContext {
|
|
|
324
345
|
export interface AssetSession {
|
|
325
346
|
readonly autoPlay?: boolean;
|
|
326
347
|
readonly inspection?: AssetInspection | null;
|
|
348
|
+
setInspectionOverlay?(kind: 'jointAxis' | 'centerOfMass' | 'inertia', visible: boolean): boolean;
|
|
349
|
+
getInspectionOverlayCapabilities?(): {
|
|
350
|
+
jointAxis: boolean;
|
|
351
|
+
centerOfMass: boolean;
|
|
352
|
+
inertia: boolean;
|
|
353
|
+
} | null;
|
|
327
354
|
isPlaying?(): boolean;
|
|
328
355
|
setTheme?(theme: 'dark' | 'light'): void;
|
|
329
356
|
beforeRender?(renderer: WebGLRenderer, scene: Scene, camera: Camera): (() => void) | void;
|
|
@@ -359,6 +386,34 @@ export interface AssetSession {
|
|
|
359
386
|
beginGrab?(event: PointerEvent, camera: import('three').Camera, canvas: HTMLElement): boolean;
|
|
360
387
|
moveGrab?(event: PointerEvent, camera: import('three').Camera, canvas: HTMLElement): void;
|
|
361
388
|
endGrab?(): void;
|
|
389
|
+
/**
|
|
390
|
+
* Hidden authored/compiled collision geometry ready for placement probing.
|
|
391
|
+
* Scene sessions consume it so an uncommitted instance pose can be validated
|
|
392
|
+
* against the same colliders the asset session already builds lazily.
|
|
393
|
+
*/
|
|
394
|
+
getCollisionRoot?(): import('three').Object3D | null;
|
|
395
|
+
/**
|
|
396
|
+
* Internal scene bridge: exposes the already-compiled MJCF and the exact
|
|
397
|
+
* visual body objects so multiple instances can be merged into one physical
|
|
398
|
+
* world without re-parsing USD/MJCF.
|
|
399
|
+
*/
|
|
400
|
+
getScenePhysics?(): ScenePhysicsSource | null;
|
|
401
|
+
}
|
|
402
|
+
export interface ScenePhysicsSource {
|
|
403
|
+
readonly format: 'mjcf';
|
|
404
|
+
readonly xml: string;
|
|
405
|
+
readonly files: ReadonlyMap<string, Uint8Array>;
|
|
406
|
+
readonly initialControls?: readonly number[];
|
|
407
|
+
readonly initialJoints?: Readonly<Record<string, number>>;
|
|
408
|
+
readonly massOverrides?: readonly {
|
|
409
|
+
readonly body: string;
|
|
410
|
+
readonly mass: number;
|
|
411
|
+
}[];
|
|
412
|
+
readonly initialVelocities?: readonly {
|
|
413
|
+
readonly body: string;
|
|
414
|
+
readonly velocity: readonly number[];
|
|
415
|
+
}[];
|
|
416
|
+
readonly visualBindings: ReadonlyMap<string, import('three').Object3D>;
|
|
362
417
|
}
|
|
363
418
|
export interface AssetLoaderContribution {
|
|
364
419
|
readonly kind: 'asset-loader';
|