Skip to content

v3.4.0

Latest

Choose a tag to compare

@doranteseduardo doranteseduardo released this 03 Dec 19:24
ca20688

Quest gets one-shot sounds without a component per cue, hand joints through onHandUpdate, session recording and image markers from the passthrough camera, and an exitVRScene() that says what it did. ViroGameLoopUtils plays and stops animations without a render, on every platform including the web, and a reset returns a model to the pose it loaded in. AR sessions report why they could not start, the depth map is readable from JavaScript, and scans record what the camera did on each frame so ViroScan can handle low light. Built on virocore 3.4.0. The web build works with @reactvision/viro-web-renderer 1.4.0 or later.

Quest

  • ViroSound.playOneShot and ViroSpatialSound.playOneShot play a preloaded clip once, positioned or head-locked, with nothing mounted: decoded once, played from memory, nothing on the main thread. Also on iOS; on visionOS and the web they resolve false.
  • onHandUpdate on ViroXRSceneNavigator is called: 25 named joints per hand in scene coordinates, up to 30 times a second, and nothing computed while the prop is unset.
  • startRecording / stopRecording in mixed-reality scenes, from the passthrough camera; ViroARImageMarker and Studio's image-triggered assets work on the headset; Studio's free-tier watermark shows in the headset view.
  • exitVRScene() resolves with { finished, panel } and takes { panel: "direct" }; it no longer does nothing in silence when it cannot find the VRActivity.
  • Controllers and activities: ray requests always settle and reject with E_CONTROLLER_NOT_READY or E_CONTROLLER_TIMEOUT instead of crashing or hanging; an older ViroController gets events back when a newer one is torn down; the menu button reaches the scene root; a finishing VRActivity no longer answers the next headset view, and launchVRScene waits for it.

Animation

  • ViroGameLoopUtils.playAnimation and stopAnimation play, switch or stop a node's animation with no React render, on Android, iOS, visionOS and the web.
  • stopAnimation({ mode: "reset" }) returns a model to the pose it loaded in, morph targets and skeleton included.
  • Android: an animation prop set again with equal values is left alone, instead of restarting or logging Unable to play animation in state RUNNING.

AR

  • onARSessionError on ViroARSceneNavigator: ARCore startup failures on Android, an unsupported device or denied camera on iOS.
  • getDepthMap(): depth in metres, confidence, intrinsics and the camera pose, from LiDAR, the monocular estimator or ARCore's Depth API.
  • Scans: startRecording options for low light (maxExposure, torch, codec, bitrate, stills), getCaptureConditions() to guide the user, per-frame exposure, light and tracking in every recording, and startScanCapture / stopScanCapture for ViroScan room and object captures.
  • ViroObjectDetector takes an https:// model, downloaded once and cached.
  • ViroPhysicsReplicator shares physics bodies across devices over a ViroReplicationClient.

Android

  • shaderModifiers and materialUniforms as node props, and canDrag, canPinch, canRotate on the scene root, as on iOS.
  • ViroSound.preloadSounds loads bundled sounds in a release build.

Web

  • ViroGameLoopUtils.setPosition, setRotation and setScale no longer throw, so useViroMapCamera works.
  • Warnings, once each, for scenes that cannot work as written: an unwired ViroARPlaneSelector, malformed transforms, an unknown physics body type, a ViroText too small to read, a body that has fallen out of the world.

Types

  • A three-argument onCollision handler type-checks; bloomThreshold is optional; a Compound physics shape needs no params.

Check when upgrading

  • Quest one-shots and markers: one-shots need ViroSound.preloadSounds first. Recording and image markers on the headset need Quest 3 or 3S, Horizon OS v74 or later, and CAMERA and horizonos.permission.HEADSET_CAMERA granted at runtime.
  • exitVRScene() returns a promise. Code that ignored the return value is unaffected.