v2.50.0
ReactVision 2.50.0 Release Notes
New Features
All features from ViroCore 2.50.0 are included, plus React Native specific bug fixes.
Cloud Anchors
Cross-platform AR anchor sharing between iOS and Android devices.
- Cross-Platform: Share anchors between iOS and Android devices
- Persistent: Anchors can be stored for 1-365 days
- Accurate: Sub-centimeter accuracy in good conditions
- Scalable: Supports multiple concurrent users
<ViroARSceneNavigator cloudAnchorProvider="arcore">
{/* Use sceneNavigator.hostCloudAnchor() and resolveCloudAnchor() */}
</ViroARSceneNavigator>API Highlights:
hostCloudAnchor(anchorId, ttlDays)- Upload anchor to Google's serversresolveCloudAnchor(cloudAnchorId)- Retrieve anchor on another devicecancelCloudAnchorOperations()- Cancel pending operations
Geospatial API
Location-based AR with GPS coordinates using Google's ARCore Geospatial API.
- Earth Tracking: Track device position using GPS and Visual Positioning System (VPS)
- Three Anchor Types: WGS84 (absolute altitude), Terrain (relative to ground), and Rooftop (relative to buildings)
- VPS Availability Check: Verify if enhanced positioning is available at a location
<ViroARSceneNavigator geospatialAnchorProvider="arcore">
{/* Use createGeospatialAnchor(), createTerrainAnchor(), createRooftopAnchor() */}
</ViroARSceneNavigator>API Highlights:
createGeospatialAnchor(lat, lng, altitude, quaternion)- WGS84 anchorcreateTerrainAnchor(lat, lng, altitudeAboveTerrain, quaternion)- Ground-relative anchorcreateRooftopAnchor(lat, lng, altitudeAboveRooftop, quaternion)- Building-relative anchorgetCameraGeospatialPose()- Get current location with accuracy metricscheckVPSAvailability(lat, lng)- Check VPS support at location
Scene Semantics
ML-based scene understanding with 12 semantic labels.
- 12 Semantic Labels: sky, building, tree, road, sidewalk, terrain, structure, object, vehicle, person, water, unlabeled
- Real-time Processing: Per-frame label fractions
- Use Cases: Outdoor detection, environment-aware content, safety warnings
// Enable via cloudAnchorProvider or geospatialAnchorProvider
// Use getSemanticLabelFractions() for environment detection
const { fractions } = await arSceneNavigator.getSemanticLabelFractions();
if (fractions.sky > 0.1) {
console.log("User is outdoors!");
}Depth Occlusion
Visual occlusion behind real-world objects for realistic AR blending.
- Three Modes: Disabled, DepthBased, PeopleOnly
- Realistic Blending: Virtual objects hidden behind real surfaces
- People Segmentation: Option to only occlude behind detected people
<ViroARSceneNavigator occlusionMode="depthBased">
{/* Virtual content properly occluded behind real surfaces */}
</ViroARSceneNavigator>Occlusion Modes:
"disabled"- No occlusion (virtual objects always on top)"depthBased"- Use depth data to occlude behind real surfaces"peopleOnly"- Only occlude behind detected people
Extended glTF Support
Expanded glTF 2.0 support with 17 additional features for improved 3D model compatibility.
Core Geometry & Materials
- Non-indexed geometry support - Primitives without index buffers
- LINE_LOOP primitive type - Converted to line strip with closing segment
- TRIANGLE_FAN primitive type - Converted to individual triangles
- Mipmap filter modes - Proper separation of min/mip filtering
- Alpha masking (MASK mode) - With alphaCutoff support
- Emissive materials - emissiveFactor and emissiveTexture
- STEP animation interpolation - Discrete keyframe transitions
- Sparse accessor support - Override specific buffer values
Camera & Scene
- Perspective cameras - FOV, near/far planes, aspect ratio
- Orthographic cameras - xmag, ymag, clipping planes
- Default scene selection - Respects model.defaultScene
Lighting (KHR_lights_punctual)
- Directional lights - Color, intensity
- Point lights - Color, intensity, range/attenuation
- Spot lights - Color, intensity, range, inner/outer cone angles
Material Extensions
- KHR_materials_unlit - Constant/unlit lighting model
- Normal texture scale - Controls bump intensity
- Occlusion texture strength - Controls AO influence
Bug Fixes
Memory Leak Fix
- Enhanced memory safety across 8 Java modules through Fabric architecture migration
- Fixed null reference issues in prop application during React Native's pre-attachment phase
- Improved stability during AR session transitions and low-end device scenarios
- Migrated 30 methods to use Fabric's
UIBlockpattern for safer memory management
Affected Modules:
- ARSceneModule
- ARSceneNavigatorModule
- CameraModule
- ControllerModule
- NodeModule
- SceneModule
- SceneNavigatorModule
- VRT3DSceneNavigatorModule
onClick iOS Fix
- Fixed ViroText onClick event handling on iOS
- Resolved issue where onClick prop was incorrectly passed to native code, interfering with event delegation
- Fixes GitHub issue #272
AR Image Marker Fix
- Improved ARImageMarker lifecycle management with proper weak reference patterns
- Prevents retain cycles and memory leaks during image target tracking
- Proper cleanup via
removeARImageTarget()when updating targets
Setup
Expo Projects
{
"expo": {
"plugins": [
[
"@reactvision/react-viro",
{
"googleCloudApiKey": "YOUR_API_KEY",
"cloudAnchorProvider": "arcore",
"geospatialAnchorProvider": "arcore",
"android": {
"xRMode": ["AR"]
}
}
]
]
}
}Then rebuild:
npx expo prebuild --clean
npx expo run:ios
# or
npx expo run:androidBare React Native Projects
iOS - Podfile:
use_frameworks! :linkage => :dynamic
pod 'ARCore/CloudAnchors', '~> 1.51.0'
pod 'ARCore/Geospatial', '~> 1.51.0'
pod 'ARCore/Semantics', '~> 1.51.0'iOS - Info.plist:
<key>GARAPIKey</key>
<string>YOUR_GOOGLE_CLOUD_API_KEY</string>Android - AndroidManifest.xml:
<meta-data
android:name="com.google.android.ar.API_KEY"
android:value="YOUR_GOOGLE_CLOUD_API_KEY" />Requirements
- iOS: iOS 12.0+, ARKit-capable device
- Android: Android 7.0+ (API 24), ARCore-supported device
- Google Cloud: Valid API key with ARCore API enabled
- Depth Features: LiDAR (iOS) or ToF sensor/ARCore Depth API (Android)