@nebula-spatial/studio 0.0.0-stage → 0.1.0
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/README.md +206 -3
- package/dist/ai/contract.d.ts +73 -0
- package/dist/ai/host.d.ts +28 -0
- package/dist/asset/dependency-scan.d.ts +78 -0
- package/dist/asset/intake.d.ts +84 -0
- package/dist/asset/layout-detect.d.ts +40 -0
- package/dist/asset/media-type.d.ts +10 -0
- package/dist/asset/model-inspection.d.ts +127 -0
- package/dist/asset/record.d.ts +35 -0
- package/dist/asset/remote-asset-resolver.d.ts +36 -0
- package/dist/asset/repairs.d.ts +53 -0
- package/dist/asset/resource-locator.d.ts +15 -0
- package/dist/asset/revision-diff.d.ts +33 -0
- package/dist/asset/source-contracts.d.ts +21 -0
- package/dist/asset/source-paths.d.ts +15 -0
- package/dist/asset/usd-inspection.d.ts +39 -0
- package/dist/asset/usd-source-metadata.d.ts +142 -0
- package/dist/asset/visual-intake.d.ts +27 -0
- package/dist/asset/visual-record.d.ts +22 -0
- package/dist/asset/web-intake.d.ts +46 -0
- package/dist/asset-source-BExlEcRt.js +444 -0
- package/dist/assets/usd-export-worker-BsGubtAE.js +1 -0
- package/dist/builders-BAXRR5o5.js +1854 -0
- package/dist/core/asset-task.d.ts +105 -0
- package/dist/core/context.d.ts +23 -0
- package/dist/core/host.d.ts +432 -0
- package/dist/core/persistence-controller.d.ts +58 -0
- package/dist/core/plugins.d.ts +139 -0
- package/dist/core/scene-tree.d.ts +62 -0
- package/dist/core/versions.d.ts +2 -0
- package/dist/core/when.d.ts +13 -0
- package/dist/core/write-policy.d.ts +29 -0
- package/dist/delivery/build-plan.d.ts +2 -0
- package/dist/delivery/contracts.d.ts +362 -0
- package/dist/delivery/digest.d.ts +3 -0
- package/dist/delivery/evidence.d.ts +10 -0
- package/dist/delivery/export-evidence.d.ts +3 -0
- package/dist/delivery/index.d.ts +9 -0
- package/dist/delivery/prim-name.d.ts +17 -0
- package/dist/delivery/profile.d.ts +4 -0
- package/dist/doc/builders.d.ts +99 -0
- package/dist/doc/command.d.ts +195 -0
- package/dist/doc/domain-extensions.d.ts +34 -0
- package/dist/doc/node-facts.d.ts +87 -0
- package/dist/doc/physics-facts.d.ts +74 -0
- package/dist/doc/placement-policy.d.ts +71 -0
- package/dist/doc/random-placement.d.ts +30 -0
- package/dist/doc/scene-graph.d.ts +80 -0
- package/dist/doc/scene-regions.d.ts +29 -0
- package/dist/doc/schema.d.ts +452 -0
- package/dist/doc/task.d.ts +71 -0
- package/dist/doc/validate.d.ts +68 -0
- package/dist/editor/asset-source.d.ts +15 -0
- package/dist/editor/editor.d.ts +246 -0
- package/dist/editor/index.d.ts +22 -0
- package/dist/editor/shortcuts.d.ts +2 -0
- package/dist/editor/types.d.ts +143 -0
- package/dist/editor/ui-plugins.d.ts +64 -0
- package/dist/editor.js +1755 -0
- package/dist/editorial-BkAFWfbg.js +83 -0
- package/dist/export-evidence-B_0zRmb8.js +5027 -0
- package/dist/generalization/domain.d.ts +10 -0
- package/dist/generalization/generalization.d.ts +371 -0
- package/dist/generalization/index.d.ts +11 -0
- package/dist/generalization.js +1659 -0
- package/dist/history/undo-stack.d.ts +74 -0
- package/dist/index.d.ts +91 -0
- package/dist/index.js +2839 -0
- package/dist/persist/content-addressed.d.ts +11 -0
- package/dist/persist/create-scene-package-from-host.d.ts +7 -0
- package/dist/persist/indexeddb-store.d.ts +69 -0
- package/dist/persist/scene-file.d.ts +52 -0
- package/dist/persist/scene-package.d.ts +8 -0
- package/dist/persist/snapshot.d.ts +5 -0
- package/dist/physics-facts-tfQYyNTD.js +337 -0
- package/dist/placement-policy-DY_FNRDu.js +405 -0
- package/dist/ports/asset-ingestor.d.ts +41 -0
- package/dist/ports/asset-source.d.ts +57 -0
- package/dist/ports/delivery.d.ts +13 -0
- package/dist/ports/persistence.d.ts +29 -0
- package/dist/project/asset-catalog.d.ts +21 -0
- package/dist/project/contracts.d.ts +272 -0
- package/dist/project/editorial.d.ts +16 -0
- package/dist/project/identity.d.ts +20 -0
- package/dist/project/index.d.ts +9 -0
- package/dist/project/scene-document.d.ts +5 -0
- package/dist/project/source-dependencies.d.ts +7 -0
- package/dist/remote-asset-resolver-Cb8cfNmw.js +136 -0
- package/dist/scene/index.d.ts +12 -0
- package/dist/scene-graph-DBLKAhxa.js +681 -0
- package/dist/scene-session-BV1HnxNh.js +3506 -0
- package/dist/scene.js +244 -0
- package/dist/studio/delivery-catalog.d.ts +28 -0
- package/dist/studio/in-memory-asset-source.d.ts +15 -0
- package/dist/studio/index.d.ts +31 -0
- package/dist/studio/indexeddb-asset-source.d.ts +32 -0
- package/dist/studio/indexeddb-persistence.d.ts +13 -0
- package/dist/studio/remote-asset-importer.d.ts +56 -0
- package/dist/studio/source-package.d.ts +9 -0
- package/dist/studio/usd-export-client.d.ts +13 -0
- package/dist/studio/usd-export-protocol.d.ts +98 -0
- package/dist/studio/usd-export-worker.d.ts +1 -0
- package/dist/studio/usd-zip-reader.d.ts +14 -0
- package/dist/studio/web-asset-ingestor.d.ts +10 -0
- package/dist/studio/web-host.d.ts +8 -0
- package/dist/studio.js +5544 -0
- package/dist/util/asset-facts.d.ts +3 -0
- package/dist/util/data.d.ts +17 -0
- package/dist/util/diagnostics.d.ts +38 -0
- package/dist/util/geometry.d.ts +11 -0
- package/dist/util/hash.d.ts +9 -0
- package/dist/util/ids.d.ts +20 -0
- package/dist/util/math.d.ts +47 -0
- package/dist/util/ply-metadata.d.ts +19 -0
- package/dist/util/studio-source.d.ts +23 -0
- package/dist/version.d.ts +5 -0
- package/dist/view/appearance.d.ts +13 -0
- package/dist/view/authoring-appearance.d.ts +25 -0
- package/dist/view/bounds-preview.d.ts +34 -0
- package/dist/view/bounds.d.ts +11 -0
- package/dist/view/camera-zoom.d.ts +3 -0
- package/dist/view/geometry-anchors.d.ts +20 -0
- package/dist/view/gizmo-appearance.d.ts +5 -0
- package/dist/view/gizmo.d.ts +81 -0
- package/dist/view/group-selection.d.ts +13 -0
- package/dist/view/node-features.d.ts +39 -0
- package/dist/view/picking.d.ts +49 -0
- package/dist/view/placement.d.ts +48 -0
- package/dist/view/region-editing.d.ts +25 -0
- package/dist/view/rotation-guide.d.ts +36 -0
- package/dist/view/runtime-capabilities.d.ts +22 -0
- package/dist/view/scene-session.d.ts +258 -0
- package/dist/view/screen-bounds.d.ts +17 -0
- package/dist/view/selection-transform.d.ts +20 -0
- package/node_modules/@nebula-spatial/cad-loader/CHANGELOG.md +48 -0
- package/node_modules/@nebula-spatial/cad-loader/README.md +108 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/cad-types.d.ts +26 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/errors.d.ts +5 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/index.d.ts +24 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/index.js +2354 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/bin-group-reader.d.ts +9 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/bin-parser.d.ts +78 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/dxbs-sidecar.d.ts +24 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/geometry-segments.d.ts +20 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/text-roundtrip.d.ts +4 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/types.d.ts +81 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/runtime-text-decoder.d.ts +8 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/types.d.ts +153 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/utils/insert-bbox.d.ts +10 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/core/utils/viewport-rect.d.ts +21 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/index.d.ts +36 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/index.js +5829 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/geo-loader.d.ts +59 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/automatic-external-resources.d.ts +26 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/external-variant-sidecar-fetch.d.ts +13 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/flow-control.d.ts +29 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/frame-budget-scheduler.d.ts +21 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-compact-executor.d.ts +19 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-loader-local-adapter.d.ts +2 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-loader-pipeline.d.ts +92 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-loader-worker-adapter.d.ts +13 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-node-builder.d.ts +34 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-node-load-sink.d.ts +28 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-node.d.ts +304 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-prepare-worker-types.d.ts +94 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-prepare.d.ts +38 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-prepare.worker.d.ts +1 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/insert-model-builder.d.ts +10 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/insert-runtime-geometry.d.ts +15 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/line-canonical.d.ts +37 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/line-quality.d.ts +9 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/prepare-credit-gate.d.ts +20 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/transport.d.ts +2 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/render-resource/cad-render-node.d.ts +80 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/render-resource/geo-node-cad-render-node.d.ts +12 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/scene/geo-cad-line-geometry.d.ts +28 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/scene/geo-cad-line-material.d.ts +18 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/scene/instancing/block-geometry-registry.d.ts +35 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/scene/instancing/insert-instance-table.d.ts +23 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/scene/instancing/viewport-instance-presenter.d.ts +66 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/selection/cad-insert-selection.d.ts +35 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/selection/cad-text-selection.d.ts +31 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/session/annotation-idle-gate.d.ts +14 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/session/cad-document-session.d.ts +187 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/session/cad-font-runtime.d.ts +11 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/session/cad-insert-id.d.ts +6 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/session/cad-text-warmup.d.ts +38 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/session/create-cad-document-session.d.ts +5 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/session/load-session.d.ts +90 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/session/viewport-coverage.d.ts +32 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/abort.d.ts +3 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/cad-display-color.d.ts +55 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/cad-load-source.d.ts +8 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/color-buffer.d.ts +6 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/constants.d.ts +11 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/display-color-buffer.d.ts +27 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/errors.d.ts +2 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/text-builder.d.ts +25 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/text-font.d.ts +12 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/types.d.ts +57 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/utils/insert-bbox.d.ts +1 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/utils/timing.d.ts +2 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/utils/viewport-rect.d.ts +1 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/shared/viewer-theme.d.ts +2 -0
- package/node_modules/@nebula-spatial/cad-loader/dist/workers/geo-prepare.worker.js +2264 -0
- package/node_modules/@nebula-spatial/cad-loader/package.json +62 -0
- package/node_modules/@nebula-spatial/viewer/CHANGELOG.md +426 -0
- package/node_modules/@nebula-spatial/viewer/FBX-MATERIAL-CONVERSION.md +97 -0
- package/node_modules/@nebula-spatial/viewer/README.md +1056 -0
- package/node_modules/@nebula-spatial/viewer/USD-VISUAL-MATERIAL-SUPPORT.md +89 -0
- package/node_modules/@nebula-spatial/viewer/basis/basis_transcoder.js +19 -0
- package/node_modules/@nebula-spatial/viewer/basis/basis_transcoder.wasm +0 -0
- package/node_modules/@nebula-spatial/viewer/dist/asset-ir-DEOK9SqE.js +382 -0
- package/node_modules/@nebula-spatial/viewer/dist/assets/ground-grid.d.ts +6 -0
- package/node_modules/@nebula-spatial/viewer/dist/assets/source-types.d.ts +19 -0
- package/node_modules/@nebula-spatial/viewer/dist/assets/types.d.ts +393 -0
- package/node_modules/@nebula-spatial/viewer/dist/assets/usd-worker-Bom5cjz3.js +1392 -0
- package/node_modules/@nebula-spatial/viewer/dist/cad/text.d.ts +2 -0
- package/node_modules/@nebula-spatial/viewer/dist/cad/types.d.ts +368 -0
- package/node_modules/@nebula-spatial/viewer/dist/index-ByBlfVc0.js +12132 -0
- package/node_modules/@nebula-spatial/viewer/dist/index.d.ts +32 -0
- package/node_modules/@nebula-spatial/viewer/dist/index.js +26 -0
- package/node_modules/@nebula-spatial/viewer/dist/inspection/types.d.ts +112 -0
- package/node_modules/@nebula-spatial/viewer/dist/mjcf-visual-DVRa0w90.js +72 -0
- package/node_modules/@nebula-spatial/viewer/dist/mujoco-runtime-Dhx6Ua2u.js +463 -0
- package/node_modules/@nebula-spatial/viewer/dist/plugins.d.ts +179 -0
- package/node_modules/@nebula-spatial/viewer/dist/scene/instances.d.ts +36 -0
- package/node_modules/@nebula-spatial/viewer/dist/scene/types.d.ts +258 -0
- package/node_modules/@nebula-spatial/viewer/dist/session-B-j6KdA-.js +389 -0
- package/node_modules/@nebula-spatial/viewer/dist/session-B4AICTeJ.js +963 -0
- package/node_modules/@nebula-spatial/viewer/dist/session-BAG5cDYe.js +9153 -0
- package/node_modules/@nebula-spatial/viewer/dist/simulation/mujoco-runtime.d.ts +118 -0
- package/node_modules/@nebula-spatial/viewer/dist/simulation/mujoco-wasm-module.d.ts +11 -0
- package/node_modules/@nebula-spatial/viewer/dist/simulation/openusd-wasm-module.d.ts +10 -0
- package/node_modules/@nebula-spatial/viewer/dist/simulation/physics-runtime-state.d.ts +75 -0
- package/node_modules/@nebula-spatial/viewer/dist/simulation/types.d.ts +129 -0
- package/node_modules/@nebula-spatial/viewer/dist/simulation/usd-inspection.d.ts +66 -0
- package/node_modules/@nebula-spatial/viewer/dist/simulation/usd-query.d.ts +50 -0
- package/node_modules/@nebula-spatial/viewer/dist/simulation/usd-resource-policy.d.ts +28 -0
- package/node_modules/@nebula-spatial/viewer/dist/types.d.ts +278 -0
- package/node_modules/@nebula-spatial/viewer/dist/ui/types.d.ts +48 -0
- package/node_modules/@nebula-spatial/viewer/dist/urdf-session-kemAnBn8.js +3231 -0
- package/node_modules/@nebula-spatial/viewer/dist/usd-session-QtwGKI7v.js +6771 -0
- package/node_modules/@nebula-spatial/viewer/dist/version.d.ts +5 -0
- package/node_modules/@nebula-spatial/viewer/dist/viewer.d.ts +2 -0
- package/node_modules/@nebula-spatial/viewer/dist/xacro-CYTPS7mh.js +1537 -0
- package/node_modules/@nebula-spatial/viewer/openusd/openusd-runtime-manifest.json +15 -0
- package/node_modules/@nebula-spatial/viewer/openusd/openusd_probe.js +14 -0
- package/node_modules/@nebula-spatial/viewer/openusd/openusd_probe.wasm +0 -0
- package/node_modules/@nebula-spatial/viewer/package.json +66 -0
- package/package.json +87 -6
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AssetResourceResolver } from './types';
|
|
2
|
+
/** A single asset source accepted by every non-CAD loader. */
|
|
3
|
+
export type AssetSingleSource = ArrayBuffer | Blob | string | URL | Pick<File, 'arrayBuffer'> | {
|
|
4
|
+
readonly kind: 'buffer';
|
|
5
|
+
readonly buffer: ArrayBuffer;
|
|
6
|
+
} | {
|
|
7
|
+
readonly kind: 'url';
|
|
8
|
+
readonly url: string;
|
|
9
|
+
readonly signal?: AbortSignal;
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: 'remote-entry';
|
|
12
|
+
readonly entryPath: string;
|
|
13
|
+
readonly entryUrl: string;
|
|
14
|
+
readonly entry: Blob;
|
|
15
|
+
readonly resourceResolver: AssetResourceResolver;
|
|
16
|
+
/** Canonical remote locators declared by the Studio revision. */
|
|
17
|
+
readonly resourcePaths?: readonly string[];
|
|
18
|
+
readonly signal?: AbortSignal;
|
|
19
|
+
};
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import type { AssetInspection } from '../inspection/types';
|
|
2
|
+
import type { Object3D, WebGLRenderer, Scene, Camera, Box3, ColorRepresentation } from 'three';
|
|
3
|
+
import type { CadLoadSource, CadOpenOptions } from '../cad/types';
|
|
4
|
+
import type { AssetSingleSource } from './source-types';
|
|
5
|
+
import type { ViewerViewMode } from '../types';
|
|
6
|
+
import type { GroundGridScale } from './ground-grid';
|
|
7
|
+
export type AssetPreviewKind = 'cad' | 'model' | 'simulation';
|
|
8
|
+
export type BuiltinAssetFormat = 'cad' | 'glb' | 'gltf' | 'fbx' | 'urdf' | 'xacro' | 'mjcf' | 'usd' | 'usda' | 'usdc' | 'usdz';
|
|
9
|
+
export type AssetFormat = BuiltinAssetFormat | (string & {});
|
|
10
|
+
export interface AssetFileEntry {
|
|
11
|
+
readonly path: string;
|
|
12
|
+
readonly file: File | Blob;
|
|
13
|
+
}
|
|
14
|
+
export type { AssetSingleSource } from './source-types';
|
|
15
|
+
/** A single source or a browser-held multi-file package. */
|
|
16
|
+
export type AssetSource = AssetSingleSource | Extract<CadLoadSource, {
|
|
17
|
+
readonly kind: 'packFile';
|
|
18
|
+
}> | {
|
|
19
|
+
readonly kind: 'files';
|
|
20
|
+
readonly files: readonly AssetFileEntry[];
|
|
21
|
+
readonly entry?: string;
|
|
22
|
+
/** Aborts this package operation; combined with OpenAssetOptions.signal. */
|
|
23
|
+
readonly signal?: AbortSignal;
|
|
24
|
+
};
|
|
25
|
+
export interface AssetResourceResolver {
|
|
26
|
+
resolve(path: string, options?: {
|
|
27
|
+
readonly signal?: AbortSignal;
|
|
28
|
+
readonly url?: string;
|
|
29
|
+
readonly canonicalPath?: string;
|
|
30
|
+
}): string | URL | Blob | Promise<string | URL | Blob>;
|
|
31
|
+
}
|
|
32
|
+
/** Controls how USD references outside the entry package are handled. */
|
|
33
|
+
export type UsdExternalReferenceMode = 'package' | 'complete';
|
|
34
|
+
/** Selects an authored OpenUSD variant before stage data is read. */
|
|
35
|
+
export interface UsdVariantSelection {
|
|
36
|
+
readonly primPath: string;
|
|
37
|
+
readonly setName: string;
|
|
38
|
+
readonly selection: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ViewerAssetOptions {
|
|
41
|
+
readonly dracoDecoderPath?: string;
|
|
42
|
+
/** Directory containing `basis_transcoder.js` and `basis_transcoder.wasm`. */
|
|
43
|
+
readonly ktx2TranscoderPath?: string;
|
|
44
|
+
readonly openUsdBaseUrl?: string;
|
|
45
|
+
/** Runtime build id appended as `?v=` to the OpenUSD JS and WASM URLs. */
|
|
46
|
+
readonly openUsdRuntimeId?: string;
|
|
47
|
+
/** Caller-owned compiled Probe module shared across Workers and Viewer instances. */
|
|
48
|
+
readonly openUsdWasmModule?: WebAssembly.Module | Promise<WebAssembly.Module>;
|
|
49
|
+
readonly mujocoBaseUrl?: string;
|
|
50
|
+
/** Caller-owned compiled MuJoCo module shared across simulation instances. */
|
|
51
|
+
readonly mujocoWasmModule?: WebAssembly.Module | Promise<WebAssembly.Module>;
|
|
52
|
+
}
|
|
53
|
+
export interface OpenAssetOptions {
|
|
54
|
+
/** Browser Xacro subset; unsupported Python/ROS features fail explicitly. */
|
|
55
|
+
readonly xacro?: {
|
|
56
|
+
readonly arguments?: Readonly<Record<string, string | number | boolean>>;
|
|
57
|
+
/** ROS package name -> directory relative to the asset package/baseUrl. */
|
|
58
|
+
readonly packages?: Readonly<Record<string, string>>;
|
|
59
|
+
};
|
|
60
|
+
readonly simulationTheme?: 'dark' | 'light';
|
|
61
|
+
/** Defaults to automatic detection: extension first, then registered loader matchers. */
|
|
62
|
+
readonly format?: AssetFormat | 'auto';
|
|
63
|
+
readonly filename?: string;
|
|
64
|
+
readonly signal?: AbortSignal;
|
|
65
|
+
/** Base URL for package-external relative resources. */
|
|
66
|
+
readonly baseUrl?: string;
|
|
67
|
+
/** Resolves package-external resources; local package entries take precedence. */
|
|
68
|
+
readonly resourceResolver?: AssetResourceResolver;
|
|
69
|
+
/**
|
|
70
|
+
* USD-only external reference policy. Defaults to `package`: compose the
|
|
71
|
+
* entry package and skip package-external references. `complete` attempts all
|
|
72
|
+
* browser-resolvable references; a supplied resourceResolver remains the
|
|
73
|
+
* authority and is never bypassed.
|
|
74
|
+
*/
|
|
75
|
+
readonly usdExternalReferenceMode?: UsdExternalReferenceMode;
|
|
76
|
+
/**
|
|
77
|
+
* USD-only variant selections applied after composition and before scene or
|
|
78
|
+
* physics extraction. Later entries override earlier entries for the same
|
|
79
|
+
* prim and variant set.
|
|
80
|
+
*/
|
|
81
|
+
readonly usdVariantSelections?: readonly UsdVariantSelection[];
|
|
82
|
+
/**
|
|
83
|
+
* USD physics variant strategy. `auto-mujoco` selects a Newton/Mjc/MuJoCo
|
|
84
|
+
* branch while preserving the authored grip mode, then falls back to the
|
|
85
|
+
* authored branch when no compatible variant exists. Defaults to
|
|
86
|
+
* `auto-mujoco`.
|
|
87
|
+
*/
|
|
88
|
+
readonly usdVariantSelectionMode?: 'auto-mujoco' | 'authored';
|
|
89
|
+
/** @deprecated Auto detection never falls back to CAD; pass an explicit format instead. */
|
|
90
|
+
readonly unknownFormatPolicy?: 'cad' | 'error';
|
|
91
|
+
readonly dracoDecoderPath?: string;
|
|
92
|
+
/** Overrides `assets.ktx2TranscoderPath` for this open operation. */
|
|
93
|
+
readonly ktx2TranscoderPath?: string;
|
|
94
|
+
readonly mujocoBaseUrl?: string;
|
|
95
|
+
readonly openUsdBaseUrl?: string;
|
|
96
|
+
/** Overrides the packaged runtime id when hosting a matching CDN build. */
|
|
97
|
+
readonly openUsdRuntimeId?: string;
|
|
98
|
+
/** Caller-owned compiled Probe module shared across Workers and Viewer instances. */
|
|
99
|
+
readonly openUsdWasmModule?: WebAssembly.Module | Promise<WebAssembly.Module>;
|
|
100
|
+
/** Caller-owned compiled MuJoCo module shared across simulation instances. */
|
|
101
|
+
readonly mujocoWasmModule?: WebAssembly.Module | Promise<WebAssembly.Module>;
|
|
102
|
+
/**
|
|
103
|
+
* Which authored axis is "up". FBX first uses a supported positive Y/Z
|
|
104
|
+
* declaration from GlobalSettings, then falls back to 'y' when it is missing
|
|
105
|
+
* or cannot be read. GLB/glTF default to 'y' per the glTF coordinate
|
|
106
|
+
* convention. Gaussian/3DGS assets default to 'y-down' because their source
|
|
107
|
+
* +Y points down. An explicit value always wins. 'y' rotates authored +Y into
|
|
108
|
+
* world +Z; 'y-down' rotates authored +Y into world -Z.
|
|
109
|
+
*
|
|
110
|
+
* Also seeds the initial up axis of simulation assets. URDF/XACRO/MJCF are
|
|
111
|
+
* Z-up by specification; USD defaults to 'z' because the loader has already
|
|
112
|
+
* applied the stage's declared axis. For simulation the rotation is applied
|
|
113
|
+
* to the compiled model itself, so collisions, contacts and gravity stay
|
|
114
|
+
* consistent with what is rendered.
|
|
115
|
+
*/
|
|
116
|
+
readonly upAxis?: AssetUpAxis;
|
|
117
|
+
/** Gaussian bounds are the default; exact mode enables per-splat raycasts. */
|
|
118
|
+
readonly visualSelectionMode?: 'bounds' | 'exact';
|
|
119
|
+
readonly visualAppearance?: {
|
|
120
|
+
/** Linear RGB in 0..1. */
|
|
121
|
+
readonly color?: readonly [number, number, number];
|
|
122
|
+
readonly opacity?: number;
|
|
123
|
+
};
|
|
124
|
+
/** CAD-specific compatibility options. `filename` and `signal` above take precedence. */
|
|
125
|
+
readonly cad?: Omit<CadOpenOptions, 'filename' | 'signal'>;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* World axis a model was authored to treat as up. `'y-down'` means source +Y
|
|
129
|
+
* points down, so it maps to world -Z. See `OpenAssetOptions.upAxis`.
|
|
130
|
+
*/
|
|
131
|
+
export type AssetUpAxis = 'y' | 'y-down' | 'z';
|
|
132
|
+
export interface AssetPreviewCapabilities {
|
|
133
|
+
readonly canPlay: boolean;
|
|
134
|
+
readonly canPause: boolean;
|
|
135
|
+
readonly canReset: boolean;
|
|
136
|
+
readonly hasPhysics: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* The asset's authored up axis can be re-oriented at runtime. Declared by
|
|
139
|
+
* model and simulation sessions. For simulation assets the compiled physics
|
|
140
|
+
* is rotated with it (gravity and the viewer ground stay put), so a toggled
|
|
141
|
+
* asset keeps rendering and simulating the same pose. Optional (absent means
|
|
142
|
+
* false) so pre-existing third-party asset sessions that build this literal
|
|
143
|
+
* keep compiling.
|
|
144
|
+
*/
|
|
145
|
+
readonly canReorientUpAxis?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* The staged ground (grid + reflection) can be hidden. Optional, same
|
|
148
|
+
* rationale as `canReorientUpAxis`; model and simulation sessions opt in.
|
|
149
|
+
*/
|
|
150
|
+
readonly canToggleGround?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Authored or runtime collision geometry can be shown independently of
|
|
153
|
+
* dynamic physics. Static USD stages may declare colliders without rigid
|
|
154
|
+
* bodies, so this must not be inferred from `hasPhysics`.
|
|
155
|
+
*/
|
|
156
|
+
readonly canToggleCollision?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* The session drives authored clips (skeletal/xform animation) without a
|
|
159
|
+
* physics runtime. Playing them is not "running a simulation", so hosts can
|
|
160
|
+
* relabel the playback controls. Optional, same rationale as
|
|
161
|
+
* `canReorientUpAxis`; only sessions that actually reference clips set it.
|
|
162
|
+
*/
|
|
163
|
+
readonly hasAnimation?: boolean;
|
|
164
|
+
}
|
|
165
|
+
export type AssetPreviewPhase = 'detecting' | 'loading' | 'ready' | 'failed' | 'closing' | 'closed';
|
|
166
|
+
export interface AssetErrorSnapshot {
|
|
167
|
+
readonly code: string;
|
|
168
|
+
readonly message: string;
|
|
169
|
+
readonly stage: string;
|
|
170
|
+
readonly fatal: boolean;
|
|
171
|
+
}
|
|
172
|
+
export type AssetNoticeKind = 'not-authored' | 'unsupported-by-viewer' | 'lossy-mapping' | 'invalid-asset' | 'resource-limit' | 'runtime-failure' | 'visual-adaptation' | 'load-warning';
|
|
173
|
+
export interface AssetNoticeSnapshot {
|
|
174
|
+
readonly kind: AssetNoticeKind;
|
|
175
|
+
readonly title: string;
|
|
176
|
+
readonly summary: string;
|
|
177
|
+
readonly tone: 'info' | 'warning' | 'error';
|
|
178
|
+
}
|
|
179
|
+
/** Non-fatal condition that changed how an otherwise usable asset is presented. */
|
|
180
|
+
export interface AssetWarningSnapshot {
|
|
181
|
+
readonly code: string;
|
|
182
|
+
readonly message: string;
|
|
183
|
+
readonly stage: string;
|
|
184
|
+
readonly notice?: AssetNoticeSnapshot;
|
|
185
|
+
}
|
|
186
|
+
/** Physics availability is independent of the visual asset's ready phase. */
|
|
187
|
+
export type AssetPhysicsState = {
|
|
188
|
+
readonly status: 'not-authored' | 'available' | 'initializing' | 'ready';
|
|
189
|
+
} | {
|
|
190
|
+
readonly status: 'unavailable';
|
|
191
|
+
readonly issue: AssetWarningSnapshot;
|
|
192
|
+
};
|
|
193
|
+
export interface AssetPreviewSnapshot {
|
|
194
|
+
readonly revision: number;
|
|
195
|
+
readonly phase: AssetPreviewPhase;
|
|
196
|
+
readonly stage?: string;
|
|
197
|
+
readonly message?: string;
|
|
198
|
+
readonly format: AssetFormat | null;
|
|
199
|
+
readonly kind: AssetPreviewKind | null;
|
|
200
|
+
readonly capabilities: AssetPreviewCapabilities | null;
|
|
201
|
+
readonly error: AssetErrorSnapshot | null;
|
|
202
|
+
/** Present when loading succeeded with an explicit, user-visible degradation. */
|
|
203
|
+
readonly warning?: AssetWarningSnapshot | null;
|
|
204
|
+
/** Missing/null means the session does not report physics availability. */
|
|
205
|
+
readonly physics?: AssetPhysicsState | null;
|
|
206
|
+
/**
|
|
207
|
+
* Display name for the asset (`OpenAssetOptions.filename`, else the file name
|
|
208
|
+
* derived from the normalized source). Hosts should render this rather than
|
|
209
|
+
* re-deriving a name from the raw URL.
|
|
210
|
+
*/
|
|
211
|
+
readonly filename: string | null;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Control state of the active asset. Published on `asset-control-change` so UI
|
|
215
|
+
* (built-in or plugin) never has to keep its own copy of a pressed state —
|
|
216
|
+
* whichever entry point changed it, exactly one authoritative value is broadcast.
|
|
217
|
+
*/
|
|
218
|
+
export interface AssetControlState {
|
|
219
|
+
readonly playing: boolean;
|
|
220
|
+
readonly groundVisible: boolean;
|
|
221
|
+
readonly groundGridScale?: GroundGridScale;
|
|
222
|
+
readonly collisionVisible: boolean;
|
|
223
|
+
readonly upAxis: AssetUpAxis | null;
|
|
224
|
+
}
|
|
225
|
+
export interface AssetPreview {
|
|
226
|
+
getInspection(): AssetInspection | null;
|
|
227
|
+
getPhysicsProperties(): Readonly<Record<string, unknown>> | null;
|
|
228
|
+
/** USD visual report and diagnostics, including static assets. */
|
|
229
|
+
getVisualDiagnostics?(): Readonly<Record<string, unknown>> | null;
|
|
230
|
+
setCollisionVisible(visible: boolean): void;
|
|
231
|
+
/**
|
|
232
|
+
* Re-orients the asset's authored up axis without moving the camera. Model
|
|
233
|
+
* previews re-seat the ground and refit the camera; simulation assets rotate
|
|
234
|
+
* the physics itself, re-seat the ground under the new pose and leave the
|
|
235
|
+
* camera alone.
|
|
236
|
+
*/
|
|
237
|
+
setUpAxis(axis: AssetUpAxis): void;
|
|
238
|
+
getUpAxis(): AssetUpAxis | null;
|
|
239
|
+
/** Shows or hides the staged ground (grid + reflection). */
|
|
240
|
+
setGroundVisible(visible: boolean): void;
|
|
241
|
+
getGroundVisible(): boolean;
|
|
242
|
+
readonly id: string;
|
|
243
|
+
readonly ready: Promise<void>;
|
|
244
|
+
getSnapshot(): AssetPreviewSnapshot;
|
|
245
|
+
subscribe(listener: (snapshot: AssetPreviewSnapshot) => void): () => void;
|
|
246
|
+
close(): Promise<void>;
|
|
247
|
+
play(): void;
|
|
248
|
+
pause(): void;
|
|
249
|
+
reset(): void;
|
|
250
|
+
beginGrab?(event: PointerEvent, camera: import('three').Camera, canvas: HTMLElement): boolean;
|
|
251
|
+
moveGrab?(event: PointerEvent, camera: import('three').Camera, canvas: HTMLElement): void;
|
|
252
|
+
endGrab?(): void;
|
|
253
|
+
}
|
|
254
|
+
export interface AssetPresentationProfile {
|
|
255
|
+
readonly preferredViewMode?: ViewerViewMode;
|
|
256
|
+
/**
|
|
257
|
+
* Canvas clear color while this asset is active. Applied on profile change and
|
|
258
|
+
* reverted to the `createViewer({ clearColor })` value when no asset owns one,
|
|
259
|
+
* so hosts no longer need to encode "which asset is this" in their bootstrap.
|
|
260
|
+
*/
|
|
261
|
+
readonly clearColor?: ColorRepresentation;
|
|
262
|
+
/** Staged dark/light variant for assets that own a themed stage. */
|
|
263
|
+
readonly stageTheme?: 'dark' | 'light';
|
|
264
|
+
readonly interactionMode?: 'cad-managed' | 'object' | 'simulation';
|
|
265
|
+
readonly uiProfile?: 'cad' | 'model' | 'simulation' | 'none';
|
|
266
|
+
readonly fitPolicy?: 'restore-then-fit' | 'fit-on-ready' | 'preserve';
|
|
267
|
+
readonly environmentProfile?: string;
|
|
268
|
+
}
|
|
269
|
+
export interface NormalizedAssetSource {
|
|
270
|
+
readonly original: AssetSource;
|
|
271
|
+
readonly entryPath: string | null;
|
|
272
|
+
readonly filename: string | null;
|
|
273
|
+
readonly url: string | null;
|
|
274
|
+
readonly signal: AbortSignal;
|
|
275
|
+
readonly baseUrl: string | null;
|
|
276
|
+
readonly hasResourceResolver: boolean;
|
|
277
|
+
/** Present when the source carries a prefetched remote entry. */
|
|
278
|
+
readonly entryBlob?: Blob | null;
|
|
279
|
+
/** Known remote resource URLs used to resolve authored UDIM templates. */
|
|
280
|
+
readonly resourcePaths?: readonly string[];
|
|
281
|
+
resolve(path: string, context?: {
|
|
282
|
+
readonly signal?: AbortSignal;
|
|
283
|
+
readonly url?: string;
|
|
284
|
+
readonly canonicalPath?: string;
|
|
285
|
+
}): Promise<string>;
|
|
286
|
+
release(): void;
|
|
287
|
+
}
|
|
288
|
+
export interface AssetDetectionResult {
|
|
289
|
+
readonly format: AssetFormat;
|
|
290
|
+
}
|
|
291
|
+
export interface AssetLoaderContext {
|
|
292
|
+
readonly signal: AbortSignal;
|
|
293
|
+
readonly options: OpenAssetOptions;
|
|
294
|
+
readonly source: NormalizedAssetSource;
|
|
295
|
+
readonly format: AssetFormat;
|
|
296
|
+
/** Present when the host runtime owns a WebGL renderer. */
|
|
297
|
+
getRenderer?(): WebGLRenderer;
|
|
298
|
+
requestRender(): void;
|
|
299
|
+
fit(root: Object3D | Box3, options?: {
|
|
300
|
+
readonly viewMode?: ViewerViewMode;
|
|
301
|
+
readonly padding?: number;
|
|
302
|
+
}): boolean;
|
|
303
|
+
reportError(error: unknown, options: {
|
|
304
|
+
readonly stage: string;
|
|
305
|
+
readonly fatal: boolean;
|
|
306
|
+
readonly code?: string;
|
|
307
|
+
}): void;
|
|
308
|
+
reportProgress?(stage: string, message?: string): void;
|
|
309
|
+
/** Publish changed session capabilities/physics without failing its visual asset. */
|
|
310
|
+
reportSessionState?(): void;
|
|
311
|
+
}
|
|
312
|
+
export interface AssetSession {
|
|
313
|
+
readonly autoPlay?: boolean;
|
|
314
|
+
readonly inspection?: AssetInspection | null;
|
|
315
|
+
/** Lazily materialized authored/compiled collision geometry, kept hidden by the asset session. */
|
|
316
|
+
getCollisionRoot?(): import('three').Object3D | null;
|
|
317
|
+
isPlaying?(): boolean;
|
|
318
|
+
setTheme?(theme: 'dark' | 'light'): void;
|
|
319
|
+
beforeRender?(renderer: WebGLRenderer, scene: Scene, camera: Camera): (() => void) | void;
|
|
320
|
+
getPhysicsProperties?(): Readonly<Record<string, unknown>> | null;
|
|
321
|
+
getVisualDiagnostics?(): Readonly<Record<string, unknown>> | null;
|
|
322
|
+
setCollisionVisible?(visible: boolean): void;
|
|
323
|
+
setUpAxis?(axis: AssetUpAxis): void;
|
|
324
|
+
getUpAxis?(): AssetUpAxis | null;
|
|
325
|
+
setGroundVisible?(visible: boolean): void;
|
|
326
|
+
getGroundVisible?(): boolean;
|
|
327
|
+
getGroundGridScale?(): GroundGridScale;
|
|
328
|
+
getFitBounds?(): Box3 | null;
|
|
329
|
+
readonly fitTarget?: Object3D | Box3 | null;
|
|
330
|
+
readonly id: string;
|
|
331
|
+
readonly opened: Promise<void>;
|
|
332
|
+
readonly root?: Object3D | null;
|
|
333
|
+
readonly capabilities?: AssetPreviewCapabilities;
|
|
334
|
+
readonly presentation?: AssetPresentationProfile;
|
|
335
|
+
/** Non-fatal degradation decided by the loader after the session opened. */
|
|
336
|
+
readonly warning?: AssetWarningSnapshot | null;
|
|
337
|
+
/** Missing/null means the session does not report physics availability. */
|
|
338
|
+
readonly physics?: AssetPhysicsState | null;
|
|
339
|
+
beginDispose(): void;
|
|
340
|
+
dispose(): Promise<void>;
|
|
341
|
+
play?(): void;
|
|
342
|
+
pause?(): void;
|
|
343
|
+
reset?(): void;
|
|
344
|
+
update?(deltaSeconds: number): boolean;
|
|
345
|
+
beginGrab?(event: PointerEvent, camera: import('three').Camera, canvas: HTMLElement): boolean;
|
|
346
|
+
moveGrab?(event: PointerEvent, camera: import('three').Camera, canvas: HTMLElement): void;
|
|
347
|
+
endGrab?(): void;
|
|
348
|
+
/**
|
|
349
|
+
* Internal scene bridge: exposes the already-compiled MJCF and the exact
|
|
350
|
+
* visual body objects so multiple instances can be merged into one physical
|
|
351
|
+
* world without re-parsing USD/MJCF.
|
|
352
|
+
*/
|
|
353
|
+
getScenePhysics?(): ScenePhysicsSource | null;
|
|
354
|
+
}
|
|
355
|
+
export interface ScenePhysicsSource {
|
|
356
|
+
readonly format: 'mjcf';
|
|
357
|
+
readonly xml: string;
|
|
358
|
+
readonly files: ReadonlyMap<string, Uint8Array>;
|
|
359
|
+
readonly initialControls?: readonly number[];
|
|
360
|
+
readonly initialJoints?: Readonly<Record<string, number>>;
|
|
361
|
+
readonly massOverrides?: readonly {
|
|
362
|
+
readonly body: string;
|
|
363
|
+
readonly mass: number;
|
|
364
|
+
}[];
|
|
365
|
+
readonly initialVelocities?: readonly {
|
|
366
|
+
readonly body: string;
|
|
367
|
+
readonly velocity: readonly number[];
|
|
368
|
+
}[];
|
|
369
|
+
readonly visualBindings: ReadonlyMap<string, import('three').Object3D>;
|
|
370
|
+
}
|
|
371
|
+
export interface AssetLoaderContribution {
|
|
372
|
+
readonly kind: 'asset-loader';
|
|
373
|
+
readonly id: string;
|
|
374
|
+
readonly assetKind: AssetPreviewKind;
|
|
375
|
+
readonly formats: readonly AssetFormat[];
|
|
376
|
+
readonly presentation?: AssetPresentationProfile;
|
|
377
|
+
match?(source: NormalizedAssetSource): AssetDetectionResult | null | Promise<AssetDetectionResult | null>;
|
|
378
|
+
createSession(source: NormalizedAssetSource, context: AssetLoaderContext): AssetSession | Promise<AssetSession>;
|
|
379
|
+
}
|
|
380
|
+
export interface AssetChangeEvent {
|
|
381
|
+
readonly sessionId: string;
|
|
382
|
+
readonly snapshot: AssetPreviewSnapshot;
|
|
383
|
+
}
|
|
384
|
+
export interface AssetControlChangeEvent {
|
|
385
|
+
readonly sessionId: string;
|
|
386
|
+
readonly state: AssetControlState;
|
|
387
|
+
}
|
|
388
|
+
export interface AssetErrorEvent extends AssetErrorSnapshot {
|
|
389
|
+
readonly sessionId: string;
|
|
390
|
+
readonly format: AssetFormat | null;
|
|
391
|
+
readonly error: Error;
|
|
392
|
+
}
|
|
393
|
+
export declare const EMPTY_ASSET_CAPABILITIES: AssetPreviewCapabilities;
|