HomeGuidesAPI ReferenceChangelogDiscussions
Hire a ReactVision Expert 🛠️Launch Studio 🖥️Sponsor on GitHub ❤️Log In
Changelog
fixed

ViroReact 3.2.1: placed content stays put, cloud anchors and Android fixes

Content placed at the root of an AR scene stays put: every direct child of ViroARScene is now anchored on iOS, as it already was on Android, and on Android it waits for tracking instead of giving up. Tracking no longer flickers on phones such as the Galaxy A56, reactvision cloud anchors host on a slow uplink and can be followed on Android, release builds with R8 pass, and an AR scene hidden by a tab switch no longer crashes on a queued call. Renderer binaries are rebuilt on virocore 3.2.1 with ReactVision Spatial 1.5.0, and the web build still uses @reactvision/viro-web-renderer 1.1.1. There are no new requirements: 3.2.1 needs React Native 0.88 and Expo SDK 58, like 3.2.0. Read Check when upgrading before you update.

Everywhere

  • A tap on a moving node fires onClick. A node that moved during the press (an animation, physics, the camera) got onClickState down and up but no onClick. A short tap that barely moves now completes the click on the pressed node. See ViroNode.
  • A node faded by its parent's opacity no longer hides translucent content behind it, such as text or another faded object. Its children were drawn as opaque and wrote depth.

iOS

  • Content placed at the root of an AR scene stays put as ARKit refines its map. Each direct child of ViroARScene is anchored with an ARKit anchor once tracking is NORMAL, as on Android. Its position, animations, drag and physics keep working in scene coordinates. Anchors, markers, planes and ViroVPSAnchor are left alone. See ViroARScene.
  • ViroARObjectMarker fires when its object is detected. Object anchors were dropped on every current iOS version, so an object marker never fired. An .arobject that fails to load is now skipped with a warning instead of crashing the app. See ViroARObjectMarker.

Android

  • Tracking no longer flickers on phones that could not sustain Viro's camera config (#568). On some mid-range phones, such as the Galaxy A56, onTrackingUpdated alternated between UNAVAILABLE and NORMAL about ten times a second and no plane lasted. The camera config is now capped at 1920×1080 at 30 fps, a paused plane is kept instead of removed, and UNAVAILABLE reaches onTrackingUpdated after about 200 ms.
  • A node at the root of an AR scene anchors once tracking starts, however long that takes. When tracking took more than about three seconds to start (a dim room, a covered camera, fast motion), the node used up its three tries and floated for the session. A position set on the node while it waits is now the one it anchors at.
  • A release build with R8 minification passes. Viro's consumer rules tell R8 to ignore the protobuf and VR logging classes the bundled GVR SDK references but does not ship (Missing classes detected while running R8). Expo SDK 58's Android template turns minification on, so an app on it hit this on its first release build. Nothing changes at runtime.
  • An AR scene method called while its screen is hidden answers AR scene not available instead of crashing. A tab switch or a screen pushed on top tears the scene down without unmounting it, and a queued call such as a getCameraGeospatialPose poll crashed the app.
  • Hosting a cloud anchor with the reactvision provider no longer fails on a slow uplink. The upload timed out after 30 s even while it was still sending. The timeout now grows with the upload, up to 140 s, and a failed upload is sent once more.
  • Content can follow a cloud anchor resolved with the reactvision provider. The resolve result is now an ARCore anchor: onAnchorUpdated on ViroARScene reports it under anchor.anchorId, and the children of <ViroARPlane anchorId={anchor.anchorId}> move with it, so content stays on the real spot after ARCore relocalises. Content placed from anchor.position alone still does not move. See Cloud Anchors.

ReactVision Spatial

  • Cloud anchor resolve reports are accurate. The report sent after a resolve carries the attempt's real match and inlier counts and why it failed or was cancelled, and hosting sends the device and the descriptor format, so the dashboard's numbers are right.

Check when upgrading

  • Android: a reactvision resolve result's anchor.anchorId is now the ARCore anchor's id. cloudAnchorId is unchanged. An app that stored the old anchorId sees a different value.
  • Android: UNAVAILABLE from onTrackingUpdated arrives about 200 ms after tracking drops, not on the first frame. NORMAL is still reported at once.
  • ViroARScene.createAnchoredNode returns an anchor nothing can be attached to. To keep placed content in place, render it as a direct child of ViroARScene. See ViroARScene.

Install with npm install @reactvision/[email protected]. Upgrading from 3.1.x? Read Upgrading to 3.2.0 first. Full notes: ReactVision/viro v3.2.1.