Decide: does orientation bypass the bridge via DeviceOrientationEvent in the WebView? #17
Notifications
Due Date
No due date set.
Blocks
Depends on
#14 Write the Session 1 spec (pose to splat rendering)
lars/splat-indoor-navigation
#16 Measure the RN → WebView pose-bridge latency
lars/splat-indoor-navigation
Reference: lars/splat-indoor-navigation#17
Reference in New Issue
Block a user
Question
Surfaced by #3's second addendum.
prototyping-session.mdassumes device orientation is read natively withexpo-sensorsand pushed into the WebView with position. But WKWebView supportsDeviceOrientationEvent/DeviceMotionEventnatively, so the WebView could read orientation itself with zero bridge hops — and orientation is the DoF the eye notices most when it lags.The trade:
react-native-webview— it doesn't implementrequestDeviceOrientationAndMotionPermissionForOrigin, so iOS 15+ re-prompts forever (#3408); the fix is one method returningWKPermissionDecisionGrant, widely used but unmerged. A patched dependency is a maintenance liability and must be recorded as such.Settle:
Note the interaction with #15: if ARKit is the positioning system, orientation arrives with it for free, and this decision may collapse. Decide it after #16 has numbers.
Part of the wayfinder map #1.
The calculus for this decision has weakened — read #3 addendum 3 before working it.
This ticket was created because the bridge looked expensive (~10ms per call). That figure is Android-only; on iOS
evaluateJavaScriptis ~0.2–1.5ms one-way. So the bypass buys perhaps a millisecond, against the cost of a patchedreact-native-webviewcarried indefinitely.That likely settles it toward no bypass — but two things still deserve deciding here:
Consider resolving this as "no bypass, and here's why" rather than as an open trade — it may be a five-minute close once #15 and #16 land.