Repository navigation
Conversation
…a access While streaming raw camera frames, read the XRView's projectionMatrix (clip-from-view) and transform.matrix (world-from-view) into the device camera, in the same reference space three renders in. Reset the flag when camera access is lost so consumers fall back cleanly.
getDeviceCameraClipFromView/WorldFromView now use the intrinsics/pose captured off the XRView when available, so the device reports its own camera math instead of a static per-device profile. The DEVICE_CAMERA_PARAMETERS table stays as the fallback for the getUserMedia path and the simulator, and targetDevice remains a manual override.
|
this only kicks in on the webxr raw-camera path and leaves the DEVICE_CAMERA_PARAMETERS table as the │ fallback, so the getUserMedia path and the simulator are unchanged. i haven't been able to validate the numbers on │ real hardware yet though, so it'd be good to confirm the intrinsics + pose line up on a galaxy xr and an aura before │ leaning on it. those two share the android xr user agent, which is the whole reason for reading off the view instead of the device table. |
|
I haven't tested, but I suspect it likely won't work on Galaxy XR or Aura since it's not exposed at the Android or C++ api level afaik. |
|
let me know when this is ready for reviews. |
Technically it's ready for review, if it doesn't work with pass through on aura or galaxy XR it will fallback safely |

follow-up to #268. the device table still handles getUserMedia, but when WebXR Raw Camera Access supplies an image we can use that view's projection and pose instead of guessing calibration from the user agent.
captures the first usable camera image with that same view's matrices. the stored pose is reference-from-view; the world-space getter applies the render camera parent's updated world transform, including translated and rotated rigs. PlanarVST now includes both principal-point offsets, and camera parameter snapshots copy the projection so later frames cannot change half of a snapshot.
live parameters clear on source and session transitions, missing raw frames, fallback timeout and disposal. switching back to getUserMedia restores the video texture too. merged current main first, keeping its simulator camera interface and disposal guards.
regression tests failed before the fixes for translated/rotated rigs, asymmetric planar projection, mutable snapshots, raw-to-media transitions, session restart, missing frame data, fallback restart and disposal. preservation coverage checks first-usable-view selection, matching texture/matrices, copied WebXR arrays, symmetric frusta, the device table and simulator crop.
validated with the SDK build, full test suite (134 files, 1,870 passed and 1 skipped), lint and Prettier on every touched file. not hardware-verified. Raw Camera Access still needs device/browser support and permission; this does not make it available on Galaxy XR or Aura.