Repository navigation
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.playOneShotandViroSpatialSound.playOneShotplay 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 resolvefalse.onHandUpdateonViroXRSceneNavigatoris called: 25 named joints per hand in scene coordinates, up to 30 times a second, and nothing computed while the prop is unset.startRecording/stopRecordingin mixed-reality scenes, from the passthrough camera;ViroARImageMarkerand 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_READYorE_CONTROLLER_TIMEOUTinstead of crashing or hanging; an olderViroControllergets 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, andlaunchVRScenewaits for it.
Animation
ViroGameLoopUtils.playAnimationandstopAnimationplay, 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
animationprop set again with equal values is left alone, instead of restarting or loggingUnable to play animation in state RUNNING.
AR
onARSessionErroronViroARSceneNavigator: 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:
startRecordingoptions for low light (maxExposure,torch,codec,bitrate,stills),getCaptureConditions()to guide the user, per-frame exposure, light and tracking in every recording, andstartScanCapture/stopScanCapturefor ViroScan room and object captures. ViroObjectDetectortakes anhttps://model, downloaded once and cached.ViroPhysicsReplicatorshares physics bodies across devices over aViroReplicationClient.
Android
shaderModifiersandmaterialUniformsas node props, andcanDrag,canPinch,canRotateon the scene root, as on iOS.ViroSound.preloadSoundsloads bundled sounds in a release build.
Web
ViroGameLoopUtils.setPosition,setRotationandsetScaleno longer throw, souseViroMapCameraworks.- Warnings, once each, for scenes that cannot work as written: an unwired
ViroARPlaneSelector, malformed transforms, an unknown physics body type, aViroTexttoo small to read, a body that has fallen out of the world.
Types
- A three-argument
onCollisionhandler type-checks;bloomThresholdis optional; a Compound physics shape needs noparams.
Check when upgrading
- Quest one-shots and markers: one-shots need
ViroSound.preloadSoundsfirst. Recording and image markers on the headset need Quest 3 or 3S, Horizon OS v74 or later, andCAMERAandhorizonos.permission.HEADSET_CAMERAgranted at runtime. exitVRScene()returns a promise. Code that ignored the return value is unaffected.