@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,272 @@
|
|
|
1
|
+
import type { AssetResource, AssetRevision, CoordinateSystem, LocalTransform, NodePivot, SceneDocumentDomains, SceneEnvironment, SceneMeta, SceneSemantic, StudioAssetResourceLocator, Vec3Bounds, VisualAssetRevision } from '../doc/schema';
|
|
2
|
+
export declare const SCENE_PACKAGE_FORMAT: "sim-studio.scene-package@5";
|
|
3
|
+
export declare const PACKAGE_SCENE_FORMAT: "sim-studio.package-scene@5";
|
|
4
|
+
export declare const EDITORIAL_STATE_FORMAT: "sim-studio.editorial-state@1";
|
|
5
|
+
export declare const ASSET_CATALOG_FORMAT: "sim-studio.asset-catalog@3";
|
|
6
|
+
export declare const RESOURCE_MANIFEST_FORMAT: "sim-studio.resource-manifest@2";
|
|
7
|
+
export declare const SCENE_PACKAGE_SCHEMA_VERSION: 5;
|
|
8
|
+
export interface DocumentRef {
|
|
9
|
+
readonly path: string;
|
|
10
|
+
readonly contentHash: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ScenePackageManifestV5 {
|
|
13
|
+
readonly format: typeof SCENE_PACKAGE_FORMAT;
|
|
14
|
+
readonly schemaVersion: typeof SCENE_PACKAGE_SCHEMA_VERSION;
|
|
15
|
+
readonly minReaderVersion: 5;
|
|
16
|
+
readonly documents: {
|
|
17
|
+
readonly scene: DocumentRef;
|
|
18
|
+
readonly editorial: DocumentRef;
|
|
19
|
+
readonly assetCatalog: DocumentRef;
|
|
20
|
+
readonly resourceManifest: DocumentRef;
|
|
21
|
+
};
|
|
22
|
+
readonly resourceRoot: 'resources';
|
|
23
|
+
}
|
|
24
|
+
export interface PackageNodeBase {
|
|
25
|
+
readonly nodeId: string;
|
|
26
|
+
readonly label: string;
|
|
27
|
+
readonly localTransform: LocalTransform;
|
|
28
|
+
readonly origin?: NodePivot;
|
|
29
|
+
}
|
|
30
|
+
export interface PackageSceneGroupNode extends PackageNodeBase {
|
|
31
|
+
readonly nodeType: 'group';
|
|
32
|
+
readonly children: readonly PackageSceneNode[];
|
|
33
|
+
}
|
|
34
|
+
export interface PackageSceneAssetNode extends PackageNodeBase {
|
|
35
|
+
readonly nodeType: 'asset';
|
|
36
|
+
readonly assetSourceRevisionId: string;
|
|
37
|
+
readonly role: string;
|
|
38
|
+
readonly visible: boolean;
|
|
39
|
+
readonly variantSelections: Readonly<Record<string, string>>;
|
|
40
|
+
readonly appearance?: Readonly<{
|
|
41
|
+
color?: readonly [number, number, number];
|
|
42
|
+
opacity?: number;
|
|
43
|
+
metallic?: number;
|
|
44
|
+
roughness?: number;
|
|
45
|
+
}>;
|
|
46
|
+
readonly physics: unknown;
|
|
47
|
+
readonly initialPose?: Readonly<{
|
|
48
|
+
joints: Readonly<Record<string, number>>;
|
|
49
|
+
}>;
|
|
50
|
+
readonly semantic?: unknown;
|
|
51
|
+
}
|
|
52
|
+
export interface PackageSceneVisualNode extends PackageNodeBase {
|
|
53
|
+
readonly nodeType: 'visual';
|
|
54
|
+
readonly visualSourceRevisionId: string;
|
|
55
|
+
readonly visible: boolean;
|
|
56
|
+
readonly renderLayer: 'default' | 'foreground' | 'background';
|
|
57
|
+
readonly selectionMode: 'bounds' | 'exact';
|
|
58
|
+
readonly appearance?: Readonly<{
|
|
59
|
+
color?: readonly [number, number, number];
|
|
60
|
+
opacity?: number;
|
|
61
|
+
}>;
|
|
62
|
+
readonly semantic?: unknown;
|
|
63
|
+
}
|
|
64
|
+
export interface PackageScenePlaceholderNode extends PackageNodeBase {
|
|
65
|
+
readonly nodeType: 'placeholder';
|
|
66
|
+
readonly placeholderVersion: 1;
|
|
67
|
+
readonly size: readonly [number, number, number];
|
|
68
|
+
readonly role: string;
|
|
69
|
+
readonly visible: boolean;
|
|
70
|
+
readonly assetSourceRevisionId?: string;
|
|
71
|
+
readonly externalRef?: import('../doc/schema').StudioExternalAssetRef;
|
|
72
|
+
readonly semantic?: unknown;
|
|
73
|
+
}
|
|
74
|
+
export interface PackageSceneDomainNode extends PackageNodeBase {
|
|
75
|
+
readonly nodeType: 'domain';
|
|
76
|
+
readonly domainId: string;
|
|
77
|
+
readonly dataVersion: number;
|
|
78
|
+
readonly payload: unknown;
|
|
79
|
+
readonly visible: boolean;
|
|
80
|
+
readonly selectable: boolean;
|
|
81
|
+
readonly bounds?: Vec3Bounds;
|
|
82
|
+
readonly semantic?: unknown;
|
|
83
|
+
}
|
|
84
|
+
export type PackageSceneNode = PackageSceneGroupNode | PackageSceneAssetNode | PackageSceneVisualNode | PackageScenePlaceholderNode | PackageSceneDomainNode;
|
|
85
|
+
export interface PackageSceneDocumentV5 {
|
|
86
|
+
readonly format: typeof PACKAGE_SCENE_FORMAT;
|
|
87
|
+
readonly schemaVersion: 5;
|
|
88
|
+
readonly sceneId: string;
|
|
89
|
+
readonly meta: SceneMeta;
|
|
90
|
+
readonly coordinateSystem: CoordinateSystem;
|
|
91
|
+
readonly environment: SceneEnvironment;
|
|
92
|
+
readonly root: PackageSceneGroupNode;
|
|
93
|
+
readonly semantic?: SceneSemantic;
|
|
94
|
+
readonly domains?: SceneDocumentDomains;
|
|
95
|
+
readonly extensions?: Readonly<Record<string, unknown>>;
|
|
96
|
+
}
|
|
97
|
+
export interface EditorialCameraV1 {
|
|
98
|
+
readonly schemaVersion: 1;
|
|
99
|
+
readonly viewMode: '2d' | '3d';
|
|
100
|
+
readonly orbit?: Readonly<{
|
|
101
|
+
targetX: number;
|
|
102
|
+
targetY: number;
|
|
103
|
+
targetZ: number;
|
|
104
|
+
distance: number;
|
|
105
|
+
yaw: number;
|
|
106
|
+
pitch: number;
|
|
107
|
+
}>;
|
|
108
|
+
readonly orthographic?: Readonly<{
|
|
109
|
+
left: number;
|
|
110
|
+
right: number;
|
|
111
|
+
top: number;
|
|
112
|
+
bottom: number;
|
|
113
|
+
zoom: number;
|
|
114
|
+
positionX: number;
|
|
115
|
+
positionY: number;
|
|
116
|
+
targetX: number;
|
|
117
|
+
targetY: number;
|
|
118
|
+
}>;
|
|
119
|
+
}
|
|
120
|
+
export interface EditorialNodeStateV1 {
|
|
121
|
+
readonly nodeId: string;
|
|
122
|
+
readonly hidden: boolean;
|
|
123
|
+
readonly locked: boolean;
|
|
124
|
+
}
|
|
125
|
+
export interface EditorialStateV1 {
|
|
126
|
+
readonly format: typeof EDITORIAL_STATE_FORMAT;
|
|
127
|
+
readonly schemaVersion: 1;
|
|
128
|
+
readonly selection: {
|
|
129
|
+
readonly nodeIds: readonly string[];
|
|
130
|
+
readonly primaryNodeId: string | null;
|
|
131
|
+
};
|
|
132
|
+
readonly nodeStates: readonly EditorialNodeStateV1[];
|
|
133
|
+
readonly camera: EditorialCameraV1 | null;
|
|
134
|
+
}
|
|
135
|
+
export type SourceDependencyKind = 'reference' | 'payload' | 'sublayer' | 'texture' | 'material-module' | 'other';
|
|
136
|
+
export interface SourceFileFactV2 {
|
|
137
|
+
readonly locator: StudioAssetResourceLocator;
|
|
138
|
+
readonly sha256: string;
|
|
139
|
+
readonly mediaType: string;
|
|
140
|
+
readonly byteSize: number;
|
|
141
|
+
}
|
|
142
|
+
export interface SourceDependencyEdgeV2 {
|
|
143
|
+
readonly from: StudioAssetResourceLocator;
|
|
144
|
+
readonly to: StudioAssetResourceLocator;
|
|
145
|
+
readonly kind: SourceDependencyKind;
|
|
146
|
+
}
|
|
147
|
+
export interface AssetSourceRevisionV2 {
|
|
148
|
+
readonly sourceRevisionId: string;
|
|
149
|
+
readonly sourceFormat: string;
|
|
150
|
+
readonly entryLocator: StudioAssetResourceLocator;
|
|
151
|
+
readonly files: readonly SourceFileFactV2[];
|
|
152
|
+
readonly dependencies: readonly SourceDependencyEdgeV2[];
|
|
153
|
+
readonly declaredSubresource: string;
|
|
154
|
+
}
|
|
155
|
+
export interface AdapterIdentityV1 {
|
|
156
|
+
readonly id: string;
|
|
157
|
+
readonly version: string;
|
|
158
|
+
}
|
|
159
|
+
export interface NormalizationFactsV1 {
|
|
160
|
+
readonly upAxis: 'y' | 'y-down' | 'z';
|
|
161
|
+
readonly unitScale: number;
|
|
162
|
+
readonly originPolicy: 'source' | 'bounds-center' | 'bounds-base';
|
|
163
|
+
}
|
|
164
|
+
export type VariantPayloadIndexV1 = Readonly<Record<string, Readonly<Record<string, readonly string[]>>>>;
|
|
165
|
+
export interface AssetInterpretationV1 {
|
|
166
|
+
readonly interpretationRevisionId: string;
|
|
167
|
+
readonly adapter: AdapterIdentityV1;
|
|
168
|
+
readonly normalization: NormalizationFactsV1;
|
|
169
|
+
readonly runtimeRevision: AssetRevision | VisualAssetRevision;
|
|
170
|
+
readonly variantPayloads: VariantPayloadIndexV1;
|
|
171
|
+
}
|
|
172
|
+
export type DeliveryOutcomeV1 = 'supported' | 'degraded' | 'blocked';
|
|
173
|
+
export interface DeliveryDiagnosticV1 {
|
|
174
|
+
readonly code: string;
|
|
175
|
+
readonly severity: 'info' | 'warning' | 'error';
|
|
176
|
+
readonly message: string;
|
|
177
|
+
readonly nodeId?: string;
|
|
178
|
+
readonly assetId?: string;
|
|
179
|
+
readonly detail?: Readonly<Record<string, string | number | boolean | null>>;
|
|
180
|
+
}
|
|
181
|
+
export interface DeliveryArtifactV2 {
|
|
182
|
+
readonly artifactId: string;
|
|
183
|
+
readonly sourceRevisionId: string;
|
|
184
|
+
readonly profileId: string;
|
|
185
|
+
readonly profileVersion: string;
|
|
186
|
+
readonly adapter: AdapterIdentityV1;
|
|
187
|
+
readonly outcome: DeliveryOutcomeV1;
|
|
188
|
+
readonly entryOutputPath: string;
|
|
189
|
+
readonly resources: readonly AssetResource[];
|
|
190
|
+
readonly diagnostics: readonly DeliveryDiagnosticV1[];
|
|
191
|
+
}
|
|
192
|
+
export interface DeliveryLockV1 {
|
|
193
|
+
readonly assetId: string;
|
|
194
|
+
readonly sourceRevisionId: string;
|
|
195
|
+
readonly profileId: string;
|
|
196
|
+
readonly profileVersion: string;
|
|
197
|
+
readonly adapterId: string;
|
|
198
|
+
readonly adapterVersion: string;
|
|
199
|
+
readonly artifactId: string;
|
|
200
|
+
}
|
|
201
|
+
export interface AssetCatalogEntryV3 {
|
|
202
|
+
readonly assetId: string;
|
|
203
|
+
readonly label: string;
|
|
204
|
+
readonly kind: 'usd' | 'visual';
|
|
205
|
+
readonly source: AssetSourceRevisionV2;
|
|
206
|
+
readonly interpretation: AssetInterpretationV1;
|
|
207
|
+
readonly deliveryArtifacts: readonly DeliveryArtifactV2[];
|
|
208
|
+
}
|
|
209
|
+
export interface AssetCatalogV3 {
|
|
210
|
+
readonly format: typeof ASSET_CATALOG_FORMAT;
|
|
211
|
+
readonly schemaVersion: 3;
|
|
212
|
+
readonly entries: readonly AssetCatalogEntryV3[];
|
|
213
|
+
readonly deliveryLocks: readonly DeliveryLockV1[];
|
|
214
|
+
}
|
|
215
|
+
export type ResourceStorageV2 = {
|
|
216
|
+
readonly kind: 'embedded';
|
|
217
|
+
readonly packagePath: string;
|
|
218
|
+
} | {
|
|
219
|
+
readonly kind: 'remote';
|
|
220
|
+
};
|
|
221
|
+
export interface ResourceManifestEntryV2 {
|
|
222
|
+
readonly resourceId: string;
|
|
223
|
+
readonly sourceRevisionId: string;
|
|
224
|
+
readonly artifactId?: string;
|
|
225
|
+
readonly locator: StudioAssetResourceLocator;
|
|
226
|
+
readonly sha256: string;
|
|
227
|
+
readonly mediaType: string;
|
|
228
|
+
readonly byteSize: number;
|
|
229
|
+
readonly storage: ResourceStorageV2;
|
|
230
|
+
}
|
|
231
|
+
export interface ResourceManifestV2 {
|
|
232
|
+
readonly format: typeof RESOURCE_MANIFEST_FORMAT;
|
|
233
|
+
readonly schemaVersion: 2;
|
|
234
|
+
readonly storagePolicy: 'embedded' | 'remote' | 'mixed';
|
|
235
|
+
readonly resources: readonly ResourceManifestEntryV2[];
|
|
236
|
+
}
|
|
237
|
+
export interface ScenePackageResourceData {
|
|
238
|
+
readonly sha256: string;
|
|
239
|
+
readonly mediaType: string;
|
|
240
|
+
readonly bytes: Uint8Array;
|
|
241
|
+
}
|
|
242
|
+
export interface ScenePackageInput {
|
|
243
|
+
readonly document: import('../doc/schema').SceneDocument;
|
|
244
|
+
readonly editorial: EditorialStateV1;
|
|
245
|
+
readonly assetCatalog: AssetCatalogV3;
|
|
246
|
+
readonly resourceManifest: ResourceManifestV2;
|
|
247
|
+
readonly resources?: readonly ScenePackageResourceData[];
|
|
248
|
+
}
|
|
249
|
+
export interface ScenePackageArtifact {
|
|
250
|
+
readonly bytes: Uint8Array;
|
|
251
|
+
readonly manifest: ScenePackageManifestV5;
|
|
252
|
+
readonly packageDigest: string;
|
|
253
|
+
}
|
|
254
|
+
export interface LoadedScenePackage {
|
|
255
|
+
readonly document: import('../doc/schema').SceneDocument;
|
|
256
|
+
readonly editorial: EditorialStateV1;
|
|
257
|
+
readonly assetCatalog: AssetCatalogV3;
|
|
258
|
+
readonly resourceManifest: ResourceManifestV2;
|
|
259
|
+
readonly resources: readonly ScenePackageResourceData[];
|
|
260
|
+
readonly manifest: ScenePackageManifestV5;
|
|
261
|
+
readonly packageDigest: string;
|
|
262
|
+
}
|
|
263
|
+
export interface RemoteResourceResolver {
|
|
264
|
+
resolve(locator: StudioAssetResourceLocator): Promise<Uint8Array | ArrayBuffer | Blob | null>;
|
|
265
|
+
}
|
|
266
|
+
export interface ScenePackageReadPorts {
|
|
267
|
+
readonly remoteResolver?: RemoteResourceResolver;
|
|
268
|
+
}
|
|
269
|
+
export interface ScenePackageHostSource {
|
|
270
|
+
readonly document: import('../doc/schema').SceneDocument;
|
|
271
|
+
}
|
|
272
|
+
export type PackageDocumentName = keyof ScenePackageManifestV5['documents'];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SceneDocument, StudioEditorialState } from '../doc/schema';
|
|
2
|
+
import type { EditorialCameraV1, EditorialNodeStateV1, EditorialStateV1 } from './contracts';
|
|
3
|
+
export declare function createEditorialState(input: {
|
|
4
|
+
readonly document: SceneDocument;
|
|
5
|
+
readonly editorial: Readonly<Record<string, StudioEditorialState>>;
|
|
6
|
+
readonly selection: {
|
|
7
|
+
readonly instanceIds: readonly string[];
|
|
8
|
+
readonly primaryId: string | null;
|
|
9
|
+
};
|
|
10
|
+
readonly camera: EditorialCameraV1 | null;
|
|
11
|
+
}): EditorialStateV1;
|
|
12
|
+
export declare function assertEditorialState(state: EditorialStateV1, document: SceneDocument): void;
|
|
13
|
+
export declare function editorialStateToHost(state: EditorialStateV1): Readonly<Record<string, StudioEditorialState>>;
|
|
14
|
+
export declare function normalizeEditorialCamera(camera: EditorialCameraV1): EditorialCameraV1;
|
|
15
|
+
export declare function editorialStateEquals(left: EditorialStateV1, right: EditorialStateV1): boolean;
|
|
16
|
+
export declare function editorialNodeState(state: EditorialStateV1, nodeId: string): EditorialNodeStateV1;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AssetRevision, StudioAssetResourceLocator, VisualAssetRevision } from '../doc/schema';
|
|
2
|
+
import type { AdapterIdentityV1, AssetInterpretationV1, AssetSourceRevisionV2, NormalizationFactsV1, SourceDependencyEdgeV2, SourceFileFactV2, VariantPayloadIndexV1 } from './contracts';
|
|
3
|
+
export interface SourceRevisionInputV2 {
|
|
4
|
+
readonly sourceFormat: string;
|
|
5
|
+
readonly entryLocator: StudioAssetResourceLocator;
|
|
6
|
+
readonly files: readonly SourceFileFactV2[];
|
|
7
|
+
readonly dependencies?: readonly SourceDependencyEdgeV2[];
|
|
8
|
+
readonly declaredSubresource?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function normalizeSourceBundle(input: SourceRevisionInputV2): AssetSourceRevisionV2;
|
|
11
|
+
export interface InterpretationRevisionInputV1 {
|
|
12
|
+
readonly sourceRevisionId: string;
|
|
13
|
+
readonly adapter: AdapterIdentityV1;
|
|
14
|
+
readonly normalization: NormalizationFactsV1;
|
|
15
|
+
readonly runtimeRevision: AssetRevision | VisualAssetRevision;
|
|
16
|
+
readonly variantPayloads?: VariantPayloadIndexV1;
|
|
17
|
+
}
|
|
18
|
+
export declare function createAssetInterpretation(input: InterpretationRevisionInputV1): AssetInterpretationV1;
|
|
19
|
+
export declare function normalizePackagePath(value: string): string;
|
|
20
|
+
export declare function canonicalDocumentHash(value: unknown): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { ASSET_CATALOG_FORMAT, EDITORIAL_STATE_FORMAT, PACKAGE_SCENE_FORMAT, RESOURCE_MANIFEST_FORMAT, SCENE_PACKAGE_FORMAT, SCENE_PACKAGE_SCHEMA_VERSION, } from './contracts';
|
|
2
|
+
export type { AdapterIdentityV1, AssetCatalogEntryV3, AssetCatalogV3, AssetInterpretationV1, AssetSourceRevisionV2, DeliveryArtifactV2, DeliveryDiagnosticV1, DeliveryLockV1, DeliveryOutcomeV1, DocumentRef, EditorialCameraV1, EditorialNodeStateV1, EditorialStateV1, LoadedScenePackage, NormalizationFactsV1, PackageSceneAssetNode, PackageSceneDocumentV5, PackageSceneDomainNode, PackageSceneGroupNode, PackageSceneNode, PackageScenePlaceholderNode, PackageSceneVisualNode, RemoteResourceResolver, ResourceManifestEntryV2, ResourceManifestV2, ResourceStorageV2, ScenePackageArtifact, ScenePackageHostSource, ScenePackageInput, ScenePackageManifestV5, ScenePackageReadPorts, ScenePackageResourceData, SourceDependencyEdgeV2, SourceDependencyKind, SourceFileFactV2, VariantPayloadIndexV1, } from './contracts';
|
|
3
|
+
export { canonicalDocumentHash, createAssetInterpretation, normalizePackagePath, normalizeSourceBundle, } from './identity';
|
|
4
|
+
export type { InterpretationRevisionInputV1, SourceRevisionInputV2, } from './identity';
|
|
5
|
+
export { assertExplicitDependenciesCoverDerived, deriveSourceDependencies, } from './source-dependencies';
|
|
6
|
+
export { createAssetCatalog, findCatalogEntryByRuntimeRevision } from './asset-catalog';
|
|
7
|
+
export type { AssetCatalogSourceInputV3, CreateAssetCatalogInputV3, } from './asset-catalog';
|
|
8
|
+
export { assertEditorialState, createEditorialState, editorialNodeState, editorialStateToHost, normalizeEditorialCamera, } from './editorial';
|
|
9
|
+
export { assertSceneCatalogConsistency, projectSceneDocument, restoreSceneDocument, } from './scene-document';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SceneDocument } from '../doc/schema';
|
|
2
|
+
import type { AssetCatalogV3, PackageSceneDocumentV5 } from './contracts';
|
|
3
|
+
export declare function projectSceneDocument(document: SceneDocument, catalog: AssetCatalogV3): PackageSceneDocumentV5;
|
|
4
|
+
export declare function restoreSceneDocument(scene: PackageSceneDocumentV5, catalog: AssetCatalogV3): SceneDocument;
|
|
5
|
+
export declare function assertSceneCatalogConsistency(scene: PackageSceneDocumentV5, catalog: AssetCatalogV3): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type StudioSourceBundle } from '../util/studio-source';
|
|
2
|
+
import type { SourceDependencyEdgeV2 } from './contracts';
|
|
3
|
+
export interface DeriveSourceDependenciesOptions {
|
|
4
|
+
readonly explicitDependencies?: readonly SourceDependencyEdgeV2[];
|
|
5
|
+
}
|
|
6
|
+
export declare function deriveSourceDependencies(source: StudioSourceBundle, options?: DeriveSourceDependenciesOptions): Promise<readonly SourceDependencyEdgeV2[]>;
|
|
7
|
+
export declare function assertExplicitDependenciesCoverDerived(explicit: readonly SourceDependencyEdgeV2[], derived: readonly SourceDependencyEdgeV2[]): void;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
var T = Object.defineProperty;
|
|
2
|
+
var w = (r, e, t) => e in r ? T(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var a = (r, e, t) => w(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { h as b, e as _, a as n, c as p, r as A, D as v, w as M } from "./asset-source-BExlEcRt.js";
|
|
5
|
+
import { s as U, k as D } from "./builders-BAXRR5o5.js";
|
|
6
|
+
const l = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let I = 0;
|
|
8
|
+
function $(r, e) {
|
|
9
|
+
const t = Symbol(`studio-write-policy-${I++}`), o = l.get(r) ?? /* @__PURE__ */ new Map();
|
|
10
|
+
return o.set(t, { policy: e }), l.set(r, o), () => {
|
|
11
|
+
const s = l.get(r);
|
|
12
|
+
s && (s.delete(t), s.size === 0 && l.delete(r));
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function k(r, e) {
|
|
16
|
+
const t = l.get(r);
|
|
17
|
+
if (!t) return { allowed: !0 };
|
|
18
|
+
for (const { policy: o } of t.values()) {
|
|
19
|
+
const s = o.check(e);
|
|
20
|
+
if (!s.allowed) return s;
|
|
21
|
+
}
|
|
22
|
+
return { allowed: !0 };
|
|
23
|
+
}
|
|
24
|
+
const h = {
|
|
25
|
+
scopeDenied: "ASSET_REMOTE_SCOPE_DENIED",
|
|
26
|
+
redirectDenied: "ASSET_REMOTE_REDIRECT_DENIED",
|
|
27
|
+
requestFailed: "ASSET_REMOTE_REQUEST_FAILED",
|
|
28
|
+
responseUrlMismatch: "ASSET_REMOTE_RESPONSE_URL_MISMATCH"
|
|
29
|
+
};
|
|
30
|
+
class B {
|
|
31
|
+
constructor(e, t) {
|
|
32
|
+
a(this, "source");
|
|
33
|
+
a(this, "entryUrl");
|
|
34
|
+
a(this, "blobs", /* @__PURE__ */ new Map());
|
|
35
|
+
a(this, "factsByKey", /* @__PURE__ */ new Map());
|
|
36
|
+
this.revision = t, this.source = b(e), this.entryUrl = new URL(this.source.entryUrl);
|
|
37
|
+
}
|
|
38
|
+
get entryLocator() {
|
|
39
|
+
return { kind: "remote-url", url: _(this.source) };
|
|
40
|
+
}
|
|
41
|
+
async entryBlob(e) {
|
|
42
|
+
return this.fetch(this.entryUrl, e);
|
|
43
|
+
}
|
|
44
|
+
async resolve(e, t = {}) {
|
|
45
|
+
const o = t.url ? new URL(t.url) : this.entryUrl, s = new URL(e, o);
|
|
46
|
+
return this.fetch(s, t.signal);
|
|
47
|
+
}
|
|
48
|
+
facts() {
|
|
49
|
+
return [...this.factsByKey.values()].sort((e, t) => n(e.locator).localeCompare(n(t.locator)));
|
|
50
|
+
}
|
|
51
|
+
blob(e) {
|
|
52
|
+
return this.blobs.get(n(e)) ?? null;
|
|
53
|
+
}
|
|
54
|
+
async fetch(e, t) {
|
|
55
|
+
t == null || t.throwIfAborted();
|
|
56
|
+
const o = p(e.href), s = { kind: "remote-url", url: o }, S = n(s);
|
|
57
|
+
this.assertScope(e);
|
|
58
|
+
const E = this.blobs.get(S);
|
|
59
|
+
if (E) return E;
|
|
60
|
+
const f = {
|
|
61
|
+
signal: t,
|
|
62
|
+
redirect: "error"
|
|
63
|
+
}, i = await (this.source.request ? this.source.request(e.href, f) : fetch(e.href, f));
|
|
64
|
+
if (t == null || t.throwIfAborted(), i.redirected)
|
|
65
|
+
throw c(
|
|
66
|
+
h.redirectDenied,
|
|
67
|
+
`Remote USD resource redirects are not allowed: ${e.href}.`
|
|
68
|
+
);
|
|
69
|
+
if (!i.ok)
|
|
70
|
+
throw c(
|
|
71
|
+
h.requestFailed,
|
|
72
|
+
`Remote USD resource request failed (${i.status}): ${e.href}.`
|
|
73
|
+
);
|
|
74
|
+
if (i.url) {
|
|
75
|
+
const m = new URL(i.url);
|
|
76
|
+
if (this.assertScope(m), p(m.href) !== o)
|
|
77
|
+
throw c(
|
|
78
|
+
h.responseUrlMismatch,
|
|
79
|
+
`Remote USD response URL does not match the requested canonical resource: ${i.url}.`
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
const u = await i.blob(), d = new Uint8Array(await u.arrayBuffer()), y = {
|
|
83
|
+
locator: s,
|
|
84
|
+
sha256: U(d),
|
|
85
|
+
byteSize: d.byteLength,
|
|
86
|
+
mediaType: A(
|
|
87
|
+
e.pathname,
|
|
88
|
+
u.type,
|
|
89
|
+
i.headers.get("content-type") ?? void 0
|
|
90
|
+
) ?? v
|
|
91
|
+
};
|
|
92
|
+
this.assertRevisionFact(y);
|
|
93
|
+
const R = u.type ? u : new Blob([d], { type: y.mediaType });
|
|
94
|
+
return this.blobs.set(S, R), this.factsByKey.set(S, y), R;
|
|
95
|
+
}
|
|
96
|
+
assertScope(e) {
|
|
97
|
+
if (!M(this.source, e))
|
|
98
|
+
throw c(
|
|
99
|
+
h.scopeDenied,
|
|
100
|
+
`Remote USD resource is outside the allowed scopes: ${e.href}.`
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
assertRevisionFact(e) {
|
|
104
|
+
const t = this.factsByKey.get(n(e.locator));
|
|
105
|
+
if (t && (t.sha256 !== e.sha256 || t.byteSize !== e.byteSize))
|
|
106
|
+
throw c(
|
|
107
|
+
"ASSET_SOURCE_FACTS_MISMATCH",
|
|
108
|
+
`Remote resource bytes changed within one load: ${e.locator.kind === "remote-url" ? e.locator.url : e.locator.path}.`
|
|
109
|
+
);
|
|
110
|
+
if (!this.revision) return;
|
|
111
|
+
const o = this.revision.resources.find((s) => n(s.locator) === n(e.locator));
|
|
112
|
+
if (!o) {
|
|
113
|
+
const s = "visualRevisionId" in this.revision ? this.revision.visualRevisionId : this.revision.revisionId;
|
|
114
|
+
throw c(
|
|
115
|
+
"ASSET_SOURCE_FACTS_MISMATCH",
|
|
116
|
+
`Remote resource is not declared by revision ${s}.`
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
C(e, o);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function C(r, e) {
|
|
123
|
+
if (r.sha256 !== e.sha256 || r.byteSize !== e.byteSize || r.mediaType !== e.mediaType)
|
|
124
|
+
throw c(
|
|
125
|
+
"ASSET_SOURCE_FACTS_MISMATCH",
|
|
126
|
+
`Remote resource facts do not match revision resource ${n(e.locator)}.`
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
function c(r, e) {
|
|
130
|
+
return new D(r, e);
|
|
131
|
+
}
|
|
132
|
+
export {
|
|
133
|
+
B as S,
|
|
134
|
+
k as e,
|
|
135
|
+
$ as i
|
|
136
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { createStudioSceneSession } from '../view/scene-session';
|
|
2
|
+
export { createStudioBoundsPreview } from '../view/bounds-preview';
|
|
3
|
+
export type { StudioBoundsPreview, StudioBoundsPreviewDimensions, StudioBoundsPreviewInput, StudioBoundsPreviewOptions, } from '../view/bounds-preview';
|
|
4
|
+
export type { StudioNodeFeatureSource, StudioNodeFeatureCapability, StudioNodeCoordinateCapability, StudioNodeFeatures, StudioNodePhysicsVisualization, StudioNodePhysicsVisualizationKey, StudioNodePhysicsVisualizationResult, StudioNodePhysicsVisualizationState, } from '../view/node-features';
|
|
5
|
+
export type { RegionShape, StudioSceneRegionOverlay, } from '../doc/scene-regions';
|
|
6
|
+
export type { StudioNodeDisplayOptions, StudioNodeDisplayState, StudioSceneSession, StudioSceneSessionOptions, StudioSceneSource, StudioSceneStatus, StudioPlacementRuntimeFeedback, StudioPlacementTarget, StudioSelectionOverlay, StudioTransformCommitOptions, } from '../view/scene-session';
|
|
7
|
+
export type { StudioProjectionCapability, StudioProjectionStatus, StudioRuntimeProjectionCapabilities, } from '../view/runtime-capabilities';
|
|
8
|
+
export type { StudioNodeFrame, StudioSelectionFrame } from '../view/scene-session';
|
|
9
|
+
export type { StudioNodeGeometryAnchors } from '../view/geometry-anchors';
|
|
10
|
+
export type { StudioPlacementSurface } from '../view/scene-session';
|
|
11
|
+
export type { StudioCaptureOptions, StudioCaptureResult } from '../view/scene-session';
|
|
12
|
+
export type { StudioPhysicsFacts, StudioPhysicsBodyFact, StudioPhysicsJointFact } from '../view/scene-session';
|