@iwsdk/core 0.2.2 → 0.3.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 +94 -0
- package/dist/asset/loaders/hdr-texture-loader.d.ts +1 -1
- package/dist/asset/loaders/hdr-texture-loader.d.ts.map +1 -1
- package/dist/asset/loaders/hdr-texture-loader.js +4 -4
- package/dist/asset/loaders/hdr-texture-loader.js.map +1 -1
- package/dist/audio/audio-system.d.ts +6 -2
- package/dist/audio/audio-system.d.ts.map +1 -1
- package/dist/audio/audio-system.js +1 -0
- package/dist/audio/audio-system.js.map +1 -1
- package/dist/audio/audio.d.ts +3 -1
- package/dist/audio/audio.d.ts.map +1 -1
- package/dist/audio/audio.js +8 -2
- package/dist/audio/audio.js.map +1 -1
- package/dist/camera/camera-source.js +1 -0
- package/dist/camera/camera-source.js.map +1 -1
- package/dist/camera/camera-system.d.ts.map +1 -1
- package/dist/camera/camera-system.js +1 -0
- package/dist/camera/camera-system.js.map +1 -1
- package/dist/camera/camera-utils.d.ts.map +1 -1
- package/dist/camera/camera-utils.js.map +1 -1
- package/dist/depth/depth-occludable.d.ts +48 -0
- package/dist/depth/depth-occludable.d.ts.map +1 -0
- package/dist/depth/depth-occludable.js +48 -0
- package/dist/depth/depth-occludable.js.map +1 -0
- package/dist/depth/depth-sensing-system.d.ts +164 -0
- package/dist/depth/depth-sensing-system.d.ts.map +1 -0
- package/dist/depth/depth-sensing-system.js +453 -0
- package/dist/depth/depth-sensing-system.js.map +1 -0
- package/dist/depth/depth-textures.d.ts +53 -0
- package/dist/depth/depth-textures.d.ts.map +1 -0
- package/dist/depth/depth-textures.js +114 -0
- package/dist/depth/depth-textures.js.map +1 -0
- package/dist/depth/index.d.ts +10 -0
- package/dist/depth/index.d.ts.map +1 -0
- package/dist/depth/occlusion/preprocessing-pass.d.ts +52 -0
- package/dist/depth/occlusion/preprocessing-pass.d.ts.map +1 -0
- package/dist/depth/occlusion/preprocessing-pass.js +105 -0
- package/dist/depth/occlusion/preprocessing-pass.js.map +1 -0
- package/dist/depth/occlusion/preprocessing-shader.glsl.d.ts +22 -0
- package/dist/depth/occlusion/preprocessing-shader.glsl.d.ts.map +1 -0
- package/dist/depth/occlusion/preprocessing-shader.glsl.js +115 -0
- package/dist/depth/occlusion/preprocessing-shader.glsl.js.map +1 -0
- package/dist/ecs/entity.d.ts +17 -1
- package/dist/ecs/entity.d.ts.map +1 -1
- package/dist/ecs/entity.js +7 -1
- package/dist/ecs/entity.js.map +1 -1
- package/dist/ecs/world.d.ts +12 -0
- package/dist/ecs/world.d.ts.map +1 -1
- package/dist/ecs/world.js +47 -3
- package/dist/ecs/world.js.map +1 -1
- package/dist/environment/dome-gradient.js +1 -0
- package/dist/environment/dome-gradient.js.map +1 -1
- package/dist/environment/dome-texture.d.ts +3 -1
- package/dist/environment/dome-texture.d.ts.map +1 -1
- package/dist/environment/dome-texture.js +7 -1
- package/dist/environment/dome-texture.js.map +1 -1
- package/dist/environment/environment-system.d.ts +8 -0
- package/dist/environment/environment-system.d.ts.map +1 -1
- package/dist/environment/environment-system.js +78 -2
- package/dist/environment/environment-system.js.map +1 -1
- package/dist/environment/ibl-gradient.js +1 -0
- package/dist/environment/ibl-gradient.js.map +1 -1
- package/dist/environment/ibl-texture.d.ts +3 -1
- package/dist/environment/ibl-texture.d.ts.map +1 -1
- package/dist/environment/ibl-texture.js +7 -1
- package/dist/environment/ibl-texture.js.map +1 -1
- package/dist/environment-raycast/environment-raycast.d.ts +136 -0
- package/dist/environment-raycast/environment-raycast.d.ts.map +1 -0
- package/dist/environment-raycast/environment-raycast.js +333 -0
- package/dist/environment-raycast/environment-raycast.js.map +1 -0
- package/dist/environment-raycast/index.d.ts +9 -0
- package/dist/environment-raycast/index.d.ts.map +1 -0
- package/dist/environment-raycast/raycast-target.d.ts +114 -0
- package/dist/environment-raycast/raycast-target.d.ts.map +1 -0
- package/dist/environment-raycast/raycast-target.js +84 -0
- package/dist/environment-raycast/raycast-target.js.map +1 -0
- package/dist/grab/distance-grabbable.d.ts +27 -2
- package/dist/grab/distance-grabbable.d.ts.map +1 -1
- package/dist/grab/distance-grabbable.js +25 -2
- package/dist/grab/distance-grabbable.js.map +1 -1
- package/dist/grab/grab-system.d.ts +106 -61
- package/dist/grab/grab-system.d.ts.map +1 -1
- package/dist/grab/grab-system.js +61 -10
- package/dist/grab/grab-system.js.map +1 -1
- package/dist/grab/handles.d.ts +14 -4
- package/dist/grab/handles.d.ts.map +1 -1
- package/dist/grab/handles.js +45 -18
- package/dist/grab/handles.js.map +1 -1
- package/dist/grab/index.d.ts +0 -1
- package/dist/grab/index.d.ts.map +1 -1
- package/dist/grab/index.js +0 -2
- package/dist/grab/index.js.map +1 -1
- package/dist/grab/one-hand-grabbable.js +1 -0
- package/dist/grab/one-hand-grabbable.js.map +1 -1
- package/dist/grab/two-hands-grabbable.js +1 -0
- package/dist/grab/two-hands-grabbable.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/init/world-initializer.d.ts +13 -1
- package/dist/init/world-initializer.d.ts.map +1 -1
- package/dist/init/world-initializer.js +78 -18
- package/dist/init/world-initializer.js.map +1 -1
- package/dist/init/xr.d.ts +1 -0
- package/dist/init/xr.d.ts.map +1 -1
- package/dist/init/xr.js +6 -0
- package/dist/init/xr.js.map +1 -1
- package/dist/input/input-system.d.ts +409 -5
- package/dist/input/input-system.d.ts.map +1 -1
- package/dist/input/input-system.js +166 -32
- package/dist/input/input-system.js.map +1 -1
- package/dist/input/state-tags.d.ts +32 -15
- package/dist/input/state-tags.d.ts.map +1 -1
- package/dist/input/state-tags.js +34 -16
- package/dist/input/state-tags.js.map +1 -1
- package/dist/level/level-entity-creator.js +1 -0
- package/dist/level/level-entity-creator.js.map +1 -1
- package/dist/level/level-root.js +1 -0
- package/dist/level/level-root.js.map +1 -1
- package/dist/level/level-system.js +1 -0
- package/dist/level/level-system.js.map +1 -1
- package/dist/level/level-tag.js +1 -0
- package/dist/level/level-tag.js.map +1 -1
- package/dist/locomotion/locomotion.d.ts +10 -0
- package/dist/locomotion/locomotion.d.ts.map +1 -1
- package/dist/locomotion/locomotion.js +17 -1
- package/dist/locomotion/locomotion.js.map +1 -1
- package/dist/locomotion/slide.d.ts +10 -0
- package/dist/locomotion/slide.d.ts.map +1 -1
- package/dist/locomotion/slide.js +6 -2
- package/dist/locomotion/slide.js.map +1 -1
- package/dist/locomotion/teleport.js +1 -0
- package/dist/locomotion/teleport.js.map +1 -1
- package/dist/mcp/ecs-debug-tools.d.ts +167 -0
- package/dist/mcp/ecs-debug-tools.d.ts.map +1 -0
- package/dist/mcp/ecs-debug-tools.js +602 -0
- package/dist/mcp/ecs-debug-tools.js.map +1 -0
- package/dist/mcp/index.d.ts +10 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/mcp-runtime.d.ts +31 -0
- package/dist/mcp/mcp-runtime.d.ts.map +1 -0
- package/dist/mcp/mcp-runtime.js +85 -0
- package/dist/mcp/mcp-runtime.js.map +1 -0
- package/dist/mcp/scene-tools.d.ts +41 -0
- package/dist/mcp/scene-tools.d.ts.map +1 -0
- package/dist/mcp/scene-tools.js +95 -0
- package/dist/mcp/scene-tools.js.map +1 -0
- package/dist/physics/physics-system.d.ts +1 -1
- package/dist/physics/physics-system.d.ts.map +1 -1
- package/dist/physics/physics-system.js +9 -4
- package/dist/physics/physics-system.js.map +1 -1
- package/dist/physics/utils.d.ts.map +1 -1
- package/dist/physics/utils.js +1 -1
- package/dist/scene-understanding/anchor.js +1 -0
- package/dist/scene-understanding/anchor.js.map +1 -1
- package/dist/scene-understanding/mesh.js +1 -0
- package/dist/scene-understanding/mesh.js.map +1 -1
- package/dist/scene-understanding/plane.js +1 -0
- package/dist/scene-understanding/plane.js.map +1 -1
- package/dist/scene-understanding/scene-understanding-system.d.ts +0 -39
- package/dist/scene-understanding/scene-understanding-system.d.ts.map +1 -1
- package/dist/scene-understanding/scene-understanding-system.js +10 -2
- package/dist/scene-understanding/scene-understanding-system.js.map +1 -1
- package/dist/transform/index.d.ts +2 -0
- package/dist/transform/index.d.ts.map +1 -1
- package/dist/transform/synced-euler.d.ts +62 -0
- package/dist/transform/synced-euler.d.ts.map +1 -0
- package/dist/transform/synced-euler.js +212 -0
- package/dist/transform/synced-euler.js.map +1 -0
- package/dist/transform/synced-quaternion.d.ts +11 -0
- package/dist/transform/synced-quaternion.d.ts.map +1 -1
- package/dist/transform/synced-quaternion.js +29 -0
- package/dist/transform/synced-quaternion.js.map +1 -1
- package/dist/transform/transform-utils.d.ts +24 -0
- package/dist/transform/transform-utils.d.ts.map +1 -0
- package/dist/transform/transform-utils.js +53 -0
- package/dist/transform/transform-utils.js.map +1 -0
- package/dist/transform/transform.d.ts.map +1 -1
- package/dist/transform/transform.js +19 -2
- package/dist/transform/transform.js.map +1 -1
- package/dist/ui/follow.js +1 -0
- package/dist/ui/follow.js.map +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/screenspace.js +1 -0
- package/dist/ui/screenspace.js.map +1 -1
- package/dist/ui/ui.d.ts.map +1 -1
- package/dist/ui/ui.js +2 -8
- package/dist/ui/ui.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/visibility/visibility.d.ts.map +1 -1
- package/dist/visibility/visibility.js +4 -1
- package/dist/visibility/visibility.js.map +1 -1
- package/package.json +16 -9
- package/dist/node_modules/.pnpm/@pmndrs_uikitml@0.1.7_super-three@0.177.0/node_modules/@pmndrs/uikitml/dist/interpreter/html.js +0 -128
- package/dist/node_modules/.pnpm/@pmndrs_uikitml@0.1.7_super-three@0.177.0/node_modules/@pmndrs/uikitml/dist/interpreter/html.js.map +0 -1
- package/dist/node_modules/.pnpm/@pmndrs_uikitml@0.1.7_super-three@0.177.0/node_modules/@pmndrs/uikitml/dist/interpreter/index.js +0 -161
- package/dist/node_modules/.pnpm/@pmndrs_uikitml@0.1.7_super-three@0.177.0/node_modules/@pmndrs/uikitml/dist/interpreter/index.js.map +0 -1
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/error-codes.js +0 -66
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/error-codes.js.map +0 -1
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/foreign-content.js +0 -162
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/foreign-content.js.map +0 -1
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/html.js +0 -519
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/html.js.map +0 -1
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/token.js +0 -15
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/token.js.map +0 -1
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/unicode.js +0 -32
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/unicode.js.map +0 -1
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/formatting-element-list.js +0 -10
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/formatting-element-list.js.map +0 -1
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/index.js +0 -41
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/index.js.map +0 -1
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/open-element-stack.js +0 -35
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/open-element-stack.js.map +0 -1
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/serializer/index.js +0 -24
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/serializer/index.js.map +0 -1
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tokenizer/index.js +0 -92
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tokenizer/index.js.map +0 -1
- package/dist/node_modules/.pnpm/super-three@0.177.0/node_modules/super-three/examples/jsm/libs/fflate.module.js +0 -382
- package/dist/node_modules/.pnpm/super-three@0.177.0/node_modules/super-three/examples/jsm/libs/fflate.module.js.map +0 -1
- package/dist/node_modules/.pnpm/super-three@0.177.0/node_modules/super-three/examples/jsm/loaders/EXRLoader.js +0 -2587
- package/dist/node_modules/.pnpm/super-three@0.177.0/node_modules/super-three/examples/jsm/loaders/EXRLoader.js.map +0 -1
- package/dist/node_modules/.pnpm/super-three@0.177.0/node_modules/super-three/examples/jsm/loaders/RGBELoader.js +0 -477
- package/dist/node_modules/.pnpm/super-three@0.177.0/node_modules/super-three/examples/jsm/loaders/RGBELoader.js.map +0 -1
- package/dist/node_modules/.pnpm/super-three@0.177.0/node_modules/super-three/src/math/MathUtils.js +0 -17
- package/dist/node_modules/.pnpm/super-three@0.177.0/node_modules/super-three/src/math/MathUtils.js.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { DataArrayTexture, ExternalTexture, WebGLRenderer } from '../runtime/three.js';
|
|
8
|
+
/**
|
|
9
|
+
* Manages depth textures from WebXR depth sensing.
|
|
10
|
+
* Supports both CPU-optimized (DataArrayTexture) and GPU-optimized (ExternalTexture) depth data.
|
|
11
|
+
*/
|
|
12
|
+
export declare class DepthTextures {
|
|
13
|
+
private useFloat32;
|
|
14
|
+
private nativeTexture?;
|
|
15
|
+
private dataArrayTexture?;
|
|
16
|
+
private combinedArray?;
|
|
17
|
+
constructor(useFloat32: boolean);
|
|
18
|
+
/**
|
|
19
|
+
* Create or recreate the DataArrayTexture for stereo CPU depth.
|
|
20
|
+
* Packs per-view depth data into a single texture array (depth=2)
|
|
21
|
+
* so the shader can select the correct layer via VIEW_ID.
|
|
22
|
+
*/
|
|
23
|
+
private createDataArrayTexture;
|
|
24
|
+
/**
|
|
25
|
+
* Update the depth texture with new CPU depth data.
|
|
26
|
+
* Copies per-view data into the correct layer of the DataArrayTexture.
|
|
27
|
+
* @param depthData - The CPU depth information from WebXR.
|
|
28
|
+
* @param viewId - The view index (0 for left eye, 1 for right eye).
|
|
29
|
+
*/
|
|
30
|
+
updateData(depthData: XRCPUDepthInformation, viewId: number): void;
|
|
31
|
+
/**
|
|
32
|
+
* Update the depth texture with native GPU texture from WebXR.
|
|
33
|
+
* The native texture is a texture array containing both eyes' depth data.
|
|
34
|
+
* @param depthData - The GPU depth information from WebXR.
|
|
35
|
+
* @param renderer - The WebGL renderer.
|
|
36
|
+
*/
|
|
37
|
+
updateNativeTexture(depthData: XRWebGLDepthInformation, renderer: WebGLRenderer): void;
|
|
38
|
+
/**
|
|
39
|
+
* Get the native GPU depth texture array.
|
|
40
|
+
* Contains both eyes' depth data; the shader uses VIEW_ID to select the layer.
|
|
41
|
+
*/
|
|
42
|
+
getNativeTexture(): ExternalTexture | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Get the CPU depth data as a DataArrayTexture.
|
|
45
|
+
* Contains per-view depth packed into layers; the shader uses VIEW_ID to select the layer.
|
|
46
|
+
*/
|
|
47
|
+
getDataArrayTexture(): DataArrayTexture | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Dispose of all depth textures.
|
|
50
|
+
*/
|
|
51
|
+
dispose(): void;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=depth-textures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depth-textures.d.ts","sourceRoot":"","sources":["../../src/depth/depth-textures.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,gBAAgB,EAChB,eAAe,EAKf,aAAa,EACd,MAAM,qBAAqB,CAAC;AAC7B;;;GAGG;AACH,qBAAa,aAAa;IAKZ,OAAO,CAAC,UAAU;IAJ9B,OAAO,CAAC,aAAa,CAAC,CAAkB;IACxC,OAAO,CAAC,gBAAgB,CAAC,CAAmB;IAC5C,OAAO,CAAC,aAAa,CAAC,CAA4B;gBAE9B,UAAU,EAAE,OAAO;IAEvC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IA8B9B;;;;;OAKG;IACH,UAAU,CAAC,SAAS,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAwBlE;;;;;OAKG;IACH,mBAAmB,CACjB,SAAS,EAAE,uBAAuB,EAClC,QAAQ,EAAE,aAAa,GACtB,IAAI;IAeP;;;OAGG;IACH,gBAAgB,IAAI,eAAe,GAAG,SAAS;IAI/C;;;OAGG;IACH,mBAAmB,IAAI,gBAAgB,GAAG,SAAS;IAInD;;OAEG;IACH,OAAO,IAAI,IAAI;CAMhB"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import '../runtime/three.js';
|
|
2
|
+
import { DataArrayTexture, RedFormat, FloatType, RGFormat, UnsignedByteType, ExternalTexture } from 'three';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Manages depth textures from WebXR depth sensing.
|
|
12
|
+
* Supports both CPU-optimized (DataArrayTexture) and GPU-optimized (ExternalTexture) depth data.
|
|
13
|
+
*/
|
|
14
|
+
class DepthTextures {
|
|
15
|
+
constructor(useFloat32) {
|
|
16
|
+
this.useFloat32 = useFloat32;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Create or recreate the DataArrayTexture for stereo CPU depth.
|
|
20
|
+
* Packs per-view depth data into a single texture array (depth=2)
|
|
21
|
+
* so the shader can select the correct layer via VIEW_ID.
|
|
22
|
+
*/
|
|
23
|
+
createDataArrayTexture(width, height) {
|
|
24
|
+
if (this.dataArrayTexture) {
|
|
25
|
+
this.dataArrayTexture.dispose();
|
|
26
|
+
}
|
|
27
|
+
const depth = 2; // stereo: left + right eye
|
|
28
|
+
if (this.useFloat32) {
|
|
29
|
+
const pixelsPerLayer = width * height;
|
|
30
|
+
this.combinedArray = new Float32Array(pixelsPerLayer * depth);
|
|
31
|
+
this.dataArrayTexture = new DataArrayTexture(this.combinedArray, width, height, depth);
|
|
32
|
+
this.dataArrayTexture.format = RedFormat;
|
|
33
|
+
this.dataArrayTexture.type = FloatType;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const bytesPerLayer = width * height * 2;
|
|
37
|
+
this.combinedArray = new Uint8Array(bytesPerLayer * depth);
|
|
38
|
+
this.dataArrayTexture = new DataArrayTexture(this.combinedArray, width, height, depth);
|
|
39
|
+
this.dataArrayTexture.format = RGFormat;
|
|
40
|
+
this.dataArrayTexture.type = UnsignedByteType;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Update the depth texture with new CPU depth data.
|
|
45
|
+
* Copies per-view data into the correct layer of the DataArrayTexture.
|
|
46
|
+
* @param depthData - The CPU depth information from WebXR.
|
|
47
|
+
* @param viewId - The view index (0 for left eye, 1 for right eye).
|
|
48
|
+
*/
|
|
49
|
+
updateData(depthData, viewId) {
|
|
50
|
+
// Recreate the DataArrayTexture if dimensions changed or it doesn't exist
|
|
51
|
+
if (!this.dataArrayTexture ||
|
|
52
|
+
this.dataArrayTexture.image.width !== depthData.width ||
|
|
53
|
+
this.dataArrayTexture.image.height !== depthData.height) {
|
|
54
|
+
this.createDataArrayTexture(depthData.width, depthData.height);
|
|
55
|
+
}
|
|
56
|
+
if (this.useFloat32) {
|
|
57
|
+
const viewData = new Float32Array(depthData.data);
|
|
58
|
+
const layerSize = depthData.width * depthData.height;
|
|
59
|
+
this.combinedArray.set(viewData, viewId * layerSize);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const viewData = new Uint8Array(depthData.data);
|
|
63
|
+
const layerSize = depthData.width * depthData.height * 2;
|
|
64
|
+
this.combinedArray.set(viewData, viewId * layerSize);
|
|
65
|
+
}
|
|
66
|
+
this.dataArrayTexture.addLayerUpdate(viewId);
|
|
67
|
+
this.dataArrayTexture.needsUpdate = true;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Update the depth texture with native GPU texture from WebXR.
|
|
71
|
+
* The native texture is a texture array containing both eyes' depth data.
|
|
72
|
+
* @param depthData - The GPU depth information from WebXR.
|
|
73
|
+
* @param renderer - The WebGL renderer.
|
|
74
|
+
*/
|
|
75
|
+
updateNativeTexture(depthData, renderer) {
|
|
76
|
+
if (!this.nativeTexture) {
|
|
77
|
+
this.nativeTexture = new ExternalTexture(depthData.texture);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
this.nativeTexture.sourceTexture = depthData.texture;
|
|
81
|
+
}
|
|
82
|
+
// Update the texture properties for three.js
|
|
83
|
+
const textureProperties = renderer.properties.get(this.nativeTexture);
|
|
84
|
+
textureProperties.__webglTexture = depthData.texture;
|
|
85
|
+
textureProperties.__version = 1;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get the native GPU depth texture array.
|
|
89
|
+
* Contains both eyes' depth data; the shader uses VIEW_ID to select the layer.
|
|
90
|
+
*/
|
|
91
|
+
getNativeTexture() {
|
|
92
|
+
return this.nativeTexture;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Get the CPU depth data as a DataArrayTexture.
|
|
96
|
+
* Contains per-view depth packed into layers; the shader uses VIEW_ID to select the layer.
|
|
97
|
+
*/
|
|
98
|
+
getDataArrayTexture() {
|
|
99
|
+
return this.dataArrayTexture;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Dispose of all depth textures.
|
|
103
|
+
*/
|
|
104
|
+
dispose() {
|
|
105
|
+
var _a;
|
|
106
|
+
(_a = this.dataArrayTexture) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
107
|
+
this.dataArrayTexture = undefined;
|
|
108
|
+
this.combinedArray = undefined;
|
|
109
|
+
this.nativeTexture = undefined;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { DepthTextures };
|
|
114
|
+
//# sourceMappingURL=depth-textures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depth-textures.js","sources":["../../src/depth/depth-textures.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;;;;;AAKG;AAWH;;;AAGG;MACU,aAAa,CAAA;AAKxB,IAAA,WAAA,CAAoB,UAAmB,EAAA;QAAnB,IAAA,CAAA,UAAU,GAAV,UAAU;IAAY;AAE1C;;;;AAIG;IACK,sBAAsB,CAAC,KAAa,EAAE,MAAc,EAAA;AAC1D,QAAA,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACzB,YAAA,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE;QACjC;AACA,QAAA,MAAM,KAAK,GAAG,CAAC,CAAC;AAChB,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACnB,YAAA,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM;YACrC,IAAI,CAAC,aAAa,GAAG,IAAI,YAAY,CAAC,cAAc,GAAG,KAAK,CAAC;AAC7D,YAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,CAC1C,IAAI,CAAC,aAAa,EAClB,KAAK,EACL,MAAM,EACN,KAAK,CACN;AACD,YAAA,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,SAAS;AACxC,YAAA,IAAI,CAAC,gBAAgB,CAAC,IAAI,GAAG,SAAS;QACxC;aAAO;A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,CAAC,gBAAiB,CAAC,cAAc,CAAC,MAAM,CAAC;AAC7C,QAAA,IAAI,CAAC,gBAAiB,CAAC,WAAW,GAAG,IAAI;IAC3C;AAEA;;;;;AAKG;IACH,mBAAmB,CACjB,SAAkC,EAClC,QAAuB,EAAA;AAEvB,QAAA,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACvB,IAAI,CAAC,aAAa,GAAG,IAAI,eAAe,CAAC,SAAS,CAAC,OAAO,CAAC;QAC7D;aAAO;YACL,IAAI,CAAC,aAAa,CAAC,aAAa,GAAG,SAAS,CAAC,OAAO;QACtD;;AAEA,QAAA,MAAM,iBAAiB,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAGnE;AACD,QAAA,iBAAiB,CAAC,cAAc,GAAG,SAAS,CAAC,OAAO;AACpD,QAAA,iBAAiB,CAAC,SAAS,GAAG,CAAC;IACjC;AAEA;;;AAGG;IACH,gBAAgB,GAAA;QACd,OAAO,IAAI,CAAC,aAAa;IAC3B;AAEA;;;AAGG;IACH,mBAAmB,GAAA;QACjB,OAAO,IAAI,CAAC,gBAAgB;IAC9B;AAEA;;AAEG;IACH,OAAO,GAAA;;AACL,QAAA,CAAA,EAAA,GAAA,IAAI,CAAC,gBAAgB,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,OAAO,EAAE;AAChC,QAAA,IAAI,CAAC,gBAAgB,GAAG,SAAS;AACjC,QAAA,IAAI,CAAC,aAAa,GAAG,SAAS;AAC9B,QAAA,IAAI,CAAC,aAAa,GAAG,SAAS;IAChC;AACD;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
export * from './depth-occludable.js';
|
|
8
|
+
export * from './depth-textures.js';
|
|
9
|
+
export * from './depth-sensing-system.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/depth/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,uBAAuB,CAAC;AAGtC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { Texture, WebGLRenderer } from '../../runtime/three.js';
|
|
8
|
+
/**
|
|
9
|
+
* Depth preprocessing pass — ported from Meta SDK DepthPreprocessing.shader.
|
|
10
|
+
*
|
|
11
|
+
* Runs a single fullscreen pass on the raw XR depth texture at depth texture
|
|
12
|
+
* resolution (~256×192). For each output texel it samples a 4×4 neighborhood
|
|
13
|
+
* and computes min/max/avg depth, writing the result to an RGBA float target:
|
|
14
|
+
*
|
|
15
|
+
* RGBA = (minAvg, maxAvg, avg - minAvg, maxAvg - minAvg) in meters
|
|
16
|
+
*
|
|
17
|
+
* The material shader then samples this preprocessed texture to apply soft
|
|
18
|
+
* occlusion without requiring scene-override renders or Kawase blur.
|
|
19
|
+
*/
|
|
20
|
+
export declare class DepthPreprocessingPass {
|
|
21
|
+
private material;
|
|
22
|
+
private renderTargets;
|
|
23
|
+
private fsQuad;
|
|
24
|
+
constructor();
|
|
25
|
+
/**
|
|
26
|
+
* Set the depth texture source for preprocessing.
|
|
27
|
+
* @param depthTexture - The XR depth texture array (ExternalTexture or DataArrayTexture).
|
|
28
|
+
* @param rawValueToMeters - Conversion factor from raw depth values to meters.
|
|
29
|
+
* @param isGPUDepth - Whether the depth data is GPU-optimized (inverse depth).
|
|
30
|
+
* @param depthNear - The near plane distance for GPU depth conversion.
|
|
31
|
+
*/
|
|
32
|
+
setDepthTexture(depthTexture: Texture, rawValueToMeters: number, isGPUDepth: boolean, depthNear: number): void;
|
|
33
|
+
/**
|
|
34
|
+
* Render the preprocessing pass.
|
|
35
|
+
* @param renderer - The three.js WebGL renderer.
|
|
36
|
+
* @param depthWidth - Width of the depth texture.
|
|
37
|
+
* @param depthHeight - Height of the depth texture.
|
|
38
|
+
* @param viewId - The view index to render (default 0).
|
|
39
|
+
*/
|
|
40
|
+
render(renderer: WebGLRenderer, depthWidth: number, depthHeight: number, viewId?: number): void;
|
|
41
|
+
/**
|
|
42
|
+
* Get the preprocessed depth texture for a given view.
|
|
43
|
+
* RGBA = (minAvg, maxAvg, avg - minAvg, maxAvg - minAvg) in meters.
|
|
44
|
+
* @param viewId - The view index (0 for left eye, 1 for right eye).
|
|
45
|
+
*/
|
|
46
|
+
getTexture(viewId?: number): Texture;
|
|
47
|
+
/**
|
|
48
|
+
* Dispose of all resources.
|
|
49
|
+
*/
|
|
50
|
+
dispose(): void;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=preprocessing-pass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preprocessing-pass.d.ts","sourceRoot":"","sources":["../../../src/depth/occlusion/preprocessing-pass.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAIL,OAAO,EAEP,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAGhC;;;;;;;;;;;GAWG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAiB;IACjC,OAAO,CAAC,aAAa,CAAyC;IAC9D,OAAO,CAAC,MAAM,CAAiB;;IA0B/B;;;;;;OAMG;IACH,eAAe,CACb,YAAY,EAAE,OAAO,EACrB,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,OAAO,EACnB,SAAS,EAAE,MAAM,GAChB,IAAI;IAOP;;;;;;OAMG;IACH,MAAM,CACJ,QAAQ,EAAE,aAAa,EACvB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,MAAM,SAAI,GACT,IAAI;IAuBP;;;;OAIG;IACH,UAAU,CAAC,MAAM,SAAI,GAAG,OAAO;IAI/B;;OAEG;IACH,OAAO,IAAI,IAAI;CAOhB"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { FullScreenQuad } from 'three/examples/jsm/postprocessing/Pass.js';
|
|
2
|
+
import '../../runtime/three.js';
|
|
3
|
+
import { DepthPreprocessingShader } from './preprocessing-shader.glsl.js';
|
|
4
|
+
import { ShaderMaterial, Vector2, WebGLRenderTarget, FloatType, RGBAFormat } from 'three';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Depth preprocessing pass — ported from Meta SDK DepthPreprocessing.shader.
|
|
14
|
+
*
|
|
15
|
+
* Runs a single fullscreen pass on the raw XR depth texture at depth texture
|
|
16
|
+
* resolution (~256×192). For each output texel it samples a 4×4 neighborhood
|
|
17
|
+
* and computes min/max/avg depth, writing the result to an RGBA float target:
|
|
18
|
+
*
|
|
19
|
+
* RGBA = (minAvg, maxAvg, avg - minAvg, maxAvg - minAvg) in meters
|
|
20
|
+
*
|
|
21
|
+
* The material shader then samples this preprocessed texture to apply soft
|
|
22
|
+
* occlusion without requiring scene-override renders or Kawase blur.
|
|
23
|
+
*/
|
|
24
|
+
class DepthPreprocessingPass {
|
|
25
|
+
constructor() {
|
|
26
|
+
this.material = new ShaderMaterial({
|
|
27
|
+
name: 'DepthPreprocessing',
|
|
28
|
+
uniforms: {
|
|
29
|
+
uXRDepthTextureArray: { value: null },
|
|
30
|
+
uRawValueToMeters: { value: 0.001 },
|
|
31
|
+
uViewId: { value: 0 },
|
|
32
|
+
uDepthTextureSize: { value: new Vector2() },
|
|
33
|
+
uIsGPUDepth: { value: false },
|
|
34
|
+
uDepthNear: { value: 0 },
|
|
35
|
+
},
|
|
36
|
+
vertexShader: DepthPreprocessingShader.vertexShader,
|
|
37
|
+
fragmentShader: DepthPreprocessingShader.fragmentShader,
|
|
38
|
+
});
|
|
39
|
+
const rtOptions = { format: RGBAFormat, type: FloatType };
|
|
40
|
+
this.renderTargets = [
|
|
41
|
+
new WebGLRenderTarget(1, 1, rtOptions),
|
|
42
|
+
new WebGLRenderTarget(1, 1, rtOptions),
|
|
43
|
+
];
|
|
44
|
+
this.fsQuad = new FullScreenQuad(this.material);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Set the depth texture source for preprocessing.
|
|
48
|
+
* @param depthTexture - The XR depth texture array (ExternalTexture or DataArrayTexture).
|
|
49
|
+
* @param rawValueToMeters - Conversion factor from raw depth values to meters.
|
|
50
|
+
* @param isGPUDepth - Whether the depth data is GPU-optimized (inverse depth).
|
|
51
|
+
* @param depthNear - The near plane distance for GPU depth conversion.
|
|
52
|
+
*/
|
|
53
|
+
setDepthTexture(depthTexture, rawValueToMeters, isGPUDepth, depthNear) {
|
|
54
|
+
this.material.uniforms.uXRDepthTextureArray.value = depthTexture;
|
|
55
|
+
this.material.uniforms.uRawValueToMeters.value = rawValueToMeters;
|
|
56
|
+
this.material.uniforms.uIsGPUDepth.value = isGPUDepth;
|
|
57
|
+
this.material.uniforms.uDepthNear.value = depthNear;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Render the preprocessing pass.
|
|
61
|
+
* @param renderer - The three.js WebGL renderer.
|
|
62
|
+
* @param depthWidth - Width of the depth texture.
|
|
63
|
+
* @param depthHeight - Height of the depth texture.
|
|
64
|
+
* @param viewId - The view index to render (default 0).
|
|
65
|
+
*/
|
|
66
|
+
render(renderer, depthWidth, depthHeight, viewId = 0) {
|
|
67
|
+
const target = this.renderTargets[viewId];
|
|
68
|
+
// Only resize if dimensions actually changed
|
|
69
|
+
if (target.width !== depthWidth || target.height !== depthHeight) {
|
|
70
|
+
target.setSize(depthWidth, depthHeight);
|
|
71
|
+
}
|
|
72
|
+
this.material.uniforms.uViewId.value = viewId;
|
|
73
|
+
this.material.uniforms.uDepthTextureSize.value.set(depthWidth, depthHeight);
|
|
74
|
+
const originalRenderTarget = renderer.getRenderTarget();
|
|
75
|
+
// Temporarily disable XR so FullScreenQuad renders with its own
|
|
76
|
+
// identity camera instead of the XR stereo/multiview cameras.
|
|
77
|
+
const xrEnabled = renderer.xr.enabled;
|
|
78
|
+
renderer.xr.enabled = false;
|
|
79
|
+
renderer.setRenderTarget(target);
|
|
80
|
+
this.fsQuad.render(renderer);
|
|
81
|
+
renderer.setRenderTarget(originalRenderTarget);
|
|
82
|
+
renderer.xr.enabled = xrEnabled;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Get the preprocessed depth texture for a given view.
|
|
86
|
+
* RGBA = (minAvg, maxAvg, avg - minAvg, maxAvg - minAvg) in meters.
|
|
87
|
+
* @param viewId - The view index (0 for left eye, 1 for right eye).
|
|
88
|
+
*/
|
|
89
|
+
getTexture(viewId = 0) {
|
|
90
|
+
return this.renderTargets[viewId].texture;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Dispose of all resources.
|
|
94
|
+
*/
|
|
95
|
+
dispose() {
|
|
96
|
+
for (const target of this.renderTargets) {
|
|
97
|
+
target.dispose();
|
|
98
|
+
}
|
|
99
|
+
this.material.dispose();
|
|
100
|
+
this.fsQuad.dispose();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export { DepthPreprocessingPass };
|
|
105
|
+
//# sourceMappingURL=preprocessing-pass.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preprocessing-pass.js","sources":["../../../src/depth/occlusion/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AO;IAC3C;AAEA;;AAEG;IACH,OAAO,GAAA;AACL,QAAA,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,aAAa,EAAE;YACvC,MAAM,CAAC,OAAO,EAAE;QAClB;AACA,QAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;AACvB,QAAA,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;IACvB;AACD;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Depth preprocessing shader — ported from Meta SDK DepthPreprocessing.shader.
|
|
9
|
+
*
|
|
10
|
+
* A single fullscreen pass on the raw XR depth texture that computes
|
|
11
|
+
* min/max/avg depth in a 4×4 neighborhood, written to an RGBA float target.
|
|
12
|
+
*
|
|
13
|
+
* Output: vec4(minAvg, maxAvg, avg - minAvg, maxAvg - minAvg) in meters.
|
|
14
|
+
* The interpolation ratio (avg-minAvg)/(maxAvg-minAvg) is deferred to the
|
|
15
|
+
* occlusion shader to preserve bilinear interpolation properties.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DepthPreprocessingShader: {
|
|
18
|
+
name: string;
|
|
19
|
+
vertexShader: string;
|
|
20
|
+
fragmentShader: string;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=preprocessing-shader.glsl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preprocessing-shader.glsl.d.ts","sourceRoot":"","sources":["../../../src/depth/occlusion/preprocessing-shader.glsl.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB;;;;CAkGpC,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Depth preprocessing shader — ported from Meta SDK DepthPreprocessing.shader.
|
|
9
|
+
*
|
|
10
|
+
* A single fullscreen pass on the raw XR depth texture that computes
|
|
11
|
+
* min/max/avg depth in a 4×4 neighborhood, written to an RGBA float target.
|
|
12
|
+
*
|
|
13
|
+
* Output: vec4(minAvg, maxAvg, avg - minAvg, maxAvg - minAvg) in meters.
|
|
14
|
+
* The interpolation ratio (avg-minAvg)/(maxAvg-minAvg) is deferred to the
|
|
15
|
+
* occlusion shader to preserve bilinear interpolation properties.
|
|
16
|
+
*/
|
|
17
|
+
const DepthPreprocessingShader = {
|
|
18
|
+
vertexShader: /* glsl */ `
|
|
19
|
+
varying vec2 vUv;
|
|
20
|
+
|
|
21
|
+
void main() {
|
|
22
|
+
vUv = uv;
|
|
23
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
24
|
+
}
|
|
25
|
+
`,
|
|
26
|
+
fragmentShader: /* glsl */ `
|
|
27
|
+
precision highp float;
|
|
28
|
+
|
|
29
|
+
uniform sampler2DArray uXRDepthTextureArray;
|
|
30
|
+
uniform float uRawValueToMeters;
|
|
31
|
+
uniform int uViewId;
|
|
32
|
+
uniform vec2 uDepthTextureSize;
|
|
33
|
+
uniform bool uIsGPUDepth;
|
|
34
|
+
uniform float uDepthNear;
|
|
35
|
+
|
|
36
|
+
varying vec2 vUv;
|
|
37
|
+
|
|
38
|
+
float depthToMeters(float textureValue) {
|
|
39
|
+
if (uIsGPUDepth) {
|
|
40
|
+
return uRawValueToMeters * uDepthNear / (1.0 - textureValue);
|
|
41
|
+
}
|
|
42
|
+
return textureValue * uRawValueToMeters;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
void main() {
|
|
46
|
+
vec2 texelSize = 1.0 / uDepthTextureSize;
|
|
47
|
+
vec2 baseUV = vUv - texelSize * 1.5;
|
|
48
|
+
|
|
49
|
+
// Single pass: sample 4×4 neighborhood, convert, and store in 4 vec4s
|
|
50
|
+
vec4 depths[4];
|
|
51
|
+
float rawMin = 1e20;
|
|
52
|
+
float rawMax = 0.0;
|
|
53
|
+
float sum = 0.0;
|
|
54
|
+
int count = 0;
|
|
55
|
+
|
|
56
|
+
for (int row = 0; row < 4; row++) {
|
|
57
|
+
for (int col = 0; col < 4; col++) {
|
|
58
|
+
vec2 sampleUV = baseUV + vec2(float(col), float(row)) * texelSize;
|
|
59
|
+
float rawValue = texture(uXRDepthTextureArray, vec3(sampleUV, float(uViewId))).r;
|
|
60
|
+
float meters = depthToMeters(rawValue);
|
|
61
|
+
depths[row][col] = meters;
|
|
62
|
+
|
|
63
|
+
if (meters > 0.0) {
|
|
64
|
+
rawMin = min(rawMin, meters);
|
|
65
|
+
rawMax = max(rawMax, meters);
|
|
66
|
+
sum += meters;
|
|
67
|
+
count++;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (count == 0) {
|
|
73
|
+
gl_FragColor = vec4(0.0);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
float avg = sum / float(count);
|
|
78
|
+
|
|
79
|
+
// Group samples near the min (within 115%) and near the max (within 85%)
|
|
80
|
+
// to compute stable minAvg and maxAvg — ported from CalculateMinMaxDepth
|
|
81
|
+
float minThreshold = rawMin * 1.15;
|
|
82
|
+
float maxThreshold = rawMax * 0.85;
|
|
83
|
+
|
|
84
|
+
// Degenerate case: neighborhood is uniform (within both thresholds)
|
|
85
|
+
if (maxThreshold < rawMin && minThreshold > rawMax) {
|
|
86
|
+
gl_FragColor = vec4(avg, avg, 0.0, 0.0);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Vectorized clustering using stored depths — no second sampling loop
|
|
91
|
+
float minSumDepth = 0.0;
|
|
92
|
+
float minSumCount = 0.0;
|
|
93
|
+
float maxSumDepth = 0.0;
|
|
94
|
+
float maxSumCount = 0.0;
|
|
95
|
+
|
|
96
|
+
for (int i = 0; i < 4; i++) {
|
|
97
|
+
vec4 valid = vec4(greaterThan(depths[i], vec4(0.0)));
|
|
98
|
+
vec4 minMask = vec4(lessThanEqual(depths[i], vec4(minThreshold))) * valid;
|
|
99
|
+
vec4 maxMask = vec4(greaterThanEqual(depths[i], vec4(maxThreshold))) * valid;
|
|
100
|
+
minSumDepth += dot(minMask, depths[i]);
|
|
101
|
+
minSumCount += dot(minMask, vec4(1.0));
|
|
102
|
+
maxSumDepth += dot(maxMask, depths[i]);
|
|
103
|
+
maxSumCount += dot(maxMask, vec4(1.0));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
float minAvg = minSumCount > 0.0 ? minSumDepth / minSumCount : rawMin;
|
|
107
|
+
float maxAvg = maxSumCount > 0.0 ? maxSumDepth / maxSumCount : rawMax;
|
|
108
|
+
|
|
109
|
+
gl_FragColor = vec4(minAvg, maxAvg, avg - minAvg, maxAvg - minAvg);
|
|
110
|
+
}
|
|
111
|
+
`,
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export { DepthPreprocessingShader };
|
|
115
|
+
//# sourceMappingURL=preprocessing-shader.glsl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preprocessing-shader.glsl.js","sources":["../../../src/depth/occlusion/preprocessing-shader.glsl.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;AAKG;AAEH;;;;;;;;;AASG;AACI,MAAM,wBAAwB,GAAG;AACtC,IAEA,YAAY,aAAa;;;;;;;AAO1B,CAAA;IAEC,cAAc,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqF5B,CAAA;;;;;"}
|
package/dist/ecs/entity.d.ts
CHANGED
|
@@ -9,9 +9,25 @@ import type { Object3D, Object3DEventMap } from '../runtime/index.js';
|
|
|
9
9
|
declare module 'elics' {
|
|
10
10
|
interface Entity {
|
|
11
11
|
object3D?: Object3D<Object3DEventMap & PointerEventsMap>;
|
|
12
|
+
/** @internal Flag to indicate GPU resources should be disposed on destroy */
|
|
13
|
+
_disposeResources?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Destroy the entity and dispose of its GPU resources (geometry, materials, textures).
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Use this instead of `destroy()` when you want to fully clean up GPU memory.
|
|
19
|
+
* Use with caution when resources may be shared across multiple entities.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* // Remove entity and free GPU resources
|
|
24
|
+
* entity.dispose();
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
dispose(): void;
|
|
12
28
|
}
|
|
13
29
|
}
|
|
14
30
|
export { Entity } from 'elics';
|
|
15
|
-
/** Sentinel value used for
|
|
31
|
+
/** Sentinel value used for "no parent" in Transform.parent. @category ECS */
|
|
16
32
|
export declare const NullEntity = -1;
|
|
17
33
|
//# sourceMappingURL=entity.d.ts.map
|
package/dist/ecs/entity.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/ecs/entity.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/ecs/entity.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEtE,OAAO,QAAQ,OAAO,CAAC;IACrB,UAAU,MAAM;QACd,QAAQ,CAAC,EAAE,QAAQ,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,CAAC;QACzD,6EAA6E;QAC7E,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B;;;;;;;;;;;;WAYG;QACH,OAAO,IAAI,IAAI,CAAC;KACjB;CACF;AAQD,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,6EAA6E;AAC7E,eAAO,MAAM,UAAU,KAAK,CAAC"}
|
package/dist/ecs/entity.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Entity } from 'elics';
|
|
1
2
|
export { Entity } from 'elics';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -6,7 +7,12 @@ export { Entity } from 'elics';
|
|
|
6
7
|
* This source code is licensed under the MIT license found in the
|
|
7
8
|
* LICENSE file in the root directory of this source tree.
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
// Add dispose method to Entity prototype
|
|
11
|
+
Entity.prototype.dispose = function () {
|
|
12
|
+
this._disposeResources = true;
|
|
13
|
+
this.destroy();
|
|
14
|
+
};
|
|
15
|
+
/** Sentinel value used for "no parent" in Transform.parent. @category ECS */
|
|
10
16
|
const NullEntity = -1;
|
|
11
17
|
|
|
12
18
|
export { NullEntity };
|
package/dist/ecs/entity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.js","sources":["../../src/ecs/entity.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"entity.js","sources":["../../src/ecs/entity.ts"],"sourcesContent":[null],"names":["ElicsEntity"],"mappings":";;;AAAA;;;;;AAKG;AA4BH;AACAA,MAAW,CAAC,SAAS,CAAC,OAAO,GAAG,YAAA;AAC7B,IAAA,IAAY,CAAC,iBAAiB,GAAG,IAAI;IACtC,IAAI,CAAC,OAAO,EAAE;AAChB,CAAC;AAGD;AACO,MAAM,UAAU,GAAG;;;;"}
|
package/dist/ecs/world.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { Signal } from '@preact/signals-core';
|
|
|
9
9
|
import { AnyComponent, World as ElicsWorld } from 'elics';
|
|
10
10
|
import { AssetManager } from '../asset/index.js';
|
|
11
11
|
import { WorldOptions, XROptions } from '../init/index.js';
|
|
12
|
+
import type { MCPRuntime } from '../mcp/index.js';
|
|
12
13
|
import { Object3D, PerspectiveCamera, Scene, WebGLRenderer } from '../runtime/index.js';
|
|
13
14
|
import { Entity } from './entity.js';
|
|
14
15
|
export declare enum VisibilityState {
|
|
@@ -61,7 +62,18 @@ export declare class World extends ElicsWorld {
|
|
|
61
62
|
_resolveLevelLoad: (() => void) | undefined;
|
|
62
63
|
/** Default XR options used when calling {@link World.launchXR} without overrides. */
|
|
63
64
|
xrDefaults: import('../init/xr.js').XROptions | undefined;
|
|
65
|
+
/** MCP runtime for framework-specific tools. Set automatically during World.create(). */
|
|
66
|
+
mcpRuntime?: MCPRuntime;
|
|
64
67
|
constructor();
|
|
68
|
+
/**
|
|
69
|
+
* Dispose of an Object3D's GPU resources (geometry, materials, textures).
|
|
70
|
+
* Traverses all descendants and cleans up disposable resources.
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* This is called automatically when an entity is destroyed with `disposeResources: true`.
|
|
74
|
+
* Use with caution when resources may be shared across multiple entities.
|
|
75
|
+
*/
|
|
76
|
+
private disposeObject3DResources;
|
|
65
77
|
createEntity(): Entity;
|
|
66
78
|
createTransformEntity(object?: Object3D, parentOrOptions?: Entity | {
|
|
67
79
|
parent?: Entity;
|
package/dist/ecs/world.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../src/ecs/world.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AA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