You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A huge issue with depth is that texture enabling was super awkward where agents expected textures by default when calling enableDepth. Made that the default option
Added camera projection matrices for SimulatorCamera. Since it center crops the points need to be reprojected to accurately represent world coordinates
Please check the ai reviewer comments:
🟡 enableDepth({texture: false}) / enableDepth({mesh: false}) Disables Both Outputs (src/core/Options.ts:443–448): Because useDefaults is computed as mesh === undefined && texture === undefined, passing {texture: false} (to opt out of the new default texture while keeping the mesh) or {mesh: false} sets useDefaults = false and resolves mesh ?? useDefaults / texture ?? useDefaults to false, turning both outputs off. Compute const useDefaults = mesh !== true && texture !== true; so {mesh: true} and {texture: true} still select a single output as documented in Depth.md, while {texture: false} and {mesh: false} preserve the other default output.
🟡 SimulatorCamera Custom Camera Mode (matchRenderingCamera = false, src/simulator/SimulatorCamera.ts:63–67): onBeforeSimulatorSceneRender updates this.camera.position and this.camera.quaternion via getWorldPosition/getWorldQuaternion without calling this.camera.updateMatrixWorld() (leaving this.camera.matrixWorld stale if renderScene is mocked or skips world-matrix updates, as in SimulatorCamera.test.ts:94) or syncing this.camera.aspect to sWidth / sHeight before renderScene(this.camera) (causing cropFromClip to double-scale X when sWidth !== sHeight). Call this.camera.updateMatrixWorld() and sync this.camera.aspect + this.camera.updateProjectionMatrix() before rendering.
🟡 getDeviceCameraClipFromView Signature & Shared Matrix Mutation (src/camera/CameraUtils.ts:58–70): Removing the first parameter renderCamera from exported getDeviceCameraClipFromView(deviceCamera, targetDevice) breaks external positional callers (unlike getDeviceCameraWorldFromView and getDeviceCameraWorldFromClip, which keep renderCamera first), and line 68 returns DEVICE_CAMERA_PARAMETERS[targetDevice].projectionMatrix without .clone() (risking mutation of the shared MOOHAN_PROJECTION_MATRIX / QUEST_3_PROJECTION_MATRIX singletons). Also note in Simulator.mdx:91 that xb.getCameraParametersSnapshot(...) works across both the simulator and physical headsets whereas simulatorCamera?.getCameraParameters() is simulator-only.
🟡 Unit Test Coverage (src/camera/CameraUtils.test.ts, src/simulator/SimulatorCamera.test.ts, src/core/Options.ts): Add unit tests covering projectWorldToCameraUv (center/corner UVs, inFrame: true/false, viewPoint.z >= 0 returning null, and round-trip consistency with transformRgbUvToWorld), SimulatorCamera.getCameraParameters() (undefined before first capture and after dispose(), plus non-square 1024x512 / 512x1024 center-crop clipFromView), and options.enableDepth() option combinations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Media / Screen Recordings & Screenshots (If Applicable)
Checklist