Skip to content

Releases

v1.4.0

Choose a tag to compare

@doranteseduardo doranteseduardo released this 26 Nov 23:51
8158408

Web AR in the right place and with more to read: surfaces come out in metres and keep their ids through a tracking loss, and the tracker's point cloud, feature-point hits and each surface's polygon reach the app. Cameras take a field of view, materials take emission and reflection, create() says when the browser has no usable WebGL2, and the gaze reticle is gone. Built on virocore 3.3.0's web build and the tinyvio engine of the same date, both in this package; what @reactvision/react-viro 3.3.0's web components need.

Added

  • AR point cloud: pointCloud, onPointCloudUpdated, setPointCloudEnabled and getPointCloud, in metres with stable ids; arDisplayPointCloud draws it.
  • AR hit tests return the feature point nearest the ray (kind: "featurePoint"); plane hits carry kind: "plane".
  • AR planes from the live tracker carry polygon.
  • Cameras: setCameraFieldOfView. Materials: setMaterialEmissionColor and the Emission and Reflective texture channels.

Changed

  • A tracked frame with a reason is Limited, as ARKit reports it, so the reason reaches the app.
  • No gaze reticle.

Fixed

  • Surfaces appear in metres, and keep their ids through a tracking loss. The first surfaces on an iPhone used to be tens of metres across and away, and a box placed after a loss landed metres off.
  • create() rejects with ViroWebGLUnavailableError ("unsupported" or "context-lost") instead of a bare RuntimeError: unreachable, or a renderer that never drew.

Check when upgrading

  • Copy the whole wasm/ and slam/ folders again: both binaries are new, and older viro releases keep working with them.

v1.3.0

Choose a tag to compare

@doranteseduardo doranteseduardo released this 21 Nov 18:56
58cc1be

Bindings for virocore 3.2.3's web build: portal backgrounds and events, per-face materials, full particle settings, physics queries and held forces, post-process effects, node pivots, mouse hover and scene-wide controller events. Web AR crops the camera feed instead of stretching it and runs faster on Android. What viro's web components need for the parity work in @reactvision/react-viro 3.2.3.

Added

  • Portals: per-portal backgrounds and enter/exit events.
  • Materials and geometry: one material per face or submesh, sphere segments and facing, polygon holes and UVs, texture stereo mode.
  • Particles and physics: every native emitter setting, held force and torque, ray and shape collision queries, collider debug drawing.
  • Scene and nodes: post-process effects, rotation and scale pivots, high-accuracy events, scene-wide ViroController handlers, and pause, resume and stop for declarative animations.
  • AR: ArPlaneAnchor.polygon from recordings and virtual feeds.

Changed

  • The mouse hovers, and a tap on empty space reports [] as its position, as native does.

Fixed

  • Web AR on Android reads camera frames through VideoFrame: a Pixel 6 Pro goes from 14 to 20–24 fps.
  • The camera feed is cropped, not stretched, and hit tests use the same crop.
  • A .gltf with external files fails that one model instead of aborting the wasm, and portals keep drawing after the camera walks through.

Check when upgrading

  • Copy the whole wasm/ folder again: the binary is new, and older viro releases keep working with it.

v1.2.0

Choose a tag to compare

@doranteseduardo doranteseduardo released this 19 Nov 03:50
80e066b

1.2.0

Styled text, material effects, pinch, rotate and fuse, node transform and bounding box reads, and recovery from a lost WebGL context: what viro's web components need to match native in @reactvision/react-viro 3.2.2.

Added

  • Styled text: createStyledText with a family list, weight, italic, extrusion and an outline or drop shadow; loadTextFace fetches the Roboto face a weight or italic needs, once per page.
  • Material effects: setMaterialAlpha, setMaterialBloomThreshold, setMaterialColorWriteMask and setMaterialChromaKey.
  • Pinch, rotate and fuse on the node under two fingers, and setNodeTimeToFuse.
  • Node reads: getNodeWorldTransform and getNodeBoundingBox, in native's shapes.
  • Context loss: isContextLost and addContextListener.

Fixed

  • The canvas is opaque, as a native view is.
  • dispose() stops the render loop, so a remount no longer adds a loop.
  • pointercancel no longer completes a click.

Check when upgrading

  • Copy the whole wasm/ folder: it now carries the 11 Roboto faces beside viro-web.wasm, fetched when a text asks for a weight or italic.

v1.1.1

Choose a tag to compare

@doranteseduardo doranteseduardo released this 09 Nov 17:31
dfc780b

v1.1.1

Needs the virocore web build of 3.1.1; it ships in this package.

Fixed

  • Metal surfaces look metallic without an environment map, an occlusion map on TEXCOORD_1 samples that set, glTF normalTexture.scale and occlusionTexture.strength apply, and mirrored nodes draw their faces (virocore 3.1.1's web build).

v1.1.0

Choose a tag to compare

@doranteseduardo doranteseduardo released this 08 Nov 21:52
a062bc6

v1.1.0

Needs the virocore web build of 3.1.0 and tinyvio's setFusedUp; both ship in this package.

Fixed

  • Web AR content stays in the room on iPhone (arSession.ts). It swung around when the phone turned and stuck to the screen when tracking dropped. Four causes, each measured on device:

    • WebKit fills rotationRate's alpha, beta and gamma with the sensor's X, Y and Z rates, not in the spec's order; read the spec's way, pitch and yaw landed on each other's axes.
    • tinyvio was told the camera and the IMU share axes. For a rear camera in portrait they differ on two, and the gyro prediction pushed features the wrong way.
    • iOS reports accelerationIncludingGravity with the opposite sign to the spec. The old single-axis flip was a reflection, not a rotation.
    • With tracking lost the renderer held the last pose, so the content rode along with the screen.
  • Vertex colours show. The engine's web shaders now multiply the vertex colour, as the native ones do (virocore 3.1.0's web build).

  • Skinned GLBs draw. The vertex shader took bone indices as signed integers while glTF's 8- and 16-bit joints are bound unsigned, and WebGL refused every draw of a skinned mesh (virocore 3.1.0's web build).

  • More of glTF loads and draws (virocore 3.1.0's web build). KHR_texture_transform, KHR_node_visibility and KHR_animation_pointer, textures on TEXCOORD_1 and later sets, emissive textures and 8-bit index buffers. Opaque materials were see-through where their texture's alpha was low, characters whose rig animates a node above each joint stood in their bind pose, a file with animation pointers failed to load at all, and emission never showed on physically based materials.

Added

  • hideContentWhenLost (default true). After a quarter second without a pose the scene's content is hidden, and it comes back with the first fresh pose; the camera feed keeps drawing. false keeps the old behaviour.
  • The fused up vector from deviceorientation goes to tinyvio through setFusedUp when the engine has it, which keeps the floor level while tracking is down to rotation only.
  • requestDeviceMotionPermission also asks for orientation permission, in the same tap.

v1.0.1

Choose a tag to compare

@doranteseduardo doranteseduardo released this 01 Oct 02:03
69afeca

v1.0.1

Fixes found running the web player against real scenes. The compiled renderer in this release is virocore 3.0.2; the new calls fall back to the old path on an older binary, but the heap, tap and dropout fixes live in the binary and need this one.

Fixed

  • Large models no longer kill the renderer. The heap was fixed at 256 MB, and a 30 to 40 MB generated GLB crossed it once decoded; abort("OOM") is permanent, so every later call failed and the canvas stayed black. The heap now grows to 2 GB, and glTF loads no longer copy the model.
  • An abort is reported. onAbort in the options, renderer.addAbortListener() and renderer.abortedWith. Model loads in flight settle as failed.
  • Model files leave the virtual FS once loaded, instead of staying in JS memory for the life of the page.
  • Taps land where they are drawn. They were mirrored about the horizontal axis.
  • Web AR holds its pose through a dropout instead of snapping to a default orientation. tinyvio's poseConfidence decides the state: RotationOnly applies rotation and holds position, None holds the last pose.
  • The pose is smoothed with a One Euro filter (poseSmoothing, or false for the raw solve), and onStatus is debounced out of Normal and carries confidence and reason.
  • The camera feed draws from the stream at feedWidth/feedHeight (default 1280x960) through a source texture, with no per-frame readback; the tracker gets a downscaled copy.
  • Web AR starts under Vite. The tracker's wasm path lost its trailing slash in dev, and an engine loaded through loadSlam was pointed at the package's copy instead of its own.

Added

  • PoseConfidence, TrackingReason, PoseFilter, ViroRendererAbortError; ViroSceneApi.createSourceTexture and updateTextureFromSource.

v1.0.0

Choose a tag to compare

@doranteseduardo doranteseduardo released this 20 Sep 02:40

1.0.0

First published release. The Viro renderer — the same C++ engine ViroReact runs natively on iOS, Android, Apple Vision Pro and Meta Quest — compiled to WebAssembly and drawing through WebGL2.

This package ships the compiled module, its Emscripten glue, and a typed loader, scene API and AR session on top. It is what ViroReact renders through on the web: install it alongside @reactvision/react-viro and the web navigators pick it up. You can also drive it directly.

Web AR is included

Pose tracking and plane detection come from tinyvio, ReactVision's own visual-inertial tracker, and it ships inside this package — 260 KB of WASM under slam/, loaded by ViroArSession.start() with no configuration. There is no second module to obtain or host.

ViroArSession captures the camera and IMU, feeds the tracker, converts the pose from the tracker's Z-up/OpenCV frame into the renderer's Y-up/GL frame, and injects it. A playback mode replays a recorded session instead of tracking a live one.

Requirements

Browsers Chrome, Edge, Safari (iOS + macOS), Firefox
3D scenes WebGL2, and nothing else
AR additionally HTTPS and a device with an IMU — camera and DeviceMotion are both gated on a secure context
Threading single-threaded: SharedArrayBuffer and COOP/COEP headers are not required
Modules ESM only. There is no CommonJS build; require() will not work

The module is three files — viro-web.js, viro-web.wasm and viro-web.data — and all three must be reachable at runtime. Bundler recipes are in the README.

Text renders in Roboto

Preloaded into viro-web.data and redistributed under Apache 2.0. It is the same face Viro renders text in on Android and Quest, so the three agree; iOS uses the system font.

Known limits

  • dispose() settles in-flight model loads and clears its handler maps, but it cannot stop the WASM main loop. That is a limitation of the C API, and it is documented rather than implied.
  • Five of the eight SlamTuning fields and all four SlamIntrinsics distortion coefficients are accepted and ignored by the tracker.
  • onStatus's Normal does not mean the world is metric, and ArPlaneAnchor.width / height are a bounding box over a polygon, not the polygon itself.
  • The glue module is reached through an indirection so that bundlers can parse it, and that indirection needs unsafe-eval. A page under a strict CSP should pass importGlue instead.

Licensing

MIT, and so is the bundled tracker. The binaries statically link libjpeg, FreeType, Bullet, protobuf-lite, zlib, SDL2 and the Emscripten runtime — all permissive, all credited in THIRD-PARTY-LICENSES.md. If you copy the binaries to a CDN, that file is the notice to keep with them.


The full engineering detail for this release, including what was fixed between the last internal build and this publish, is in CHANGELOG.md.