Repository navigation
Web AR: point cloud props, FeaturePoint hits, Studio fallback to a feature point - #634
Merged
Merged
Conversation
This was referenced Nov 26, 2026
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The web half of parity items 20 and 43:
onARPointCloudUpdateanddisplayPointCloudonViroARScene,FeaturePointhit results, and Studio's web player placing on a feature point when a tap misses every plane, as the native host does. The tracker fixes behind it (surfaces in metres, ids through a loss) arrive through the renderer, with nothing to change here.What changed
Point cloud (
components/Web/viroPointCloud.ts)useViroPointCloudturns the session's point reads on while either prop is set, and off when neither is.onARPointCloudUpdatefires every frame there are points, in native's shape:pointsas[x, y, z, confidence](confidence 1; the web tracker has none) andidentifiers. The tracker only gives points once its scale is metric, so the callback stays quiet until then.displayPointCloudasks the renderer to draw the points, withimageSource(loaded into a texture),imageScaleandmaxPoints; it stops drawing and frees the texture on unmount.Hit tests
featurePointHitResultbuilds aFeaturePointresult (no anchor, rotation zero).ViroARScene's hit tests map the session's feature-point hits to it beside the plane hits.StudioARScene.web'spickBestHitfalls back toFeaturePointafterExistingPlaneUsingExtentandExistingPlane, the native host's order without depth points, which the web does not have.Tracking reasons
No change here: the renderer now reports a tracked frame with excessive motion, too few features or too little light as
Limited, soonTrackingUpdatedgetsTRACKING_LIMITEDwith that reason, as on iOS.Related
Testing
npx tsc --noEmitis clean;npx jest: 1261 tests pass.webPointCloud.test.tsx: the payload is native's shape; a feature-point result has no anchor; the hook enables reads only while a prop wants them, reports points each frame once there are any, and starts and stops the renderer's display.