@webspatial/core-sdk 1.6.1 → 2.0.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/CHANGELOG.md +84 -0
- package/README.md +10 -0
- package/dist/JSBCommand.d.ts +398 -0
- package/dist/JSBCommand.js +668 -0
- package/dist/JSBCommand.js.map +1 -0
- package/dist/Spatial.d.ts +63 -0
- package/dist/Spatial.js +60 -0
- package/dist/Spatial.js.map +1 -0
- package/dist/SpatialObject.d.ts +19 -0
- package/dist/SpatialObject.js +44 -0
- package/dist/SpatialObject.js.map +1 -0
- package/dist/SpatialScene.d.ts +51 -0
- package/dist/SpatialScene.js +74 -0
- package/dist/SpatialScene.js.map +1 -0
- package/dist/SpatialSession.d.ts +143 -0
- package/dist/SpatialSession.js +173 -0
- package/dist/SpatialSession.js.map +1 -0
- package/dist/SpatialWebEvent.d.ts +8 -0
- package/dist/SpatialWebEvent.js +18 -0
- package/dist/SpatialWebEvent.js.map +1 -0
- package/dist/SpatialWebEventCreator.d.ts +11 -0
- package/dist/SpatialWebEventCreator.js +11 -0
- package/dist/SpatialWebEventCreator.js.map +1 -0
- package/dist/Spatialized2DElement.d.ts +42 -0
- package/dist/Spatialized2DElement.js +47 -0
- package/dist/Spatialized2DElement.js.map +1 -0
- package/dist/SpatializedDynamic3DElement.d.ts +7 -0
- package/dist/SpatializedDynamic3DElement.js +43 -0
- package/dist/SpatializedDynamic3DElement.js.map +1 -0
- package/dist/SpatializedElement.d.ts +7 -0
- package/dist/SpatializedElement.js +206 -0
- package/dist/SpatializedElement.js.map +1 -0
- package/dist/SpatializedElementCreator.d.ts +15 -0
- package/dist/SpatializedElementCreator.js +47 -0
- package/dist/SpatializedElementCreator.js.map +1 -0
- package/dist/SpatializedStatic3DElement.d.ts +195 -0
- package/dist/SpatializedStatic3DElement.js +327 -0
- package/dist/SpatializedStatic3DElement.js.map +1 -0
- package/dist/WebMsgCommand.d.ts +7 -0
- package/dist/WebMsgCommand.js +23 -0
- package/dist/WebMsgCommand.js.map +1 -0
- package/dist/index.d.ts +35 -1101
- package/dist/index.js +21 -3393
- package/dist/index.js.map +1 -1
- package/dist/install-polyfills.d.ts +2 -0
- package/dist/install-polyfills.js +13 -0
- package/dist/install-polyfills.js.map +1 -0
- package/dist/isSSREnv.d.ts +3 -0
- package/dist/isSSREnv.js +6 -0
- package/dist/isSSREnv.js.map +1 -0
- package/dist/motion/AnimationObject.d.ts +7 -0
- package/dist/motion/AnimationObject.js +140 -0
- package/dist/motion/AnimationObject.js.map +1 -0
- package/dist/motion/compute/index.d.ts +10 -0
- package/dist/motion/compute/index.js +19 -0
- package/dist/motion/compute/index.js.map +1 -0
- package/dist/motion/compute/motionPropertyValues.d.ts +19 -0
- package/dist/motion/compute/motionPropertyValues.js +50 -0
- package/dist/motion/compute/motionPropertyValues.js.map +1 -0
- package/dist/motion/compute/normalize.d.ts +31 -0
- package/dist/motion/compute/normalize.js +201 -0
- package/dist/motion/compute/normalize.js.map +1 -0
- package/dist/motion/compute/validate.d.ts +22 -0
- package/dist/motion/compute/validate.js +103 -0
- package/dist/motion/compute/validate.js.map +1 -0
- package/dist/motion/index.d.ts +8 -0
- package/dist/motion/index.js +6 -0
- package/dist/motion/index.js.map +1 -0
- package/dist/motion/native/serializeMotionTimeline.d.ts +12 -0
- package/dist/motion/native/serializeMotionTimeline.js +21 -0
- package/dist/motion/native/serializeMotionTimeline.js.map +1 -0
- package/dist/physicalMetrics-W5uZ5xKb.d.ts +48 -0
- package/dist/physicalMetrics.d.ts +1 -0
- package/dist/physicalMetrics.js +58 -0
- package/dist/physicalMetrics.js.map +1 -0
- package/dist/platform-adapter/CommandResultUtils.d.ts +12 -0
- package/dist/platform-adapter/CommandResultUtils.js +21 -0
- package/dist/platform-adapter/CommandResultUtils.js.map +1 -0
- package/dist/platform-adapter/createPlatformSync.d.ts +16 -0
- package/dist/platform-adapter/createPlatformSync.js +30 -0
- package/dist/platform-adapter/createPlatformSync.js.map +1 -0
- package/dist/platform-adapter/index.d.ts +12 -0
- package/dist/platform-adapter/index.js +10 -0
- package/dist/platform-adapter/index.js.map +1 -0
- package/dist/platform-adapter/interface.d.ts +7 -0
- package/dist/platform-adapter/interface.js +1 -0
- package/dist/platform-adapter/interface.js.map +1 -0
- package/dist/platform-adapter/pico-os/PicoOSPlatform.d.ts +25 -0
- package/dist/platform-adapter/pico-os/PicoOSPlatform.js +168 -0
- package/dist/platform-adapter/pico-os/PicoOSPlatform.js.map +1 -0
- package/dist/platform-adapter/puppeteer/PuppeteerPlatform.d.ts +66 -0
- package/dist/platform-adapter/puppeteer/PuppeteerPlatform.js +372 -0
- package/dist/platform-adapter/puppeteer/PuppeteerPlatform.js.map +1 -0
- package/dist/platform-adapter/spatialRequestMetadata.d.ts +6 -0
- package/dist/platform-adapter/spatialRequestMetadata.js +39 -0
- package/dist/platform-adapter/spatialRequestMetadata.js.map +1 -0
- package/dist/platform-adapter/spatialSceneQuery.d.ts +12 -0
- package/dist/platform-adapter/spatialSceneQuery.js +12 -0
- package/dist/platform-adapter/spatialSceneQuery.js.map +1 -0
- package/dist/platform-adapter/vision-os/VisionOSPlatform.d.ts +19 -0
- package/dist/platform-adapter/vision-os/VisionOSPlatform.js +77 -0
- package/dist/platform-adapter/vision-os/VisionOSPlatform.js.map +1 -0
- package/dist/platform-runtime.d.ts +12 -0
- package/dist/platform-runtime.js +14 -0
- package/dist/platform-runtime.js.map +1 -0
- package/dist/reality/Attachment.d.ts +19 -0
- package/dist/reality/Attachment.js +39 -0
- package/dist/reality/Attachment.js.map +1 -0
- package/dist/reality/component/ModelComponent.d.ts +14 -0
- package/dist/reality/component/ModelComponent.js +11 -0
- package/dist/reality/component/ModelComponent.js.map +1 -0
- package/dist/reality/component/SpatialComponent.d.ts +8 -0
- package/dist/reality/component/SpatialComponent.js +19 -0
- package/dist/reality/component/SpatialComponent.js.map +1 -0
- package/dist/reality/component/index.d.ts +8 -0
- package/dist/reality/component/index.js +3 -0
- package/dist/reality/component/index.js.map +1 -0
- package/dist/reality/entity/SpatialEntity.d.ts +7 -0
- package/dist/reality/entity/SpatialEntity.js +291 -0
- package/dist/reality/entity/SpatialEntity.js.map +1 -0
- package/dist/reality/entity/SpatialModelEntity.d.ts +17 -0
- package/dist/reality/entity/SpatialModelEntity.js +17 -0
- package/dist/reality/entity/SpatialModelEntity.js.map +1 -0
- package/dist/reality/entity/index.d.ts +8 -0
- package/dist/reality/entity/index.js +3 -0
- package/dist/reality/entity/index.js.map +1 -0
- package/dist/reality/geometry/SpatialBoxGeometry.d.ts +16 -0
- package/dist/reality/geometry/SpatialBoxGeometry.js +13 -0
- package/dist/reality/geometry/SpatialBoxGeometry.js.map +1 -0
- package/dist/reality/geometry/SpatialConeGeometry.d.ts +16 -0
- package/dist/reality/geometry/SpatialConeGeometry.js +13 -0
- package/dist/reality/geometry/SpatialConeGeometry.js.map +1 -0
- package/dist/reality/geometry/SpatialCylinderGeometry.d.ts +16 -0
- package/dist/reality/geometry/SpatialCylinderGeometry.js +13 -0
- package/dist/reality/geometry/SpatialCylinderGeometry.js.map +1 -0
- package/dist/reality/geometry/SpatialGeometry.d.ts +7 -0
- package/dist/reality/geometry/SpatialGeometry.js +13 -0
- package/dist/reality/geometry/SpatialGeometry.js.map +1 -0
- package/dist/reality/geometry/SpatialPlaneGeometry.d.ts +16 -0
- package/dist/reality/geometry/SpatialPlaneGeometry.js +13 -0
- package/dist/reality/geometry/SpatialPlaneGeometry.js.map +1 -0
- package/dist/reality/geometry/SpatialSphereGeometry.d.ts +16 -0
- package/dist/reality/geometry/SpatialSphereGeometry.js +13 -0
- package/dist/reality/geometry/SpatialSphereGeometry.js.map +1 -0
- package/dist/reality/geometry/index.d.ts +12 -0
- package/dist/reality/geometry/index.js +7 -0
- package/dist/reality/geometry/index.js.map +1 -0
- package/dist/reality/index.d.ts +18 -0
- package/dist/reality/index.js +7 -0
- package/dist/reality/index.js.map +1 -0
- package/dist/reality/material/SpatialMaterial.d.ts +7 -0
- package/dist/reality/material/SpatialMaterial.js +13 -0
- package/dist/reality/material/SpatialMaterial.js.map +1 -0
- package/dist/reality/material/SpatialUnlitMaterial.d.ts +16 -0
- package/dist/reality/material/SpatialUnlitMaterial.js +16 -0
- package/dist/reality/material/SpatialUnlitMaterial.js.map +1 -0
- package/dist/reality/material/index.d.ts +8 -0
- package/dist/reality/material/index.js +3 -0
- package/dist/reality/material/index.js.map +1 -0
- package/dist/reality/realityCreator.d.ts +22 -0
- package/dist/reality/realityCreator.js +89 -0
- package/dist/reality/realityCreator.js.map +1 -0
- package/dist/reality/resource/SpatialModelAsset.d.ts +15 -0
- package/dist/reality/resource/SpatialModelAsset.js +12 -0
- package/dist/reality/resource/SpatialModelAsset.js.map +1 -0
- package/dist/reality/resource/SpatialTextureResource.d.ts +16 -0
- package/dist/reality/resource/SpatialTextureResource.js +16 -0
- package/dist/reality/resource/SpatialTextureResource.js.map +1 -0
- package/dist/reality/resource/index.d.ts +9 -0
- package/dist/reality/resource/index.js +3 -0
- package/dist/reality/resource/index.js.map +1 -0
- package/dist/runtime/WebSpatialRuntimeError.d.ts +10 -0
- package/dist/runtime/WebSpatialRuntimeError.js +14 -0
- package/dist/runtime/WebSpatialRuntimeError.js.map +1 -0
- package/dist/runtime/capability-data.d.ts +12 -0
- package/dist/runtime/capability-data.js +134 -0
- package/dist/runtime/capability-data.js.map +1 -0
- package/dist/runtime/index.d.ts +8 -0
- package/dist/runtime/index.js +27 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/jsbAdapterPlatform.d.ts +9 -0
- package/dist/runtime/jsbAdapterPlatform.js +38 -0
- package/dist/runtime/jsbAdapterPlatform.js.map +1 -0
- package/dist/runtime/keys.d.ts +34 -0
- package/dist/runtime/keys.js +122 -0
- package/dist/runtime/keys.js.map +1 -0
- package/dist/runtime/semver.d.ts +8 -0
- package/dist/runtime/semver.js +32 -0
- package/dist/runtime/semver.js.map +1 -0
- package/dist/runtime/supports.d.ts +22 -0
- package/dist/runtime/supports.js +78 -0
- package/dist/runtime/supports.js.map +1 -0
- package/dist/runtime/types.d.ts +12 -0
- package/dist/runtime/types.js +1 -0
- package/dist/runtime/types.js.map +1 -0
- package/dist/runtime/userAgent.d.ts +20 -0
- package/dist/runtime/userAgent.js +41 -0
- package/dist/runtime/userAgent.js.map +1 -0
- package/dist/scene-polyfill.d.ts +18 -0
- package/dist/scene-polyfill.js +480 -0
- package/dist/scene-polyfill.js.map +1 -0
- package/dist/spatial-host.d.ts +13 -0
- package/dist/spatial-host.js +18 -0
- package/dist/spatial-host.js.map +1 -0
- package/dist/spatial-window-polyfill.d.ts +3 -0
- package/dist/spatial-window-polyfill.js +155 -0
- package/dist/spatial-window-polyfill.js.map +1 -0
- package/dist/spatializedElementMotion-_0XWPQCE.d.ts +1009 -0
- package/dist/types/animation.d.ts +7 -0
- package/dist/types/animation.js +1 -0
- package/dist/types/animation.js.map +1 -0
- package/dist/types/global.d.ts +38 -0
- package/dist/types/global.js +1 -0
- package/dist/types/global.js.map +1 -0
- package/dist/types/internal.d.ts +7 -0
- package/dist/types/internal.js +12 -0
- package/dist/types/internal.js.map +1 -0
- package/dist/types/motion/index.d.ts +7 -0
- package/dist/types/motion/index.js +3 -0
- package/dist/types/motion/index.js.map +1 -0
- package/dist/types/motion/spatializedElementMotion.d.ts +7 -0
- package/dist/types/motion/spatializedElementMotion.js +1 -0
- package/dist/types/motion/spatializedElementMotion.js.map +1 -0
- package/dist/types/motion/spatializedMotion.d.ts +7 -0
- package/dist/types/motion/spatializedMotion.js +16 -0
- package/dist/types/motion/spatializedMotion.js.map +1 -0
- package/dist/types/motion/spatializedPlayback.d.ts +11 -0
- package/dist/types/motion/spatializedPlayback.js +1 -0
- package/dist/types/motion/spatializedPlayback.js.map +1 -0
- package/dist/types/motion/spatializedVisual.d.ts +35 -0
- package/dist/types/motion/spatializedVisual.js +1 -0
- package/dist/types/motion/spatializedVisual.js.map +1 -0
- package/dist/types/types.d.ts +7 -0
- package/dist/types/types.js +117 -0
- package/dist/types/types.js.map +1 -0
- package/dist/utils.d.ts +44 -0
- package/dist/utils.js +86 -0
- package/dist/utils.js.map +1 -0
- package/package.json +20 -4
- package/src/JSBCommand.ts +148 -91
- package/src/Spatial.ts +0 -21
- package/src/SpatialObject.ts +10 -0
- package/src/SpatialScene.ts +1 -5
- package/src/SpatialSession.ts +17 -3
- package/src/Spatialized2DElement.ts +5 -0
- package/src/SpatializedDynamic3DElement.ts +5 -1
- package/src/SpatializedElement.ts +29 -0
- package/src/SpatializedElementCreator.ts +6 -4
- package/src/SpatializedStatic3DElement.test.ts +99 -0
- package/src/SpatializedStatic3DElement.ts +141 -4
- package/src/WebMsgCommand.ts +50 -0
- package/src/coverage-boost.test.ts +258 -316
- package/src/index.ts +28 -12
- package/src/install-polyfills.ts +38 -0
- package/src/jsbcommand.coverage.test.ts +42 -48
- package/src/motion/AnimationObject.test.ts +421 -0
- package/src/motion/AnimationObject.ts +208 -0
- package/src/motion/compute/index.ts +10 -0
- package/src/motion/compute/motionPropertyValues.test.ts +55 -0
- package/src/motion/compute/motionPropertyValues.ts +70 -0
- package/src/motion/compute/normalize.test.ts +99 -0
- package/src/motion/compute/normalize.ts +289 -0
- package/src/motion/compute/validate.test.ts +229 -0
- package/src/motion/compute/validate.ts +156 -0
- package/src/motion/index.ts +2 -0
- package/src/motion/native/serializeMotionTimeline.test.ts +61 -0
- package/src/motion/native/serializeMotionTimeline.ts +27 -0
- package/src/platform-adapter/CommandResultUtils.ts +2 -2
- package/src/platform-adapter/createPlatformSync.ts +36 -0
- package/src/platform-adapter/index.ts +5 -51
- package/src/platform-adapter/interface.ts +35 -23
- package/src/platform-adapter/pico-os/PicoOSPlatform.ts +156 -59
- package/src/platform-adapter/puppeteer/PuppeteerPlatform.ts +37 -11
- package/src/platform-adapter/spatialRequestMetadata.test.ts +175 -0
- package/src/platform-adapter/spatialRequestMetadata.ts +48 -0
- package/src/platform-adapter/spatialSceneQuery.ts +17 -0
- package/src/platform-adapter/vision-os/VisionOSPlatform.ts +60 -24
- package/src/platform-runtime.ts +13 -0
- package/src/reality/Attachment.ts +2 -2
- package/src/reality/entity/SpatialEntity.ts +127 -2
- package/src/reality/realityCreator.ts +15 -1
- package/src/reality/resource/SpatialTextureResource.ts +16 -0
- package/src/reality/resource/index.ts +1 -0
- package/src/runtime/WebSpatialRuntimeError.ts +16 -0
- package/src/runtime/capability-data.ts +213 -0
- package/src/runtime/contract-review.test.ts +44 -0
- package/src/runtime/index.ts +17 -0
- package/src/runtime/jsbAdapterPlatform.test.ts +36 -0
- package/src/runtime/jsbAdapterPlatform.ts +51 -0
- package/src/runtime/keys.ts +140 -0
- package/src/runtime/semver.ts +33 -0
- package/src/runtime/supports.test.ts +346 -0
- package/src/runtime/supports.ts +112 -0
- package/src/runtime/types.ts +11 -0
- package/src/runtime/useAnimation.capability.test.ts +275 -0
- package/src/runtime/userAgent.ts +64 -0
- package/src/scene-polyfill.manifest.test.ts +312 -9
- package/src/scene-polyfill.request-metadata.test.ts +39 -0
- package/src/scene-polyfill.test.ts +33 -94
- package/src/scene-polyfill.ts +125 -92
- package/src/spatial-host.ts +25 -0
- package/src/spatial-window-polyfill.ts +18 -2
- package/src/transform-roundtrip.test.ts +90 -0
- package/src/types/animation.ts +224 -0
- package/src/types/{global.d.ts → global.ts} +10 -12
- package/src/types/motion/index.ts +10 -0
- package/src/types/motion/spatializedElementMotion.ts +49 -0
- package/src/types/motion/spatializedMotion.ts +147 -0
- package/src/types/motion/spatializedPlayback.ts +17 -0
- package/src/types/motion/spatializedVisual.ts +24 -0
- package/src/types/types.ts +12 -0
- package/src/utils.ts +54 -0
- package/tsup.config.ts +61 -36
- package/vitest.config.ts +5 -1
- package/dist/iife/index.d.ts +0 -1101
- package/dist/iife/index.global.js +0 -75
- package/dist/iife/index.global.js.map +0 -1
- package/src/platform-adapter/android/AndroidPlatform.ts +0 -133
- package/src/platform-adapter/ssr/SSRPlatform.ts +0 -43
- /package/src/{ssr-polyfill.ts → isSSREnv.ts} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SpatialGeometry } from "./SpatialGeometry";
|
|
2
|
+
class SpatialCylinderGeometry extends SpatialGeometry {
|
|
3
|
+
constructor(id, options) {
|
|
4
|
+
super(id, options);
|
|
5
|
+
this.id = id;
|
|
6
|
+
this.options = options;
|
|
7
|
+
}
|
|
8
|
+
static type = "CylinderGeometry";
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
SpatialCylinderGeometry
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=SpatialCylinderGeometry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/reality/geometry/SpatialCylinderGeometry.ts"],"sourcesContent":["import {\n SpatialGeometryType,\n SpatialCylinderGeometryOptions,\n} from '../../types/types'\nimport { SpatialGeometry } from './SpatialGeometry'\n\nexport class SpatialCylinderGeometry extends SpatialGeometry {\n static type: SpatialGeometryType = 'CylinderGeometry'\n constructor(\n public id: string,\n public options: SpatialCylinderGeometryOptions,\n ) {\n super(id, options)\n }\n}\n"],"mappings":"AAIA,SAAS,uBAAuB;AAEzB,MAAM,gCAAgC,gBAAgB;AAAA,EAE3D,YACS,IACA,SACP;AACA,UAAM,IAAI,OAAO;AAHV;AACA;AAAA,EAGT;AAAA,EANA,OAAO,OAA4B;AAOrC;","names":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import '../../SpatialObject.js';
|
|
2
|
+
export { N as SpatialGeometry } from '../../spatializedElementMotion-_0XWPQCE.js';
|
|
3
|
+
import '../../types/motion/spatializedVisual.js';
|
|
4
|
+
import '../../types/motion/spatializedPlayback.js';
|
|
5
|
+
import '../../types/global.js';
|
|
6
|
+
import '../../physicalMetrics-W5uZ5xKb.js';
|
|
7
|
+
import '../component/SpatialComponent.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SpatialObject } from "../../SpatialObject";
|
|
2
|
+
class SpatialGeometry extends SpatialObject {
|
|
3
|
+
constructor(id, options) {
|
|
4
|
+
super(id);
|
|
5
|
+
this.id = id;
|
|
6
|
+
this.options = options;
|
|
7
|
+
}
|
|
8
|
+
static type;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
SpatialGeometry
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=SpatialGeometry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/reality/geometry/SpatialGeometry.ts"],"sourcesContent":["import { SpatialObject } from '../../SpatialObject'\nimport { SpatialGeometryOptions, SpatialGeometryType } from '../../types/types'\n\nexport class SpatialGeometry extends SpatialObject {\n static type: SpatialGeometryType\n constructor(\n public id: string,\n public options: SpatialGeometryOptions,\n ) {\n super(id)\n }\n}\n"],"mappings":"AAAA,SAAS,qBAAqB;AAGvB,MAAM,wBAAwB,cAAc;AAAA,EAEjD,YACS,IACA,SACP;AACA,UAAM,EAAE;AAHD;AACA;AAAA,EAGT;AAAA,EANA,OAAO;AAOT;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { N as SpatialGeometry, $ as SpatialPlaneGeometryOptions, R as SpatialGeometryType } from '../../spatializedElementMotion-_0XWPQCE.js';
|
|
2
|
+
import '../../types/motion/spatializedVisual.js';
|
|
3
|
+
import '../../types/motion/spatializedPlayback.js';
|
|
4
|
+
import '../../types/global.js';
|
|
5
|
+
import '../../physicalMetrics-W5uZ5xKb.js';
|
|
6
|
+
import '../../SpatialObject.js';
|
|
7
|
+
import '../component/SpatialComponent.js';
|
|
8
|
+
|
|
9
|
+
declare class SpatialPlaneGeometry extends SpatialGeometry {
|
|
10
|
+
id: string;
|
|
11
|
+
options: SpatialPlaneGeometryOptions;
|
|
12
|
+
static type: SpatialGeometryType;
|
|
13
|
+
constructor(id: string, options: SpatialPlaneGeometryOptions);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { SpatialPlaneGeometry };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SpatialGeometry } from "./SpatialGeometry";
|
|
2
|
+
class SpatialPlaneGeometry extends SpatialGeometry {
|
|
3
|
+
constructor(id, options) {
|
|
4
|
+
super(id, options);
|
|
5
|
+
this.id = id;
|
|
6
|
+
this.options = options;
|
|
7
|
+
}
|
|
8
|
+
static type = "PlaneGeometry";
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
SpatialPlaneGeometry
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=SpatialPlaneGeometry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/reality/geometry/SpatialPlaneGeometry.ts"],"sourcesContent":["import {\n SpatialGeometryType,\n SpatialPlaneGeometryOptions,\n} from '../../types/types'\nimport { SpatialGeometry } from './SpatialGeometry'\n\nexport class SpatialPlaneGeometry extends SpatialGeometry {\n static type: SpatialGeometryType = 'PlaneGeometry'\n constructor(\n public id: string,\n public options: SpatialPlaneGeometryOptions,\n ) {\n super(id, options)\n }\n}\n"],"mappings":"AAIA,SAAS,uBAAuB;AAEzB,MAAM,6BAA6B,gBAAgB;AAAA,EAExD,YACS,IACA,SACP;AACA,UAAM,IAAI,OAAO;AAHV;AACA;AAAA,EAGT;AAAA,EANA,OAAO,OAA4B;AAOrC;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { N as SpatialGeometry, a9 as SpatialSphereGeometryOptions, R as SpatialGeometryType } from '../../spatializedElementMotion-_0XWPQCE.js';
|
|
2
|
+
import '../../types/motion/spatializedVisual.js';
|
|
3
|
+
import '../../types/motion/spatializedPlayback.js';
|
|
4
|
+
import '../../types/global.js';
|
|
5
|
+
import '../../physicalMetrics-W5uZ5xKb.js';
|
|
6
|
+
import '../../SpatialObject.js';
|
|
7
|
+
import '../component/SpatialComponent.js';
|
|
8
|
+
|
|
9
|
+
declare class SpatialSphereGeometry extends SpatialGeometry {
|
|
10
|
+
id: string;
|
|
11
|
+
options: SpatialSphereGeometryOptions;
|
|
12
|
+
static type: SpatialGeometryType;
|
|
13
|
+
constructor(id: string, options: SpatialSphereGeometryOptions);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { SpatialSphereGeometry };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SpatialGeometry } from "./SpatialGeometry";
|
|
2
|
+
class SpatialSphereGeometry extends SpatialGeometry {
|
|
3
|
+
constructor(id, options) {
|
|
4
|
+
super(id, options);
|
|
5
|
+
this.id = id;
|
|
6
|
+
this.options = options;
|
|
7
|
+
}
|
|
8
|
+
static type = "SphereGeometry";
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
SpatialSphereGeometry
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=SpatialSphereGeometry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/reality/geometry/SpatialSphereGeometry.ts"],"sourcesContent":["import {\n SpatialGeometryType,\n SpatialSphereGeometryOptions,\n} from '../../types/types'\nimport { SpatialGeometry } from './SpatialGeometry'\n\nexport class SpatialSphereGeometry extends SpatialGeometry {\n static type: SpatialGeometryType = 'SphereGeometry'\n constructor(\n public id: string,\n public options: SpatialSphereGeometryOptions,\n ) {\n super(id, options)\n }\n}\n"],"mappings":"AAIA,SAAS,uBAAuB;AAEzB,MAAM,8BAA8B,gBAAgB;AAAA,EAEzD,YACS,IACA,SACP;AACA,UAAM,IAAI,OAAO;AAHV;AACA;AAAA,EAGT;AAAA,EANA,OAAO,OAA4B;AAOrC;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { N as SpatialGeometry } from '../../spatializedElementMotion-_0XWPQCE.js';
|
|
2
|
+
export { SpatialBoxGeometry } from './SpatialBoxGeometry.js';
|
|
3
|
+
export { SpatialSphereGeometry } from './SpatialSphereGeometry.js';
|
|
4
|
+
export { SpatialCylinderGeometry } from './SpatialCylinderGeometry.js';
|
|
5
|
+
export { SpatialPlaneGeometry } from './SpatialPlaneGeometry.js';
|
|
6
|
+
export { SpatialConeGeometry } from './SpatialConeGeometry.js';
|
|
7
|
+
import '../../types/motion/spatializedVisual.js';
|
|
8
|
+
import '../../types/motion/spatializedPlayback.js';
|
|
9
|
+
import '../../types/global.js';
|
|
10
|
+
import '../../physicalMetrics-W5uZ5xKb.js';
|
|
11
|
+
import '../../SpatialObject.js';
|
|
12
|
+
import '../component/SpatialComponent.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./SpatialGeometry";
|
|
2
|
+
export * from "./SpatialBoxGeometry";
|
|
3
|
+
export * from "./SpatialSphereGeometry";
|
|
4
|
+
export * from "./SpatialCylinderGeometry";
|
|
5
|
+
export * from "./SpatialPlaneGeometry";
|
|
6
|
+
export * from "./SpatialConeGeometry";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/reality/geometry/index.ts"],"sourcesContent":["export * from './SpatialGeometry'\nexport * from './SpatialBoxGeometry'\nexport * from './SpatialSphereGeometry'\nexport * from './SpatialCylinderGeometry'\nexport * from './SpatialPlaneGeometry'\nexport * from './SpatialConeGeometry'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { H as SpatialEntity, N as SpatialGeometry, X as SpatialMaterial } from '../spatializedElementMotion-_0XWPQCE.js';
|
|
2
|
+
export { SpatialModelEntity } from './entity/SpatialModelEntity.js';
|
|
3
|
+
export { SpatialComponent } from './component/SpatialComponent.js';
|
|
4
|
+
export { ModelComponent } from './component/ModelComponent.js';
|
|
5
|
+
export { SpatialUnlitMaterial } from './material/SpatialUnlitMaterial.js';
|
|
6
|
+
export { SpatialBoxGeometry } from './geometry/SpatialBoxGeometry.js';
|
|
7
|
+
export { SpatialSphereGeometry } from './geometry/SpatialSphereGeometry.js';
|
|
8
|
+
export { SpatialCylinderGeometry } from './geometry/SpatialCylinderGeometry.js';
|
|
9
|
+
export { SpatialPlaneGeometry } from './geometry/SpatialPlaneGeometry.js';
|
|
10
|
+
export { SpatialConeGeometry } from './geometry/SpatialConeGeometry.js';
|
|
11
|
+
export { SpatialModelAsset } from './resource/SpatialModelAsset.js';
|
|
12
|
+
export { SpatialTextureResource } from './resource/SpatialTextureResource.js';
|
|
13
|
+
export { Attachment, createAttachmentEntity } from './Attachment.js';
|
|
14
|
+
import '../types/motion/spatializedVisual.js';
|
|
15
|
+
import '../types/motion/spatializedPlayback.js';
|
|
16
|
+
import '../types/global.js';
|
|
17
|
+
import '../physicalMetrics-W5uZ5xKb.js';
|
|
18
|
+
import '../SpatialObject.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/reality/index.ts"],"sourcesContent":["export * from './entity'\nexport * from './component'\nexport * from './material'\nexport * from './geometry'\nexport * from './resource'\nexport * from './Attachment'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import '../../SpatialObject.js';
|
|
2
|
+
export { X as SpatialMaterial } from '../../spatializedElementMotion-_0XWPQCE.js';
|
|
3
|
+
import '../../types/motion/spatializedVisual.js';
|
|
4
|
+
import '../../types/motion/spatializedPlayback.js';
|
|
5
|
+
import '../../types/global.js';
|
|
6
|
+
import '../../physicalMetrics-W5uZ5xKb.js';
|
|
7
|
+
import '../component/SpatialComponent.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SpatialObject } from "../../SpatialObject";
|
|
2
|
+
class SpatialMaterial extends SpatialObject {
|
|
3
|
+
constructor(id, type) {
|
|
4
|
+
super(id);
|
|
5
|
+
this.id = id;
|
|
6
|
+
this.type = type;
|
|
7
|
+
this.type = type;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
SpatialMaterial
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=SpatialMaterial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/reality/material/SpatialMaterial.ts"],"sourcesContent":["import { SpatialObject } from '../../SpatialObject'\nimport { SpatialMaterialType } from '../../types/types'\n\nexport abstract class SpatialMaterial extends SpatialObject {\n constructor(\n public id: string,\n public type: SpatialMaterialType,\n ) {\n super(id)\n this.type = type\n }\n\n abstract updateProperties(properties: any): void\n}\n"],"mappings":"AAAA,SAAS,qBAAqB;AAGvB,MAAe,wBAAwB,cAAc;AAAA,EAC1D,YACS,IACA,MACP;AACA,UAAM,EAAE;AAHD;AACA;AAGP,SAAK,OAAO;AAAA,EACd;AAGF;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { X as SpatialMaterial, ad as SpatialUnlitMaterialOptions, aK as CommandResult } from '../../spatializedElementMotion-_0XWPQCE.js';
|
|
2
|
+
import '../../types/motion/spatializedVisual.js';
|
|
3
|
+
import '../../types/motion/spatializedPlayback.js';
|
|
4
|
+
import '../../types/global.js';
|
|
5
|
+
import '../../physicalMetrics-W5uZ5xKb.js';
|
|
6
|
+
import '../../SpatialObject.js';
|
|
7
|
+
import '../component/SpatialComponent.js';
|
|
8
|
+
|
|
9
|
+
declare class SpatialUnlitMaterial extends SpatialMaterial {
|
|
10
|
+
id: string;
|
|
11
|
+
options: SpatialUnlitMaterialOptions;
|
|
12
|
+
constructor(id: string, options: SpatialUnlitMaterialOptions);
|
|
13
|
+
updateProperties(properties: Partial<SpatialUnlitMaterialOptions>): Promise<CommandResult<any>>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { SpatialUnlitMaterial };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UpdateUnlitMaterialProperties } from "../../JSBCommand";
|
|
2
|
+
import { SpatialMaterial } from "./SpatialMaterial";
|
|
3
|
+
class SpatialUnlitMaterial extends SpatialMaterial {
|
|
4
|
+
constructor(id, options) {
|
|
5
|
+
super(id, "unlit");
|
|
6
|
+
this.id = id;
|
|
7
|
+
this.options = options;
|
|
8
|
+
}
|
|
9
|
+
updateProperties(properties) {
|
|
10
|
+
return new UpdateUnlitMaterialProperties(this, properties).execute();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
SpatialUnlitMaterial
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=SpatialUnlitMaterial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/reality/material/SpatialUnlitMaterial.ts"],"sourcesContent":["import { UpdateUnlitMaterialProperties } from '../../JSBCommand'\nimport { SpatialUnlitMaterialOptions } from '../../types/types'\nimport { SpatialMaterial } from './SpatialMaterial'\n\nexport class SpatialUnlitMaterial extends SpatialMaterial {\n constructor(\n public id: string,\n public options: SpatialUnlitMaterialOptions,\n ) {\n super(id, 'unlit')\n }\n\n updateProperties(properties: Partial<SpatialUnlitMaterialOptions>) {\n return new UpdateUnlitMaterialProperties(this, properties).execute()\n }\n}\n"],"mappings":"AAAA,SAAS,qCAAqC;AAE9C,SAAS,uBAAuB;AAEzB,MAAM,6BAA6B,gBAAgB;AAAA,EACxD,YACS,IACA,SACP;AACA,UAAM,IAAI,OAAO;AAHV;AACA;AAAA,EAGT;AAAA,EAEA,iBAAiB,YAAkD;AACjE,WAAO,IAAI,8BAA8B,MAAM,UAAU,EAAE,QAAQ;AAAA,EACrE;AACF;","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { SpatialUnlitMaterial } from './SpatialUnlitMaterial.js';
|
|
2
|
+
export { X as SpatialMaterial } from '../../spatializedElementMotion-_0XWPQCE.js';
|
|
3
|
+
import '../../types/motion/spatializedVisual.js';
|
|
4
|
+
import '../../types/motion/spatializedPlayback.js';
|
|
5
|
+
import '../../types/global.js';
|
|
6
|
+
import '../../physicalMetrics-W5uZ5xKb.js';
|
|
7
|
+
import '../../SpatialObject.js';
|
|
8
|
+
import '../component/SpatialComponent.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/reality/material/index.ts"],"sourcesContent":["export * from './SpatialUnlitMaterial'\nexport * from './SpatialMaterial'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { M as ModelAssetOptions, m as ModelComponentOptions, L as SpatialEntityUserData, H as SpatialEntity, N as SpatialGeometry, O as SpatialGeometryOptions, _ as SpatialModelEntityCreationOptions, ac as SpatialTextureResourceOptions, ad as SpatialUnlitMaterialOptions } from '../spatializedElementMotion-_0XWPQCE.js';
|
|
2
|
+
import { SpatialModelEntity } from './entity/SpatialModelEntity.js';
|
|
3
|
+
import { ModelComponent } from './component/ModelComponent.js';
|
|
4
|
+
import { SpatialUnlitMaterial } from './material/SpatialUnlitMaterial.js';
|
|
5
|
+
import { SpatialModelAsset } from './resource/SpatialModelAsset.js';
|
|
6
|
+
import { SpatialTextureResource } from './resource/SpatialTextureResource.js';
|
|
7
|
+
import '../types/motion/spatializedVisual.js';
|
|
8
|
+
import '../types/motion/spatializedPlayback.js';
|
|
9
|
+
import '../types/global.js';
|
|
10
|
+
import '../physicalMetrics-W5uZ5xKb.js';
|
|
11
|
+
import '../SpatialObject.js';
|
|
12
|
+
import './component/SpatialComponent.js';
|
|
13
|
+
|
|
14
|
+
declare function createSpatialEntity(userData?: SpatialEntityUserData): Promise<SpatialEntity>;
|
|
15
|
+
declare function createSpatialGeometry<T extends SpatialGeometry>(ctor: new (...args: any[]) => T, options: SpatialGeometryOptions): Promise<T>;
|
|
16
|
+
declare function createSpatialUnlitMaterial(options: SpatialUnlitMaterialOptions): Promise<SpatialUnlitMaterial>;
|
|
17
|
+
declare function createModelComponent(options: ModelComponentOptions): Promise<ModelComponent>;
|
|
18
|
+
declare function createSpatialModelEntity(options: SpatialModelEntityCreationOptions, userData?: SpatialEntityUserData): Promise<SpatialModelEntity>;
|
|
19
|
+
declare function createModelAsset(options: ModelAssetOptions): Promise<SpatialModelAsset>;
|
|
20
|
+
declare function createSpatialTexture(options: SpatialTextureResourceOptions): Promise<SpatialTextureResource>;
|
|
21
|
+
|
|
22
|
+
export { createModelAsset, createModelComponent, createSpatialEntity, createSpatialGeometry, createSpatialModelEntity, createSpatialTexture, createSpatialUnlitMaterial };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CreateModelComponentCommand,
|
|
3
|
+
CreateModelAssetCommand,
|
|
4
|
+
CreateSpatialEntityCommand,
|
|
5
|
+
CreateSpatialGeometryCommand,
|
|
6
|
+
CreateSpatialModelEntityCommand,
|
|
7
|
+
CreateSpatialUnlitMaterialCommand,
|
|
8
|
+
CreateTextureCommand
|
|
9
|
+
} from "../JSBCommand";
|
|
10
|
+
import { SpatialEntity, SpatialModelEntity } from "./entity";
|
|
11
|
+
import { ModelComponent } from "./component";
|
|
12
|
+
import { SpatialUnlitMaterial } from "./material";
|
|
13
|
+
import { SpatialModelAsset, SpatialTextureResource } from "./resource";
|
|
14
|
+
async function createSpatialEntity(userData) {
|
|
15
|
+
const result = await new CreateSpatialEntityCommand(userData?.name).execute();
|
|
16
|
+
if (!result.success) {
|
|
17
|
+
throw new Error("createSpatialEntity failed:" + result?.errorMessage);
|
|
18
|
+
} else {
|
|
19
|
+
const { id } = result.data;
|
|
20
|
+
return new SpatialEntity(id, userData);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async function createSpatialGeometry(ctor, options) {
|
|
24
|
+
const result = await new CreateSpatialGeometryCommand(
|
|
25
|
+
ctor.type,
|
|
26
|
+
options
|
|
27
|
+
).execute();
|
|
28
|
+
if (!result.success) {
|
|
29
|
+
throw new Error("createSpatialGeometry failed:" + result?.errorMessage);
|
|
30
|
+
} else {
|
|
31
|
+
const { id } = result.data;
|
|
32
|
+
return new ctor(id, options);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async function createSpatialUnlitMaterial(options) {
|
|
36
|
+
const result = await new CreateSpatialUnlitMaterialCommand(options).execute();
|
|
37
|
+
if (!result.success) {
|
|
38
|
+
throw new Error("createSpatialUnlitMaterial failed:" + result?.errorMessage);
|
|
39
|
+
} else {
|
|
40
|
+
const { id } = result.data;
|
|
41
|
+
return new SpatialUnlitMaterial(id, options);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async function createModelComponent(options) {
|
|
45
|
+
const result = await new CreateModelComponentCommand(options).execute();
|
|
46
|
+
if (!result.success) {
|
|
47
|
+
throw new Error("createModelComponent failed:" + result?.errorMessage);
|
|
48
|
+
} else {
|
|
49
|
+
const { id } = result.data;
|
|
50
|
+
return new ModelComponent(id, options);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
async function createSpatialModelEntity(options, userData) {
|
|
54
|
+
const result = await new CreateSpatialModelEntityCommand(options).execute();
|
|
55
|
+
if (!result.success) {
|
|
56
|
+
throw new Error("createSpatialModelEntity failed:" + result?.errorMessage);
|
|
57
|
+
} else {
|
|
58
|
+
const { id } = result.data;
|
|
59
|
+
return new SpatialModelEntity(id, options, userData);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
async function createModelAsset(options) {
|
|
63
|
+
const result = await new CreateModelAssetCommand(options).execute();
|
|
64
|
+
if (!result.success) {
|
|
65
|
+
throw new Error("createModelAsset failed:" + result?.errorMessage);
|
|
66
|
+
} else {
|
|
67
|
+
const { id } = result.data;
|
|
68
|
+
return new SpatialModelAsset(id, options);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async function createSpatialTexture(options) {
|
|
72
|
+
const result = await new CreateTextureCommand(options.url).execute();
|
|
73
|
+
if (!result.success) {
|
|
74
|
+
throw new Error("createSpatialTexture failed:" + result?.errorMessage);
|
|
75
|
+
} else {
|
|
76
|
+
const { id } = result.data;
|
|
77
|
+
return new SpatialTextureResource(id, options);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export {
|
|
81
|
+
createModelAsset,
|
|
82
|
+
createModelComponent,
|
|
83
|
+
createSpatialEntity,
|
|
84
|
+
createSpatialGeometry,
|
|
85
|
+
createSpatialModelEntity,
|
|
86
|
+
createSpatialTexture,
|
|
87
|
+
createSpatialUnlitMaterial
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=realityCreator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/reality/realityCreator.ts"],"sourcesContent":["import {\n CreateModelComponentCommand,\n CreateModelAssetCommand,\n CreateSpatialEntityCommand,\n CreateSpatialGeometryCommand,\n CreateSpatialModelEntityCommand,\n CreateSpatialUnlitMaterialCommand,\n CreateTextureCommand,\n} from '../JSBCommand'\nimport {\n ModelComponentOptions,\n ModelAssetOptions,\n SpatialGeometryOptions,\n SpatialModelEntityCreationOptions,\n SpatialUnlitMaterialOptions,\n SpatialEntityUserData,\n SpatialTextureResourceOptions,\n} from '../types/types'\nimport { SpatialEntity, SpatialModelEntity } from './entity'\nimport { ModelComponent } from './component'\nimport { SpatialGeometry } from './geometry'\nimport { SpatialUnlitMaterial } from './material'\nimport { SpatialModelAsset, SpatialTextureResource } from './resource'\n\nexport async function createSpatialEntity(\n userData?: SpatialEntityUserData,\n): Promise<SpatialEntity> {\n const result = await new CreateSpatialEntityCommand(userData?.name).execute()\n if (!result.success) {\n throw new Error('createSpatialEntity failed:' + result?.errorMessage)\n } else {\n const { id } = result.data\n return new SpatialEntity(id, userData)\n }\n}\n\nexport async function createSpatialGeometry<T extends SpatialGeometry>(\n ctor: new (...args: any[]) => T,\n options: SpatialGeometryOptions,\n) {\n const result = await new CreateSpatialGeometryCommand(\n (ctor as any).type,\n options,\n ).execute()\n if (!result.success) {\n throw new Error('createSpatialGeometry failed:' + result?.errorMessage)\n } else {\n const { id } = result.data\n return new ctor(id, options) as T\n }\n}\n\nexport async function createSpatialUnlitMaterial(\n options: SpatialUnlitMaterialOptions,\n) {\n const result = await new CreateSpatialUnlitMaterialCommand(options).execute()\n if (!result.success) {\n throw new Error('createSpatialUnlitMaterial failed:' + result?.errorMessage)\n } else {\n const { id } = result.data\n return new SpatialUnlitMaterial(id, options)\n }\n}\n\nexport async function createModelComponent(options: ModelComponentOptions) {\n const result = await new CreateModelComponentCommand(options).execute()\n if (!result.success) {\n throw new Error('createModelComponent failed:' + result?.errorMessage)\n } else {\n const { id } = result.data\n return new ModelComponent(id, options)\n }\n}\n\nexport async function createSpatialModelEntity(\n options: SpatialModelEntityCreationOptions,\n userData?: SpatialEntityUserData,\n) {\n const result = await new CreateSpatialModelEntityCommand(options).execute()\n if (!result.success) {\n throw new Error('createSpatialModelEntity failed:' + result?.errorMessage)\n } else {\n const { id } = result.data\n return new SpatialModelEntity(id, options, userData)\n }\n}\n\nexport async function createModelAsset(options: ModelAssetOptions) {\n const result = await new CreateModelAssetCommand(options).execute()\n if (!result.success) {\n throw new Error('createModelAsset failed:' + result?.errorMessage)\n } else {\n const { id } = result.data\n return new SpatialModelAsset(id, options)\n }\n}\n\nexport async function createSpatialTexture(\n options: SpatialTextureResourceOptions,\n) {\n const result = await new CreateTextureCommand(options.url).execute()\n if (!result.success) {\n throw new Error('createSpatialTexture failed:' + result?.errorMessage)\n } else {\n const { id } = result.data\n return new SpatialTextureResource(id, options)\n }\n}\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUP,SAAS,eAAe,0BAA0B;AAClD,SAAS,sBAAsB;AAE/B,SAAS,4BAA4B;AACrC,SAAS,mBAAmB,8BAA8B;AAE1D,eAAsB,oBACpB,UACwB;AACxB,QAAM,SAAS,MAAM,IAAI,2BAA2B,UAAU,IAAI,EAAE,QAAQ;AAC5E,MAAI,CAAC,OAAO,SAAS;AACnB,UAAM,IAAI,MAAM,gCAAgC,QAAQ,YAAY;AAAA,EACtE,OAAO;AACL,UAAM,EAAE,GAAG,IAAI,OAAO;AACtB,WAAO,IAAI,cAAc,IAAI,QAAQ;AAAA,EACvC;AACF;AAEA,eAAsB,sBACpB,MACA,SACA;AACA,QAAM,SAAS,MAAM,IAAI;AAAA,IACtB,KAAa;AAAA,IACd;AAAA,EACF,EAAE,QAAQ;AACV,MAAI,CAAC,OAAO,SAAS;AACnB,UAAM,IAAI,MAAM,kCAAkC,QAAQ,YAAY;AAAA,EACxE,OAAO;AACL,UAAM,EAAE,GAAG,IAAI,OAAO;AACtB,WAAO,IAAI,KAAK,IAAI,OAAO;AAAA,EAC7B;AACF;AAEA,eAAsB,2BACpB,SACA;AACA,QAAM,SAAS,MAAM,IAAI,kCAAkC,OAAO,EAAE,QAAQ;AAC5E,MAAI,CAAC,OAAO,SAAS;AACnB,UAAM,IAAI,MAAM,uCAAuC,QAAQ,YAAY;AAAA,EAC7E,OAAO;AACL,UAAM,EAAE,GAAG,IAAI,OAAO;AACtB,WAAO,IAAI,qBAAqB,IAAI,OAAO;AAAA,EAC7C;AACF;AAEA,eAAsB,qBAAqB,SAAgC;AACzE,QAAM,SAAS,MAAM,IAAI,4BAA4B,OAAO,EAAE,QAAQ;AACtE,MAAI,CAAC,OAAO,SAAS;AACnB,UAAM,IAAI,MAAM,iCAAiC,QAAQ,YAAY;AAAA,EACvE,OAAO;AACL,UAAM,EAAE,GAAG,IAAI,OAAO;AACtB,WAAO,IAAI,eAAe,IAAI,OAAO;AAAA,EACvC;AACF;AAEA,eAAsB,yBACpB,SACA,UACA;AACA,QAAM,SAAS,MAAM,IAAI,gCAAgC,OAAO,EAAE,QAAQ;AAC1E,MAAI,CAAC,OAAO,SAAS;AACnB,UAAM,IAAI,MAAM,qCAAqC,QAAQ,YAAY;AAAA,EAC3E,OAAO;AACL,UAAM,EAAE,GAAG,IAAI,OAAO;AACtB,WAAO,IAAI,mBAAmB,IAAI,SAAS,QAAQ;AAAA,EACrD;AACF;AAEA,eAAsB,iBAAiB,SAA4B;AACjE,QAAM,SAAS,MAAM,IAAI,wBAAwB,OAAO,EAAE,QAAQ;AAClE,MAAI,CAAC,OAAO,SAAS;AACnB,UAAM,IAAI,MAAM,6BAA6B,QAAQ,YAAY;AAAA,EACnE,OAAO;AACL,UAAM,EAAE,GAAG,IAAI,OAAO;AACtB,WAAO,IAAI,kBAAkB,IAAI,OAAO;AAAA,EAC1C;AACF;AAEA,eAAsB,qBACpB,SACA;AACA,QAAM,SAAS,MAAM,IAAI,qBAAqB,QAAQ,GAAG,EAAE,QAAQ;AACnE,MAAI,CAAC,OAAO,SAAS;AACnB,UAAM,IAAI,MAAM,iCAAiC,QAAQ,YAAY;AAAA,EACvE,OAAO;AACL,UAAM,EAAE,GAAG,IAAI,OAAO;AACtB,WAAO,IAAI,uBAAuB,IAAI,OAAO;AAAA,EAC/C;AACF;","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SpatialObject } from '../../SpatialObject.js';
|
|
2
|
+
import { M as ModelAssetOptions } from '../../spatializedElementMotion-_0XWPQCE.js';
|
|
3
|
+
import '../../types/motion/spatializedVisual.js';
|
|
4
|
+
import '../../types/motion/spatializedPlayback.js';
|
|
5
|
+
import '../../types/global.js';
|
|
6
|
+
import '../../physicalMetrics-W5uZ5xKb.js';
|
|
7
|
+
import '../component/SpatialComponent.js';
|
|
8
|
+
|
|
9
|
+
declare class SpatialModelAsset extends SpatialObject {
|
|
10
|
+
id: string;
|
|
11
|
+
options: ModelAssetOptions;
|
|
12
|
+
constructor(id: string, options: ModelAssetOptions);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { SpatialModelAsset };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SpatialObject } from "../../SpatialObject";
|
|
2
|
+
class SpatialModelAsset extends SpatialObject {
|
|
3
|
+
constructor(id, options) {
|
|
4
|
+
super(id);
|
|
5
|
+
this.id = id;
|
|
6
|
+
this.options = options;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
SpatialModelAsset
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=SpatialModelAsset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/reality/resource/SpatialModelAsset.ts"],"sourcesContent":["import { SpatialObject } from '../../SpatialObject'\nimport { ModelAssetOptions } from '../../types/types'\n\nexport class SpatialModelAsset extends SpatialObject {\n constructor(\n public id: string,\n public options: ModelAssetOptions,\n ) {\n super(id)\n }\n}\n"],"mappings":"AAAA,SAAS,qBAAqB;AAGvB,MAAM,0BAA0B,cAAc;AAAA,EACnD,YACS,IACA,SACP;AACA,UAAM,EAAE;AAHD;AACA;AAAA,EAGT;AACF;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ac as SpatialTextureResourceOptions, aK as CommandResult } from '../../spatializedElementMotion-_0XWPQCE.js';
|
|
2
|
+
import { SpatialObject } from '../../SpatialObject.js';
|
|
3
|
+
import '../../types/motion/spatializedVisual.js';
|
|
4
|
+
import '../../types/motion/spatializedPlayback.js';
|
|
5
|
+
import '../../types/global.js';
|
|
6
|
+
import '../../physicalMetrics-W5uZ5xKb.js';
|
|
7
|
+
import '../component/SpatialComponent.js';
|
|
8
|
+
|
|
9
|
+
declare class SpatialTextureResource extends SpatialObject {
|
|
10
|
+
id: string;
|
|
11
|
+
options: SpatialTextureResourceOptions;
|
|
12
|
+
constructor(id: string, options: SpatialTextureResourceOptions);
|
|
13
|
+
updateProperties(properties: Partial<SpatialTextureResourceOptions>): Promise<CommandResult<any>>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { SpatialTextureResource };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SpatialObject } from "../../SpatialObject";
|
|
2
|
+
import { UpdateTexturePropertiesCommand } from "../../JSBCommand";
|
|
3
|
+
class SpatialTextureResource extends SpatialObject {
|
|
4
|
+
constructor(id, options) {
|
|
5
|
+
super(id);
|
|
6
|
+
this.id = id;
|
|
7
|
+
this.options = options;
|
|
8
|
+
}
|
|
9
|
+
updateProperties(properties) {
|
|
10
|
+
return new UpdateTexturePropertiesCommand(this, properties).execute();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
SpatialTextureResource
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=SpatialTextureResource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/reality/resource/SpatialTextureResource.ts"],"sourcesContent":["import { SpatialObject } from '../../SpatialObject'\nimport { SpatialTextureResourceOptions } from '../../types/types'\nimport { UpdateTexturePropertiesCommand } from '../../JSBCommand'\n\nexport class SpatialTextureResource extends SpatialObject {\n constructor(\n public id: string,\n public options: SpatialTextureResourceOptions,\n ) {\n super(id)\n }\n\n updateProperties(properties: Partial<SpatialTextureResourceOptions>) {\n return new UpdateTexturePropertiesCommand(this, properties).execute()\n }\n}\n"],"mappings":"AAAA,SAAS,qBAAqB;AAE9B,SAAS,sCAAsC;AAExC,MAAM,+BAA+B,cAAc;AAAA,EACxD,YACS,IACA,SACP;AACA,UAAM,EAAE;AAHD;AACA;AAAA,EAGT;AAAA,EAEA,iBAAiB,YAAoD;AACnE,WAAO,IAAI,+BAA+B,MAAM,UAAU,EAAE,QAAQ;AAAA,EACtE;AACF;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { SpatialModelAsset } from './SpatialModelAsset.js';
|
|
2
|
+
export { SpatialTextureResource } from './SpatialTextureResource.js';
|
|
3
|
+
import '../../SpatialObject.js';
|
|
4
|
+
import '../../spatializedElementMotion-_0XWPQCE.js';
|
|
5
|
+
import '../../types/motion/spatializedVisual.js';
|
|
6
|
+
import '../../types/motion/spatializedPlayback.js';
|
|
7
|
+
import '../../types/global.js';
|
|
8
|
+
import '../../physicalMetrics-W5uZ5xKb.js';
|
|
9
|
+
import '../component/SpatialComponent.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/reality/resource/index.ts"],"sourcesContent":["export * from './SpatialModelAsset'\nexport * from './SpatialTextureResource'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thrown when a runtime-gated JS API is invoked but `supports('<name>')` is false.
|
|
3
|
+
* See OpenSpec `runtime-capabilities/spec.md` (Unsupported behavior contracts).
|
|
4
|
+
*/
|
|
5
|
+
declare class WebSpatialRuntimeError extends Error {
|
|
6
|
+
readonly capability: string;
|
|
7
|
+
constructor(capability: string, message?: string);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { WebSpatialRuntimeError };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
class WebSpatialRuntimeError extends Error {
|
|
2
|
+
capability;
|
|
3
|
+
constructor(capability, message) {
|
|
4
|
+
super(
|
|
5
|
+
message ?? `Capability "${capability}" is not supported in this WebSpatial runtime`
|
|
6
|
+
);
|
|
7
|
+
this.name = "WebSpatialRuntimeError";
|
|
8
|
+
this.capability = capability;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
WebSpatialRuntimeError
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=WebSpatialRuntimeError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/runtime/WebSpatialRuntimeError.ts"],"sourcesContent":["/**\n * Thrown when a runtime-gated JS API is invoked but `supports('<name>')` is false.\n * See OpenSpec `runtime-capabilities/spec.md` (Unsupported behavior contracts).\n */\nexport class WebSpatialRuntimeError extends Error {\n public readonly capability: string\n\n constructor(capability: string, message?: string) {\n super(\n message ??\n `Capability \"${capability}\" is not supported in this WebSpatial runtime`,\n )\n this.name = 'WebSpatialRuntimeError'\n this.capability = capability\n }\n}\n"],"mappings":"AAIO,MAAM,+BAA+B,MAAM;AAAA,EAChC;AAAA,EAEhB,YAAY,YAAoB,SAAkB;AAChD;AAAA,MACE,WACE,eAAe,UAAU;AAAA,IAC7B;AACA,SAAK,OAAO;AACZ,SAAK,aAAa;AAAA,EACpB;AACF;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type CapabilityVersionRow = {
|
|
2
|
+
/** Semver string from `WSAppShell` / `PicoWebApp` (see `review.md` §4). */
|
|
3
|
+
version: string;
|
|
4
|
+
/** Top-level keys and `name:subToken` compound keys. */
|
|
5
|
+
flags: Record<string, boolean>;
|
|
6
|
+
};
|
|
7
|
+
declare const CAPABILITY_TABLE: {
|
|
8
|
+
visionos: CapabilityVersionRow[];
|
|
9
|
+
picoos: CapabilityVersionRow[];
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { CAPABILITY_TABLE, type CapabilityVersionRow };
|