@nebula-spatial/studio 0.0.0-stage → 0.1.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/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/openusd_three_loader-DLiqJWUM.js +13769 -0
- package/dist/assets/usd-export-worker-BRxTLqer.js +182 -0
- package/dist/assets/usd-worker-DekqMsQv.js +1392 -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-DMNRhgL9.js +2705 -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 +2840 -0
- package/dist/mjcf-visual-Bt4bUxd1.js +72 -0
- package/dist/mujoco-runtime-BYZnrvbR.js +467 -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-Cy6vDJ1l.js +21981 -0
- package/dist/scene.js +244 -0
- package/dist/session-BRBrCLdd.js +963 -0
- package/dist/session-DI5tPJxn.js +825 -0
- package/dist/session-q3uuG7OP.js +296 -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 +5545 -0
- package/dist/urdf-session-CQir2nb2.js +1230 -0
- package/dist/usd-session-DZJnEEOs.js +7385 -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/dist/wasm-module-DZn2AM1W.js +13 -0
- package/dist/xacro-DLRXyk60.js +76 -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,127 @@
|
|
|
1
|
+
import type { AssetRevision } from './record';
|
|
2
|
+
import type { PublicUsdMetadata } from './usd-inspection';
|
|
3
|
+
import type { SceneAssetNode, SceneDocument } from '../doc/schema';
|
|
4
|
+
import { type StudioSourceBundle } from '../util/studio-source';
|
|
5
|
+
export type InspectionScope = 'asset-package' | 'stage' | 'geometry' | 'materials-textures' | 'semantics' | 'physics' | 'scene' | 'runtime';
|
|
6
|
+
export type InspectionStatus = 'not-run' | 'running' | 'pass' | 'conditional' | 'fail' | 'unsupported' | 'unknown' | 'stale';
|
|
7
|
+
export type InspectionSeverity = 'info' | 'warning' | 'error';
|
|
8
|
+
export type InspectionSource = 'authored' | 'probed' | 'runtime' | 'annotated';
|
|
9
|
+
export type InspectionImpact = 'load' | 'physics' | 'behavior' | 'visual' | 'profile';
|
|
10
|
+
export type InspectionSimulationTarget = 'mujoco-wasm' | 'isaac-physx' | 'isaac-newton';
|
|
11
|
+
export type InspectionBlockingPolicy = 'always' | 'target' | 'never';
|
|
12
|
+
export interface InspectionExecution {
|
|
13
|
+
readonly at: string;
|
|
14
|
+
readonly durationMs: number;
|
|
15
|
+
readonly engine: string;
|
|
16
|
+
readonly detail?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface InspectionFinding {
|
|
19
|
+
readonly code: string;
|
|
20
|
+
readonly scope: InspectionScope;
|
|
21
|
+
readonly status: InspectionStatus;
|
|
22
|
+
readonly severity: InspectionSeverity;
|
|
23
|
+
readonly source: InspectionSource;
|
|
24
|
+
readonly message: string;
|
|
25
|
+
readonly remediation: string;
|
|
26
|
+
readonly impact: InspectionImpact;
|
|
27
|
+
readonly blocking: InspectionBlockingPolicy;
|
|
28
|
+
readonly targets: readonly InspectionSimulationTarget[];
|
|
29
|
+
readonly primPath: string | null;
|
|
30
|
+
readonly instanceId: string | null;
|
|
31
|
+
readonly evidence: Readonly<Record<string, unknown>>;
|
|
32
|
+
readonly execution: InspectionExecution;
|
|
33
|
+
}
|
|
34
|
+
export interface InspectionPrimRecord {
|
|
35
|
+
readonly path: string;
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly typeName: string;
|
|
38
|
+
readonly variant: string | null;
|
|
39
|
+
readonly source: InspectionSource;
|
|
40
|
+
}
|
|
41
|
+
export interface InspectionReadiness {
|
|
42
|
+
readonly counts: Readonly<Record<InspectionStatus, number>>;
|
|
43
|
+
readonly simulation: {
|
|
44
|
+
readonly target: 'mujoco-wasm';
|
|
45
|
+
readonly status: 'ready' | 'blocked' | 'not-applicable' | 'unknown';
|
|
46
|
+
readonly blockingCodes: readonly string[];
|
|
47
|
+
};
|
|
48
|
+
readonly diagnostics: {
|
|
49
|
+
readonly status: 'pass' | 'conditional' | 'fail';
|
|
50
|
+
readonly failingCodes: readonly string[];
|
|
51
|
+
readonly conditionalCodes: readonly string[];
|
|
52
|
+
};
|
|
53
|
+
readonly profile: {
|
|
54
|
+
readonly id: 'simready';
|
|
55
|
+
readonly status: 'not-run';
|
|
56
|
+
readonly reason: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface InspectionReport {
|
|
60
|
+
readonly assetId: string;
|
|
61
|
+
readonly instanceId: string | null;
|
|
62
|
+
readonly entryPath: string;
|
|
63
|
+
readonly checkedAt: string;
|
|
64
|
+
readonly readiness: InspectionReadiness;
|
|
65
|
+
readonly findings: readonly InspectionFinding[];
|
|
66
|
+
readonly prims: readonly InspectionPrimRecord[];
|
|
67
|
+
}
|
|
68
|
+
export interface InspectionRuntimeSnapshot {
|
|
69
|
+
readonly phase: string;
|
|
70
|
+
readonly capabilities: {
|
|
71
|
+
readonly hasPhysics: boolean;
|
|
72
|
+
readonly canPlay: boolean;
|
|
73
|
+
readonly canPause: boolean;
|
|
74
|
+
readonly canReset: boolean;
|
|
75
|
+
readonly canToggleCollision?: boolean;
|
|
76
|
+
} | null;
|
|
77
|
+
readonly physics: {
|
|
78
|
+
readonly status: string;
|
|
79
|
+
readonly issue?: {
|
|
80
|
+
readonly code: string;
|
|
81
|
+
readonly message: string;
|
|
82
|
+
};
|
|
83
|
+
} | null;
|
|
84
|
+
readonly visualDiagnostics: Readonly<Record<string, unknown>> | null;
|
|
85
|
+
readonly physicsProperties: Readonly<Record<string, unknown>> | null;
|
|
86
|
+
readonly physicsRuntime: Readonly<Record<string, unknown>> | null;
|
|
87
|
+
}
|
|
88
|
+
export interface InspectionSceneCheck {
|
|
89
|
+
readonly status: 'completed' | 'not-authored' | 'unavailable';
|
|
90
|
+
readonly reason: string | null;
|
|
91
|
+
readonly checkedAt: string;
|
|
92
|
+
readonly timestep: number | null;
|
|
93
|
+
readonly steps: number;
|
|
94
|
+
readonly initial: Readonly<Record<string, unknown>> | null;
|
|
95
|
+
readonly final: Readonly<Record<string, unknown>> | null;
|
|
96
|
+
readonly bounds: Readonly<Record<string, {
|
|
97
|
+
readonly min: readonly number[];
|
|
98
|
+
readonly max: readonly number[];
|
|
99
|
+
readonly size: readonly number[];
|
|
100
|
+
}>>;
|
|
101
|
+
readonly overlaps: readonly {
|
|
102
|
+
readonly a: string;
|
|
103
|
+
readonly b: string;
|
|
104
|
+
readonly volume: number;
|
|
105
|
+
}[];
|
|
106
|
+
readonly bodyMotion: Readonly<Record<string, string>>;
|
|
107
|
+
}
|
|
108
|
+
export interface RunModelInspectionInput {
|
|
109
|
+
readonly asset: AssetRevision;
|
|
110
|
+
readonly bundle: StudioSourceBundle;
|
|
111
|
+
readonly instance?: SceneAssetNode;
|
|
112
|
+
readonly metadata?: PublicUsdMetadata;
|
|
113
|
+
readonly runtime?: InspectionRuntimeSnapshot | null;
|
|
114
|
+
readonly scene?: SceneCheckSnapshot;
|
|
115
|
+
}
|
|
116
|
+
export interface SceneCheckSnapshot {
|
|
117
|
+
readonly doc: SceneDocument;
|
|
118
|
+
readonly deterministic?: InspectionSceneCheck | null;
|
|
119
|
+
readonly physicsState?: {
|
|
120
|
+
readonly status: 'not-authored' | 'initializing' | 'ready' | 'unavailable';
|
|
121
|
+
readonly issue?: {
|
|
122
|
+
readonly code: string;
|
|
123
|
+
readonly message: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
export declare function runModelInspection(input: RunModelInspectionInput): Promise<InspectionReport>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset revision helpers.
|
|
3
|
+
*
|
|
4
|
+
* Logical identity (`assetId`) is separate from immutable content identity
|
|
5
|
+
* (`revisionId`, `contentHash`). All file placement is expressed through
|
|
6
|
+
* package-relative AssetResource records; runtime Blobs never enter the scene.
|
|
7
|
+
*/
|
|
8
|
+
import { calculateAssetFactsHash } from '../util/asset-facts';
|
|
9
|
+
import type { AssetCapabilities, AssetCategory, AssetFileKind, AssetHints, AssetLayout, AssetMetrics, AssetProvenance, AssetRepair, AssetResource, AssetRevision, AssetSemantic, AssetVariantSet, Vec3Bounds } from '../doc/schema';
|
|
10
|
+
export { ASSET_CATEGORIES, type AssetCapabilities, type AssetCategory, type AssetFileKind, type AssetHints, type AssetLayout, type AssetMetrics, type AssetProvenance, type AssetRepair, type AssetResource, type AssetRevision, type AssetSemantic, type AssetVariantSet, } from '../doc/schema';
|
|
11
|
+
export type AssetRepairKind = AssetRepair['kind'];
|
|
12
|
+
export interface CreateAssetRevisionOptions {
|
|
13
|
+
readonly assetId: string;
|
|
14
|
+
readonly slug: string;
|
|
15
|
+
readonly label: string;
|
|
16
|
+
readonly layout: AssetLayout;
|
|
17
|
+
readonly fileKind: AssetFileKind;
|
|
18
|
+
readonly entryResourceId: string;
|
|
19
|
+
readonly resources: readonly AssetResource[];
|
|
20
|
+
readonly variantSets?: readonly AssetVariantSet[];
|
|
21
|
+
readonly capabilities: AssetCapabilities;
|
|
22
|
+
readonly bounds?: Vec3Bounds;
|
|
23
|
+
readonly category?: AssetCategory;
|
|
24
|
+
readonly hints?: AssetHints;
|
|
25
|
+
readonly metrics?: AssetMetrics;
|
|
26
|
+
readonly semantic?: AssetSemantic;
|
|
27
|
+
readonly provenance?: AssetProvenance;
|
|
28
|
+
}
|
|
29
|
+
export declare function createAssetRevision(options: CreateAssetRevisionOptions): AssetRevision;
|
|
30
|
+
export { calculateAssetFactsHash };
|
|
31
|
+
export declare function revisionEntryResource(revision: AssetRevision): AssetResource;
|
|
32
|
+
export declare function revisionResourceByLocator(revision: AssetRevision, locator: AssetResource['locator']): AssetResource | null;
|
|
33
|
+
export declare function revisionResourceLocatorKeys(revision: AssetRevision): readonly string[];
|
|
34
|
+
export declare function resolveExportVariantSelection(revision: AssetRevision): Readonly<Record<string, string>> | null;
|
|
35
|
+
export declare function requiresUsdCompilation(revision: AssetRevision): boolean;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { AssetRevision, StudioAssetResourceLocator, VisualAssetRevision } from '../doc/schema';
|
|
2
|
+
import type { StudioRemoteAssetSource } from './source-contracts';
|
|
3
|
+
export declare const REMOTE_ASSET_DIAGNOSTIC: {
|
|
4
|
+
readonly invalidIdentifier: "ASSET_REMOTE_INVALID_IDENTIFIER";
|
|
5
|
+
readonly scopeDenied: "ASSET_REMOTE_SCOPE_DENIED";
|
|
6
|
+
readonly redirectDenied: "ASSET_REMOTE_REDIRECT_DENIED";
|
|
7
|
+
readonly requestFailed: "ASSET_REMOTE_REQUEST_FAILED";
|
|
8
|
+
readonly responseUrlMismatch: "ASSET_REMOTE_RESPONSE_URL_MISMATCH";
|
|
9
|
+
};
|
|
10
|
+
export interface RemoteResourceContext {
|
|
11
|
+
readonly signal?: AbortSignal;
|
|
12
|
+
/** Current resource URL used as the base for relative and absolute-path identifiers. */
|
|
13
|
+
readonly url?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface RemoteAssetResourceFact {
|
|
16
|
+
readonly locator: StudioAssetResourceLocator;
|
|
17
|
+
readonly sha256: string;
|
|
18
|
+
readonly byteSize: number;
|
|
19
|
+
readonly mediaType: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class StudioRemoteAssetResolver {
|
|
22
|
+
private readonly revision?;
|
|
23
|
+
readonly source: StudioRemoteAssetSource;
|
|
24
|
+
private readonly entryUrl;
|
|
25
|
+
private readonly blobs;
|
|
26
|
+
private readonly factsByKey;
|
|
27
|
+
constructor(source: StudioRemoteAssetSource, revision?: (AssetRevision | VisualAssetRevision) | undefined);
|
|
28
|
+
get entryLocator(): StudioAssetResourceLocator;
|
|
29
|
+
entryBlob(signal?: AbortSignal): Promise<Blob>;
|
|
30
|
+
resolve(identifier: string, context?: RemoteResourceContext): Promise<Blob>;
|
|
31
|
+
facts(): readonly RemoteAssetResourceFact[];
|
|
32
|
+
blob(locator: StudioAssetResourceLocator): Blob | null;
|
|
33
|
+
private fetch;
|
|
34
|
+
private assertScope;
|
|
35
|
+
private assertRevisionFact;
|
|
36
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Intake repairs.
|
|
3
|
+
*
|
|
4
|
+
* Repairs happen at intake, never at export (docs/sim-studio/assets.md §4.3).
|
|
5
|
+
* Export's contract is "copy the asset as-is", so anything that rewrites asset
|
|
6
|
+
* content has to happen before the asset enters the library — and every change
|
|
7
|
+
* has to be recorded so users can audit what we did to their asset.
|
|
8
|
+
*/
|
|
9
|
+
import type { AssetRepair, AssetRepairKind } from './record';
|
|
10
|
+
import type { UsdReference } from './dependency-scan';
|
|
11
|
+
export interface RepairOptions {
|
|
12
|
+
/** Timestamp factory; injectable so intake output stays reproducible in tests. */
|
|
13
|
+
readonly now: () => string;
|
|
14
|
+
}
|
|
15
|
+
export interface RepairResult {
|
|
16
|
+
/** Layer path to rewritten text. Only layers that changed are present. */
|
|
17
|
+
readonly rewrites: ReadonlyMap<string, string>;
|
|
18
|
+
readonly repairs: readonly AssetRepair[];
|
|
19
|
+
/** Changes that could not be applied automatically and need a human. */
|
|
20
|
+
readonly unresolved: readonly UsdReference[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Anchors relative references that are missing `./`.
|
|
24
|
+
*
|
|
25
|
+
* This is the `gltf/pbr.mdl` defect: USD resolves such a path through a search
|
|
26
|
+
* path, so it works in one host and fails in another. Adding `./` makes the
|
|
27
|
+
* intent explicit without changing what the file points at.
|
|
28
|
+
*/
|
|
29
|
+
export declare function anchorReferences(layers: readonly {
|
|
30
|
+
readonly path: string;
|
|
31
|
+
readonly text: string;
|
|
32
|
+
}[], unanchored: readonly UsdReference[], options: RepairOptions): RepairResult;
|
|
33
|
+
/** Removes absolute URI references, which can never be self-contained. */
|
|
34
|
+
export declare function stripExternalReferences(layers: readonly {
|
|
35
|
+
readonly path: string;
|
|
36
|
+
readonly text: string;
|
|
37
|
+
}[], external: readonly UsdReference[], options: RepairOptions): RepairResult;
|
|
38
|
+
/**
|
|
39
|
+
* Removes a `@target@` reference together with the statement that carries it.
|
|
40
|
+
*
|
|
41
|
+
* Only lines where the reference *is* the statement are removed. A line that
|
|
42
|
+
* also holds unrelated authored data is refused (the reference is returned to
|
|
43
|
+
* the caller instead), because deleting such a line would silently drop
|
|
44
|
+
* geometry or attributes the author wrote.
|
|
45
|
+
*/
|
|
46
|
+
export declare function removeReference(text: string, target: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* Rewrites `@target@` to `@replacement@` without touching a following prim path.
|
|
49
|
+
*/
|
|
50
|
+
export declare function replaceReferenceTarget(text: string, target: string, replacement: string): string;
|
|
51
|
+
export declare function makeRepair(kind: AssetRepairKind, detail: string, now: () => string): AssetRepair;
|
|
52
|
+
/** Deterministic ordering so a repaired package always reports identically. */
|
|
53
|
+
export declare function sortRepairs(repairs: readonly AssetRepair[]): AssetRepair[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StudioAssetResourceLocator } from '../doc/schema';
|
|
2
|
+
export declare function normalizePackageResourcePath(value: string): string;
|
|
3
|
+
export declare function canonicalRemoteResourceUrl(value: string): string;
|
|
4
|
+
export declare function normalizeResourceLocator(locator: StudioAssetResourceLocator): StudioAssetResourceLocator;
|
|
5
|
+
export declare function assetResourceLocatorKey(locator: StudioAssetResourceLocator): string;
|
|
6
|
+
export declare function assetResourceIdForLocator(locator: StudioAssetResourceLocator, sha256: string): string;
|
|
7
|
+
export declare function packagePathFromLocator(locator: StudioAssetResourceLocator): string | null;
|
|
8
|
+
export declare function remoteUrlFromLocator(locator: StudioAssetResourceLocator): string | null;
|
|
9
|
+
export declare function deliveryOutputPathForLocator(locator: StudioAssetResourceLocator): string;
|
|
10
|
+
/**
|
|
11
|
+
* Resolves one authored identifier against the current resource locator.
|
|
12
|
+
* Remote identifiers use URL semantics. Package paths preserve USD's
|
|
13
|
+
* ancestor search path for unanchored references.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveResourceLocatorReference(from: StudioAssetResourceLocator, target: string, available?: readonly StudioAssetResourceLocator[]): StudioAssetResourceLocator | null;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AssetRevision } from '../doc/schema';
|
|
2
|
+
import type { StudioAssetResourceLocator } from '../util/studio-source';
|
|
3
|
+
export type StudioAssetRevisionChange = {
|
|
4
|
+
readonly kind: 'entry-locator-changed';
|
|
5
|
+
readonly previousLocator: StudioAssetResourceLocator;
|
|
6
|
+
readonly nextLocator: StudioAssetResourceLocator;
|
|
7
|
+
} | {
|
|
8
|
+
readonly kind: 'entry-content-changed';
|
|
9
|
+
readonly previousSha256: string;
|
|
10
|
+
readonly nextSha256: string;
|
|
11
|
+
} | {
|
|
12
|
+
readonly kind: 'dependency-content-changed';
|
|
13
|
+
readonly url: string;
|
|
14
|
+
readonly previousSha256: string;
|
|
15
|
+
readonly nextSha256: string;
|
|
16
|
+
} | {
|
|
17
|
+
readonly kind: 'dependency-added';
|
|
18
|
+
readonly url: string;
|
|
19
|
+
readonly nextSha256: string;
|
|
20
|
+
} | {
|
|
21
|
+
readonly kind: 'dependency-removed';
|
|
22
|
+
readonly url: string;
|
|
23
|
+
readonly previousSha256: string;
|
|
24
|
+
};
|
|
25
|
+
export interface StudioAssetRevisionDiff {
|
|
26
|
+
readonly previousRevisionId: string;
|
|
27
|
+
readonly nextRevisionId: string;
|
|
28
|
+
readonly entryLocatorChanged: boolean;
|
|
29
|
+
readonly entryContentChanged: boolean;
|
|
30
|
+
readonly dependencyChanged: boolean;
|
|
31
|
+
readonly changes: readonly StudioAssetRevisionChange[];
|
|
32
|
+
}
|
|
33
|
+
export declare function diffAssetRevisions(previous: AssetRevision, next: AssetRevision): StudioAssetRevisionDiff;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Platform-neutral remote source descriptors shared by ports and adapters. */
|
|
2
|
+
export type StudioAssetRequest = (url: string, init: RequestInit) => Promise<Response>;
|
|
3
|
+
export interface StudioAssetScope {
|
|
4
|
+
readonly origin: string;
|
|
5
|
+
readonly pathPrefix: string;
|
|
6
|
+
}
|
|
7
|
+
export interface StudioRemoteAssetSourceInput {
|
|
8
|
+
/** Complete absolute URL supplied by the business integration. */
|
|
9
|
+
readonly entryUrl: string;
|
|
10
|
+
readonly request?: StudioAssetRequest;
|
|
11
|
+
/**
|
|
12
|
+
* Explicit HTTP(S) dependency allowlist. When omitted, all absolute HTTP(S)
|
|
13
|
+
* dependency URLs remain eligible after locator, redirect and fact checks.
|
|
14
|
+
* An explicit empty array denies every URL.
|
|
15
|
+
*/
|
|
16
|
+
readonly allowedScopes?: readonly StudioAssetScope[];
|
|
17
|
+
}
|
|
18
|
+
export interface StudioRemoteAssetSource extends StudioRemoteAssetSourceInput {
|
|
19
|
+
readonly kind: 'remote-entry';
|
|
20
|
+
readonly revisionId: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StudioAssetScope, StudioRemoteAssetSource } from './source-contracts';
|
|
2
|
+
export declare const STUDIO_ASSET_SOURCE_ERROR: {
|
|
3
|
+
readonly unavailable: "ASSET_SOURCE_UNAVAILABLE";
|
|
4
|
+
readonly conflict: "SOURCE_REVISION_CONFLICT";
|
|
5
|
+
readonly unverifiable: "SOURCE_FACTS_UNVERIFIABLE";
|
|
6
|
+
readonly factsMismatch: "ASSET_SOURCE_FACTS_MISMATCH";
|
|
7
|
+
readonly invalidLocator: "ASSET_SOURCE_INVALID_LOCATOR";
|
|
8
|
+
};
|
|
9
|
+
export declare function normalizeRemoteSource(source: StudioRemoteAssetSource): StudioRemoteAssetSource;
|
|
10
|
+
export declare function normalizeScopes(source: StudioRemoteAssetSource): readonly StudioAssetScope[];
|
|
11
|
+
export declare function remoteSourceAllowsUrl(source: StudioRemoteAssetSource, url: URL): boolean;
|
|
12
|
+
export declare function pathMatchesPrefix(pathname: string, pathPrefix: string): boolean;
|
|
13
|
+
export declare function urlMatchesScope(url: URL, scope: StudioAssetScope): boolean;
|
|
14
|
+
export declare function canonicalEntryUrl(source: StudioRemoteAssetSource): string;
|
|
15
|
+
export declare function normalizeScope(scope: StudioAssetScope): StudioAssetScope;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Generic USD package inspection; independent of an asset catalog or UI. */
|
|
2
|
+
import { type StudioSourceBundle } from '../util/studio-source';
|
|
3
|
+
import { type SimReadyAssetSourceMetadata, type SimReadyPackageEvidence, type UsdSourcePhysicsSummary, type UsdRootPrimSourceMetadata } from './usd-source-metadata';
|
|
4
|
+
export interface PublicUsdMetadata {
|
|
5
|
+
readonly textual: boolean;
|
|
6
|
+
readonly defaultPrim: string | null;
|
|
7
|
+
readonly upAxis: string | null;
|
|
8
|
+
readonly metersPerUnit: number | null;
|
|
9
|
+
readonly kilogramsPerUnit: number | null;
|
|
10
|
+
readonly creator: string | null;
|
|
11
|
+
readonly startTimeCode: number | null;
|
|
12
|
+
readonly endTimeCode: number | null;
|
|
13
|
+
readonly timeCodesPerSecond: number | null;
|
|
14
|
+
readonly rootPrim: UsdRootPrimSourceMetadata | null;
|
|
15
|
+
readonly simReady: SimReadyAssetSourceMetadata | null;
|
|
16
|
+
readonly packageEvidence: SimReadyPackageEvidence | null;
|
|
17
|
+
readonly sourcePhysics: UsdSourcePhysicsSummary | null;
|
|
18
|
+
readonly extent: {
|
|
19
|
+
readonly min: readonly [number, number, number];
|
|
20
|
+
readonly max: readonly [number, number, number];
|
|
21
|
+
} | null;
|
|
22
|
+
readonly references: readonly string[];
|
|
23
|
+
readonly payloads: readonly string[];
|
|
24
|
+
readonly sublayers: readonly string[];
|
|
25
|
+
readonly materials: readonly string[];
|
|
26
|
+
readonly materialBindings: readonly string[];
|
|
27
|
+
readonly textures: readonly string[];
|
|
28
|
+
readonly semanticFields: readonly string[];
|
|
29
|
+
readonly variantSets: readonly {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly options: readonly string[];
|
|
32
|
+
readonly authoredDefault?: string;
|
|
33
|
+
}[];
|
|
34
|
+
readonly meshCount: number;
|
|
35
|
+
readonly hasRigidBodyApi: boolean;
|
|
36
|
+
readonly hasCollisionApi: boolean;
|
|
37
|
+
readonly jointCount: number;
|
|
38
|
+
}
|
|
39
|
+
export declare function inspectPublicUsd(bundle: StudioSourceBundle): Promise<PublicUsdMetadata>;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
export interface UsdRootPrimSourceMetadata {
|
|
2
|
+
readonly path: string;
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly typeName: string;
|
|
5
|
+
readonly kind: string | null;
|
|
6
|
+
readonly apiSchemas: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
export interface SimReadyAuthoredValidation {
|
|
9
|
+
readonly profileId: string | null;
|
|
10
|
+
readonly profileVersion: string | null;
|
|
11
|
+
readonly validatedDates: readonly string[];
|
|
12
|
+
readonly featureCount: number;
|
|
13
|
+
readonly passedFeatureCount: number;
|
|
14
|
+
readonly blockingFailureCount: number;
|
|
15
|
+
}
|
|
16
|
+
export interface SimReadyAssetSourceMetadata {
|
|
17
|
+
readonly assetName: string | null;
|
|
18
|
+
readonly assetType: string | null;
|
|
19
|
+
readonly category: string | null;
|
|
20
|
+
readonly author: string | null;
|
|
21
|
+
readonly license: string | null;
|
|
22
|
+
readonly sourceFile: string | null;
|
|
23
|
+
readonly generatedDate: string | null;
|
|
24
|
+
readonly qcode: string | null;
|
|
25
|
+
readonly mass: number | null;
|
|
26
|
+
readonly extents: readonly [number, number, number] | null;
|
|
27
|
+
readonly rigidBodyCount: number | null;
|
|
28
|
+
readonly validation: SimReadyAuthoredValidation | null;
|
|
29
|
+
}
|
|
30
|
+
export interface UsdAuthoredVariantSet {
|
|
31
|
+
readonly name: string;
|
|
32
|
+
readonly options: readonly string[];
|
|
33
|
+
readonly authoredDefault?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface UsdLayerSourceMetadata {
|
|
36
|
+
readonly creator: string | null;
|
|
37
|
+
readonly startTimeCode: number | null;
|
|
38
|
+
readonly endTimeCode: number | null;
|
|
39
|
+
readonly timeCodesPerSecond: number | null;
|
|
40
|
+
readonly rootPrim: UsdRootPrimSourceMetadata | null;
|
|
41
|
+
readonly simReady: SimReadyAssetSourceMetadata | null;
|
|
42
|
+
readonly variantSets: readonly UsdAuthoredVariantSet[];
|
|
43
|
+
}
|
|
44
|
+
export interface SimReadyValidationEvidence {
|
|
45
|
+
readonly entryPath: string | null;
|
|
46
|
+
readonly profileId: string | null;
|
|
47
|
+
readonly profileVersion: string | null;
|
|
48
|
+
readonly validatorVersion: string | null;
|
|
49
|
+
readonly totalFeatures: number;
|
|
50
|
+
readonly passedFeatures: number;
|
|
51
|
+
readonly blockingFailures: number;
|
|
52
|
+
readonly blockingFeatureIds: readonly string[];
|
|
53
|
+
readonly failedFeatureIds: readonly string[];
|
|
54
|
+
readonly tierVersions: Readonly<Record<string, string>>;
|
|
55
|
+
readonly status: 'pass' | 'partial' | 'fail' | 'unknown';
|
|
56
|
+
}
|
|
57
|
+
export interface SimReadyBenchmarkFailure {
|
|
58
|
+
readonly testName: string;
|
|
59
|
+
readonly engine: string;
|
|
60
|
+
readonly message: string;
|
|
61
|
+
}
|
|
62
|
+
export interface SimReadyBenchmarkEvidence {
|
|
63
|
+
readonly schemaVersion: string | null;
|
|
64
|
+
readonly assetName: string | null;
|
|
65
|
+
readonly passed: boolean | null;
|
|
66
|
+
readonly runTimestamp: string | null;
|
|
67
|
+
readonly testCount: number;
|
|
68
|
+
readonly passedCount: number;
|
|
69
|
+
readonly failedCount: number;
|
|
70
|
+
readonly skippedCount: number;
|
|
71
|
+
readonly failedTests: readonly SimReadyBenchmarkFailure[];
|
|
72
|
+
readonly engines: readonly string[];
|
|
73
|
+
}
|
|
74
|
+
export interface SimReadyPackageEvidence {
|
|
75
|
+
readonly formatVersion: string | null;
|
|
76
|
+
readonly bomFormatVersion: string | null;
|
|
77
|
+
readonly packageId: string | null;
|
|
78
|
+
readonly license: string | null;
|
|
79
|
+
readonly contentSha256: string | null;
|
|
80
|
+
readonly packageSha256: string | null;
|
|
81
|
+
readonly metadataFileCount: number;
|
|
82
|
+
readonly metadataNames: readonly string[];
|
|
83
|
+
readonly loadedFileCount: number;
|
|
84
|
+
readonly loadedTotalBytes: number;
|
|
85
|
+
readonly bomFileCount: number;
|
|
86
|
+
readonly bomTotalBytes: number;
|
|
87
|
+
readonly validation: SimReadyValidationEvidence | null;
|
|
88
|
+
readonly benchmark: SimReadyBenchmarkEvidence | null;
|
|
89
|
+
}
|
|
90
|
+
export interface UsdSourcePhysicsPrim {
|
|
91
|
+
readonly path: string;
|
|
92
|
+
readonly typeName: string;
|
|
93
|
+
readonly layers: readonly string[];
|
|
94
|
+
readonly apiSchemas: readonly string[];
|
|
95
|
+
readonly properties: readonly UsdSourcePhysicsProperty[];
|
|
96
|
+
readonly hasDriveAttributes: boolean;
|
|
97
|
+
readonly hasMimicAttributes: boolean;
|
|
98
|
+
}
|
|
99
|
+
export interface UsdSourcePhysicsProperty {
|
|
100
|
+
readonly name: string;
|
|
101
|
+
readonly values: readonly {
|
|
102
|
+
readonly value: string;
|
|
103
|
+
readonly layers: readonly string[];
|
|
104
|
+
}[];
|
|
105
|
+
}
|
|
106
|
+
export interface UsdSourcePhysicsSchemaCount {
|
|
107
|
+
readonly schema: string;
|
|
108
|
+
readonly primCount: number;
|
|
109
|
+
}
|
|
110
|
+
export interface UsdSourcePhysicsValueCount {
|
|
111
|
+
readonly value: string;
|
|
112
|
+
readonly primCount: number;
|
|
113
|
+
}
|
|
114
|
+
export interface UsdSourcePhysicsSummary {
|
|
115
|
+
readonly scannedLayerCount: number;
|
|
116
|
+
readonly scannedLayers: readonly string[];
|
|
117
|
+
readonly scannedPrimCount: number;
|
|
118
|
+
readonly physicsPrimCount: number;
|
|
119
|
+
readonly apiSchemaCounts: readonly UsdSourcePhysicsSchemaCount[];
|
|
120
|
+
readonly colliderApproximationCounts: readonly UsdSourcePhysicsValueCount[];
|
|
121
|
+
readonly physicsPrims: readonly UsdSourcePhysicsPrim[];
|
|
122
|
+
readonly rigidBodyPrims: readonly UsdSourcePhysicsPrim[];
|
|
123
|
+
readonly colliderPrims: readonly UsdSourcePhysicsPrim[];
|
|
124
|
+
readonly articulationRootPrims: readonly UsdSourcePhysicsPrim[];
|
|
125
|
+
readonly jointPrims: readonly UsdSourcePhysicsPrim[];
|
|
126
|
+
readonly massPrims: readonly UsdSourcePhysicsPrim[];
|
|
127
|
+
readonly materialPrims: readonly UsdSourcePhysicsPrim[];
|
|
128
|
+
readonly scenePrims: readonly UsdSourcePhysicsPrim[];
|
|
129
|
+
readonly actuatorPrims: readonly UsdSourcePhysicsPrim[];
|
|
130
|
+
readonly driveAttributePrimCount: number;
|
|
131
|
+
readonly mimicPrimCount: number;
|
|
132
|
+
}
|
|
133
|
+
export declare function parseUsdLayerSourceMetadata(text: string): UsdLayerSourceMetadata;
|
|
134
|
+
export declare function parseSimReadyPackageEvidence(files: readonly {
|
|
135
|
+
readonly path: string;
|
|
136
|
+
readonly blob: Blob;
|
|
137
|
+
}[]): Promise<SimReadyPackageEvidence | null>;
|
|
138
|
+
export declare function parseUsdSourcePhysicsSummary(files: readonly {
|
|
139
|
+
readonly path: string;
|
|
140
|
+
readonly blob: Blob;
|
|
141
|
+
}[]): Promise<UsdSourcePhysicsSummary | null>;
|
|
142
|
+
export declare function parseUsdVariantSets(text: string): UsdAuthoredVariantSet[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Diagnostic } from '../util/diagnostics';
|
|
2
|
+
import type { StudioSourceBundle } from '../util/studio-source';
|
|
3
|
+
import type { VisualAssetRevision } from '../doc/schema';
|
|
4
|
+
export interface VisualIntakeFile {
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly path?: string;
|
|
7
|
+
readonly blob: Blob;
|
|
8
|
+
}
|
|
9
|
+
export interface VisualIntakeOptions {
|
|
10
|
+
readonly assetId?: string;
|
|
11
|
+
readonly visualRevisionId?: string;
|
|
12
|
+
readonly label?: string;
|
|
13
|
+
readonly entry?: string;
|
|
14
|
+
readonly sourceUrl?: string;
|
|
15
|
+
readonly license?: string;
|
|
16
|
+
readonly provenance?: 'builtin' | 'user' | 'import' | 'fixture';
|
|
17
|
+
readonly now?: () => string;
|
|
18
|
+
}
|
|
19
|
+
export type VisualIntakeSource = StudioSourceBundle;
|
|
20
|
+
export interface VisualIntakeResult {
|
|
21
|
+
readonly status: 'ready' | 'needs-entry' | 'blocked';
|
|
22
|
+
readonly visualAssets: readonly VisualAssetRevision[];
|
|
23
|
+
readonly sources: readonly VisualIntakeSource[];
|
|
24
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
25
|
+
readonly entryCandidates: readonly string[];
|
|
26
|
+
}
|
|
27
|
+
export declare function intakeVisualFiles(files: readonly VisualIntakeFile[], options?: VisualIntakeOptions): Promise<VisualIntakeResult>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AssetResource, Vec3, Vec3Bounds, VisualAssetFormat, VisualAssetMetrics, VisualAssetProvenance, VisualAssetRevision } from '../doc/schema';
|
|
2
|
+
export declare const VISUAL_ASSET_CAPABILITIES: Readonly<{
|
|
3
|
+
readonly renderable: true;
|
|
4
|
+
readonly collidable: false;
|
|
5
|
+
readonly rigidBody: false;
|
|
6
|
+
readonly articulated: false;
|
|
7
|
+
}>;
|
|
8
|
+
export interface CreateVisualAssetRevisionOptions {
|
|
9
|
+
readonly visualRevisionId: string;
|
|
10
|
+
readonly assetId: string;
|
|
11
|
+
readonly label: string;
|
|
12
|
+
readonly format: VisualAssetFormat;
|
|
13
|
+
readonly entryResourceId: string;
|
|
14
|
+
readonly resources: readonly AssetResource[];
|
|
15
|
+
readonly upAxis?: 'y' | 'y-down' | 'z';
|
|
16
|
+
readonly suggestedScale?: Vec3;
|
|
17
|
+
readonly bounds?: Vec3Bounds;
|
|
18
|
+
readonly metrics?: VisualAssetMetrics;
|
|
19
|
+
readonly provenance: VisualAssetProvenance;
|
|
20
|
+
}
|
|
21
|
+
export declare function createVisualAssetRevision(options: CreateVisualAssetRevisionOptions): VisualAssetRevision;
|
|
22
|
+
export declare function visualRevisionEntryResource(revision: VisualAssetRevision): AssetResource;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Diagnostic } from '../util/diagnostics';
|
|
2
|
+
import type { StudioSourceBundle } from '../util/studio-source';
|
|
3
|
+
import type { AssetAnnotations, IntakeDiagnostic, IntakePhysicsProbe } from './intake';
|
|
4
|
+
import type { AssetRevision } from './record';
|
|
5
|
+
/** The structural File surface needed by web intake; no DOM File import. */
|
|
6
|
+
export interface WebFileLike {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly size?: number;
|
|
9
|
+
readonly type?: string;
|
|
10
|
+
readonly webkitRelativePath?: string;
|
|
11
|
+
readonly arrayBuffer: () => Promise<ArrayBuffer>;
|
|
12
|
+
}
|
|
13
|
+
export interface WebIntakeOptions {
|
|
14
|
+
/** Explicit package-relative entry. Required when entryCandidates has >1 item. */
|
|
15
|
+
readonly entry?: string;
|
|
16
|
+
readonly annotations?: AssetAnnotations;
|
|
17
|
+
readonly now?: () => string;
|
|
18
|
+
/** A Viewer probe, when available. Omitted means inspect textual USD first. */
|
|
19
|
+
readonly probe?: IntakePhysicsProbe | null;
|
|
20
|
+
}
|
|
21
|
+
export type WebIntakeStatus = 'ready' | 'needs-entry' | 'blocked';
|
|
22
|
+
export interface WebIntakeResult {
|
|
23
|
+
readonly status: WebIntakeStatus;
|
|
24
|
+
readonly assets: readonly AssetRevision[];
|
|
25
|
+
readonly sourceBundles: readonly StudioSourceBundle[];
|
|
26
|
+
readonly diagnostics: readonly (Diagnostic | IntakeDiagnostic)[];
|
|
27
|
+
readonly entryCandidates: readonly string[];
|
|
28
|
+
}
|
|
29
|
+
export declare const WEB_INTAKE_DIAGNOSTIC: {
|
|
30
|
+
readonly noFiles: "WEB_INTAKE_NO_FILES";
|
|
31
|
+
readonly readFailed: "WEB_INTAKE_FILE_READ_FAILED";
|
|
32
|
+
readonly ambiguousEntry: "WEB_INTAKE_AMBIGUOUS_ENTRY";
|
|
33
|
+
readonly invalidEntry: "WEB_INTAKE_INVALID_ENTRY";
|
|
34
|
+
readonly dependencyMissing: "WEB_INTAKE_DEPENDENCY_MISSING";
|
|
35
|
+
readonly externalReference: "WEB_INTAKE_EXTERNAL_REFERENCE";
|
|
36
|
+
readonly physicsUnknown: "WEB_INTAKE_PHYSICS_UNKNOWN";
|
|
37
|
+
readonly zipMalformed: "WEB_INTAKE_ZIP_MALFORMED";
|
|
38
|
+
readonly zipUnsafePath: "WEB_INTAKE_ZIP_UNSAFE_PATH";
|
|
39
|
+
readonly zipNestedLimit: "WEB_INTAKE_ZIP_NESTING_LIMIT";
|
|
40
|
+
readonly usdzMalformed: "WEB_INTAKE_USDZ_MALFORMED";
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Reads local web files, runs the existing intake/dependency rules, and
|
|
44
|
+
* returns Blob-backed source bundles ready for a Viewer. No network is used.
|
|
45
|
+
*/
|
|
46
|
+
export declare function intakeWebFiles(files: readonly WebFileLike[], options?: WebIntakeOptions): Promise<WebIntakeResult>;
|