@nebula-spatial/viewer 0.5.6 → 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.
- package/CHANGELOG.md +56 -0
- package/README.md +101 -7
- package/USD-VISUAL-MATERIAL-SUPPORT.md +10 -1
- package/dist/assets/types.d.ts +14 -2
- package/dist/assets/usd-worker-Cd5zDKyA.js +1508 -0
- package/dist/collision-debug-B9HJ34H8.js +2896 -0
- package/dist/{index-D6-ClMfm.js → index-CIMsZtyY.js} +4170 -2956
- package/dist/index.d.ts +5 -1
- package/dist/index.js +18 -16
- package/dist/inspection/types.d.ts +79 -2
- package/dist/{mjcf-visual-B8RE9CqV.js → mjcf-visual-DCfPUwyh.js} +1 -1
- package/dist/mujoco-runtime-B9AZiFiG.js +698 -0
- package/dist/session-C-yjpG8R.js +2519 -0
- package/dist/session-uIv9-Ok1.js +786 -0
- package/dist/simulation/mujoco-wasm-module.d.ts +11 -0
- package/dist/simulation/openusd-wasm-module.d.ts +10 -0
- package/dist/{stage-CSRMl8kx.js → stage-C2FchK6h.js} +2 -2
- package/dist/urdf-session-CjGG32Zy.js +1264 -0
- package/dist/usd-session-Cb1e-Bx8.js +6971 -0
- package/dist/version.d.ts +1 -1
- package/dist/{xacro-BpICdIYd.js → xacro-C2EgfvS8.js} +1 -1
- package/openusd/openusd-runtime-manifest.json +3 -3
- package/openusd/openusd_probe.js +14 -14
- package/package.json +2 -1
- package/dist/assets/usd-worker-CnpILBYh.js +0 -1352
- package/dist/collision-debug-CqRm6cC8.js +0 -479
- package/dist/mujoco-runtime-ZuEJSHnD.js +0 -396
- package/dist/session-CDrNB1J2.js +0 -965
- package/dist/session-DgvOdcLe.js +0 -632
- package/dist/urdf-session-DD3HOAib.js +0 -3263
- package/dist/usd-session-BCCp_YDr.js +0 -6217
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ export { createViewer } from './viewer';
|
|
|
5
5
|
export { DEFAULT_GROUND_GRID_SCALE, chooseGroundGridScale, formatGroundGridScale, } from './assets/ground-grid';
|
|
6
6
|
export type { GroundGridScale } from './assets/ground-grid';
|
|
7
7
|
export { getUsdQuery } from './simulation/usd-query';
|
|
8
|
+
export { compileOpenUsdWasmModule } from './simulation/openusd-wasm-module';
|
|
9
|
+
export type { OpenUsdWasmCompileOptions } from './simulation/openusd-wasm-module';
|
|
10
|
+
export { compileMujocoWasmModule } from './simulation/mujoco-wasm-module';
|
|
11
|
+
export type { MujocoWasmCompileOptions } from './simulation/mujoco-wasm-module';
|
|
8
12
|
export { preloadUsdViewer } from './simulation/usd-preload';
|
|
9
13
|
export { prewarmUsdWorker } from './simulation/usd-worker-client';
|
|
10
14
|
export type { QueryableUsdModel, UsdAttributeValue, UsdBoundMaterial, UsdMetadataValue, UsdPrimInfo, UsdQuery, } from './simulation/usd-query';
|
|
@@ -14,4 +18,4 @@ export type { Disposable, ToolbarItem, ViewerState, ViewerInteractionHooks, View
|
|
|
14
18
|
export { configureViewerText } from './cad/text';
|
|
15
19
|
export type { ViewerTextBuilderOptions } from './cad/text';
|
|
16
20
|
export type { CadBlockModel, CadDocumentHandle, CadDocumentUnits, CadFontResolver, CadFontRequest, CadResolvedFont, CadResolvedTextFont, CadTextWarmupOptions, CadHudModel, CadHudSnapshot, CadInspectorModel, CadInspectorSnapshot, CadLayerModel, CadLayerRow, CadBlockUsageRow, CadSessionPhase, CadWorldBounds, CadScaleRulerState, CadInsertDetails, CadInsertSelection, CadInsertSelectionId, CadTextDetails, CadTextSelection, CadTextSelectionId, CadSelection, CadHit, CadViewerSnapshot, CadLoadProgress, CadViewerErrorCode, CadViewerErrorEvent, CadLoadSource, CadOpenOptions, CadSessionLoadTiming, RenderDebugBreakdownEntry, SplitBlockLayerDetail, CadViewerCapability, ResolveTextFont, CadViewerEventMap, CameraStateStore, Viewer, ViewerEventMap, ViewerEnvironment, ViewerFitViewOptions, ViewerHighlightOptions, ViewerOptions, ViewerPickOptions, ViewerPickResult, ViewerPointerEvent, ViewerObjectOptions, ViewerPreviewDragPreset, ViewerCameraSnapshot, ViewerOrthographicSnapshot, ViewerOrbitSnapshot, ViewerRenderStats, ViewerDocumentRect, ViewerCadUiKeyboardOptions, ViewerUiOptions, ViewerCadUiParts, ViewerCadUiOptions, ViewerUiPreset, ViewerCadUiStateStore, ViewerUiTheme, ViewerViewMode, CadInteractionMode, CameraChangeReason, ViewerUiTokens, } from './types';
|
|
17
|
-
export type { AssetInspection, UrdfEntityKind, UrdfInspection, UrdfInspectionEntity, UrdfInspectionIssue, UrdfInspectionJoint, UrdfInspectionLink, UrdfInspectionMode, UrdfInspectionNode, UrdfInspectionOverlays, UrdfInspectionRobot, UrdfInspectionSnapshot, UrdfSourceRange } from './inspection/types';
|
|
21
|
+
export type { JointInspection, JointInspectionJoint, JointInspectionSnapshot, AssetInspection, UrdfEntityKind, UrdfInspection, UrdfInspectionEntity, UrdfInspectionIssue, UrdfInspectionJoint, UrdfInspectionLink, UrdfInspectionMode, UrdfInspectionNode, UrdfInspectionOverlays, UrdfInspectionRobot, UrdfInspectionSnapshot, UrdfSourceRange } from './inspection/types';
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { D as
|
|
2
|
-
import { configureCadTextBuilder as
|
|
1
|
+
import { D as s, t as r, y as o, u as U, U as E, s as _, w as d, z as D, A as R, B as S, C as i, j as u, E as c, F as C, G as O } from "./index-CIMsZtyY.js";
|
|
2
|
+
import { configureCadTextBuilder as m } from "@nebula-spatial/cad-loader";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
R as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
i as
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
s as DEFAULT_GROUND_GRID_SCALE,
|
|
5
|
+
r as USD_RESOURCE_AUTH,
|
|
6
|
+
o as USD_RESOURCE_EXTERNAL_DENIED,
|
|
7
|
+
U as USD_RESOURCE_FETCH,
|
|
8
|
+
E as USD_RESOURCE_INVALID,
|
|
9
|
+
_ as USD_RESOURCE_NOT_FOUND,
|
|
10
|
+
d as chooseGroundGridScale,
|
|
11
|
+
D as compileMujocoWasmModule,
|
|
12
|
+
R as compileOpenUsdWasmModule,
|
|
13
|
+
m as configureViewerText,
|
|
14
|
+
S as createViewer,
|
|
15
|
+
i as formatGroundGridScale,
|
|
16
|
+
u as getUsdQuery,
|
|
17
|
+
c as preloadUsdViewer,
|
|
18
|
+
C as prewarmUsdWorker,
|
|
19
|
+
O as viewerVersion
|
|
18
20
|
};
|
|
@@ -108,5 +108,82 @@ export interface UrdfInspection {
|
|
|
108
108
|
linkWorldPosition?(linkId: string, target: import('three').Vector3): boolean;
|
|
109
109
|
pickRoots?(): readonly import('three').Object3D[];
|
|
110
110
|
}
|
|
111
|
-
/**
|
|
112
|
-
export
|
|
111
|
+
/** Joint coordinates use radians and meters, matching simulation APIs. */
|
|
112
|
+
export interface JointInspectionJoint {
|
|
113
|
+
readonly id: string;
|
|
114
|
+
readonly name: string;
|
|
115
|
+
/** Optional authored display name. Identifiers and bindings keep their original names. */
|
|
116
|
+
readonly label?: string;
|
|
117
|
+
readonly type: string;
|
|
118
|
+
readonly parent: string | null;
|
|
119
|
+
readonly child: string | null;
|
|
120
|
+
/** Nearest scalar ancestor, crossing fixed bodies. Null denotes a root joint. */
|
|
121
|
+
readonly parentJointId?: string | null;
|
|
122
|
+
readonly axis: readonly number[];
|
|
123
|
+
readonly unit: 'rad' | 'm';
|
|
124
|
+
readonly limits?: {
|
|
125
|
+
readonly lower: number;
|
|
126
|
+
readonly upper: number;
|
|
127
|
+
};
|
|
128
|
+
/** Feasible range for a driver after intersecting all mimic followers. */
|
|
129
|
+
readonly controlLimits?: {
|
|
130
|
+
readonly lower: number;
|
|
131
|
+
readonly upper: number;
|
|
132
|
+
};
|
|
133
|
+
readonly defaultValue: number;
|
|
134
|
+
/** Optional physical data used by the selected-joint inspector. */
|
|
135
|
+
readonly movingMass?: number;
|
|
136
|
+
readonly drive?: {
|
|
137
|
+
readonly type?: string;
|
|
138
|
+
readonly stiffness?: number;
|
|
139
|
+
readonly damping?: number;
|
|
140
|
+
};
|
|
141
|
+
readonly maxEffort?: number;
|
|
142
|
+
readonly mimic?: {
|
|
143
|
+
readonly joint: string;
|
|
144
|
+
readonly multiplier: number;
|
|
145
|
+
readonly offset: number;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
export interface JointInspectionSnapshot {
|
|
149
|
+
readonly kind: 'joints';
|
|
150
|
+
readonly revision: number;
|
|
151
|
+
readonly format: 'usd' | 'mjcf';
|
|
152
|
+
readonly joints: readonly JointInspectionJoint[];
|
|
153
|
+
/** Actual coordinates returned by the simulation. */
|
|
154
|
+
readonly jointValues: Readonly<Record<string, number>>;
|
|
155
|
+
/** Manual input is applied as a kinematic preview or a physics servo. */
|
|
156
|
+
readonly controlMode?: 'kinematic' | 'physics';
|
|
157
|
+
/** Joint pose animation is playing (including its opening delay); physics stays paused. */
|
|
158
|
+
readonly previewing?: boolean;
|
|
159
|
+
/** Requested positions during motion; synchronized to the actual pose when editing stops. */
|
|
160
|
+
readonly jointTargets?: Readonly<Record<string, number>>;
|
|
161
|
+
readonly selectedJointId: string | null;
|
|
162
|
+
readonly playing: boolean;
|
|
163
|
+
}
|
|
164
|
+
/** Paused joint preview for compiled USD and MJCF simulation models. */
|
|
165
|
+
export interface JointInspection {
|
|
166
|
+
readonly kind: 'joints';
|
|
167
|
+
getSnapshot(): JointInspectionSnapshot;
|
|
168
|
+
subscribe(listener: (snapshot: JointInspectionSnapshot) => void): () => void;
|
|
169
|
+
/** Notify listeners when the initial automatic joint demonstration completes. */
|
|
170
|
+
onIntroFinished?(listener: () => void): () => void;
|
|
171
|
+
select(jointId: string | null): void;
|
|
172
|
+
setJointValue(jointId: string, value: number): void;
|
|
173
|
+
resetJoint(jointId: string): void;
|
|
174
|
+
resetPose(): void;
|
|
175
|
+
/** Visual meshes only; collision and environment overlays are excluded. */
|
|
176
|
+
pickRoots?(): readonly import('three').Object3D[];
|
|
177
|
+
objectForBody?(bodyId: string): import('three').Object3D | null;
|
|
178
|
+
/** Current world-space hinge origin and positive motion axis. */
|
|
179
|
+
jointWorldFrame?(jointId: string): {
|
|
180
|
+
position: import('three').Vector3;
|
|
181
|
+
axis: import('three').Vector3;
|
|
182
|
+
} | null;
|
|
183
|
+
/** Nearest scalar joint on the body or its ancestors, including fixed descendants. */
|
|
184
|
+
jointForBody?(bodyId: string): string | null;
|
|
185
|
+
/** Named bodies moved by this joint, including its fixed descendants. */
|
|
186
|
+
bodiesForJoint?(jointId: string): readonly string[];
|
|
187
|
+
}
|
|
188
|
+
/** Tagged inspection surface shared by the built-in and headless viewers. */
|
|
189
|
+
export type AssetInspection = UrdfInspection | JointInspection;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as v, s as E } from "./session-
|
|
1
|
+
import { c as v, s as E } from "./session-uIv9-Ok1.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) {
|