-
Notifications
You must be signed in to change notification settings - Fork 193
ReactVision 2.43.1 #347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReactVision 2.43.1 #347
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces full support for React Native’s New Architecture (Fabric) in ReactVision by integrating a Fabric Interop Layer and updating numerous components, native modules, and documentation.
- Integrated Fabric support via a custom JSI bridge and interop layer.
- Updated 40+ components and examples to support automatic architecture detection.
- Revised documentation, changelogs, and example projects to reflect the new changes.
Reviewed Changes
Copilot reviewed 453 out of 453 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
fabric-interop/components/Material/ViroMaterials.ts | Added material management functions and native registration. |
fabric-interop/components/Animation/ViroAnimations.ts | Provided registry and execution functions for animations. |
fabric-interop/components/AR/ViroCommonProps.ts | Defined common AR props with some API inconsistencies in collision callbacks. |
fabric-interop/components/AR/ViroARTrackingTargets.ts | Implemented target registration and native syncing methods. |
fabric-interop/components/AR/ViroARPlaneSelector.tsx | Added AR plane selection logic with fixed plane slots. |
fabric-interop/components/AR/ViroARPlane.tsx | Created an AR plane container with event listener registration. |
fabric-interop/android/... | Introduced native container managers and JSI bridge implementation for Fabric. |
fabric-interop/ViroFabricContainer.tsx | Developed the main Fabric container component with initialization and cleanup. |
dynamic-index.ts | Enabled dynamic architecture detection to route imports correctly. |
README.md, CHANGELOG.md, NEW_ARCHITECTURE_IMPLEMENTATION.md | Updated documentation to reflect Fabric support and migration details. |
Comments suppressed due to low confidence (1)
fabric-interop/components/AR/ViroCommonProps.ts:77
- The onCollision callback defined here takes three parameters, while a different signature (with no parameters) is declared later in ViroObjectProps. Consider unifying the collision callback API for consistent behavior.
onCollision?: (viroTag: string, collidedPoint: Viro3DPoint, collidedNormal: Viro3DPoint) => void;
highAccuracyGaze?: boolean; | ||
physicsBody?: ViroPhysicsBody; | ||
|
||
onCollision?: () => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This collision callback signature (with no parameters) contrasts with the earlier definition in ViroCommonProps. Unify the onCollision callback signatures to avoid potential API confusion and ensure consistency across AR components.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates full support for React Native’s New Architecture in ReactVision by introducing a Fabric interop layer that updates or adds all ViroReact components to use native JSI bridges and the Fabric rendering system. Key changes include:
- A new Fabric interop layer with over 40 updated ViroReact components.
- Implementation of JSI bridge functions and native event handling through the ViroFabricContainer.
- Updates to documentation and build configurations to enforce React Native New Architecture support.
Reviewed Changes
Copilot reviewed 81 out of 510 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
fabric-interop/components/ViroSpotLight.tsx | New Fabric-enabled component for adding spot lighting in 3D scenes. |
fabric-interop/components/ViroSpinner.tsx | New Fabric-enabled component for displaying loading spinners in 3D space. |
fabric-interop/components/ViroSphere.tsx | New Fabric-enabled component for rendering customizable 3D spheres. |
fabric-interop/components/ViroSpatialSound.tsx | New Fabric-enabled component for playing spatial audio in 3D scenes. |
fabric-interop/components/ViroSoundField.tsx | New Fabric-enabled component for creating ambient audio fields. |
fabric-interop/components/ViroSound.tsx | New Fabric-enabled component for basic audio playback in the scene. |
fabric-interop/components/ViroSkyBox.tsx | New Fabric-enabled component for creating immersive skybox environments. |
fabric-interop/components/ViroSceneNavigator.tsx | New Fabric-enabled navigator for rendering and managing 3D scenes. |
fabric-interop/components/ViroScene.tsx | Updated Fabric-enabled scene component that manages 3D scene lifecycle. |
fabric-interop/components/ViroQuad.tsx | New Fabric-enabled component for rendering 2D quads in 3D space. |
fabric-interop/components/ViroPortalScene.tsx | New Fabric-enabled component to define portal scene content. |
fabric-interop/components/ViroPortal.tsx | New Fabric-enabled component for creating portal entrances in scenes. |
fabric-interop/components/ViroPolyline.tsx | New Fabric-enabled component for rendering 3D polylines. |
fabric-interop/components/ViroPolygon.tsx | New Fabric-enabled component for rendering 2D polygons in 3D space. |
fabric-interop/components/ViroParticleEmitter.tsx | New Fabric-enabled component for creating and managing particle effects. |
fabric-interop/components/ViroOrbitCamera.tsx | New Fabric-enabled component for orbital camera control. |
fabric-interop/components/ViroOmniLight.tsx | New Fabric-enabled component for omnidirectional lighting support. |
fabric-interop/components/ViroNode.tsx | New Fabric-enabled container component providing coordinate system for children. |
fabric-interop/components/ViroMaterialVideo.tsx | New Fabric-enabled component for using video as material textures. |
fabric-interop/components/ViroLightingEnvironment.tsx | New Fabric-enabled component for environment-based HDR lighting setup. |
fabric-interop/components/ViroImage.tsx | New Fabric-enabled component for displaying 2D images in 3D space. |
fabric-interop/components/ViroGlobal.ts | Utility for type-safe access to the global NativeViro object via JSI. |
fabric-interop/components/ViroGeometry.tsx | New Fabric-enabled component for rendering custom 3D geometry. |
fabric-interop/components/ViroFlexView.tsx | New Fabric-enabled component for creating flexible layouts in 3D space. |
fabric-interop/components/ViroDirectionalLight.tsx | New Fabric-enabled component for directional lighting effects. |
fabric-interop/components/ViroController.tsx | New Fabric-enabled component for VR controller interaction and event handling. |
fabric-interop/components/ViroCamera.tsx | New Fabric-enabled component for controlling scene camera properties. |
fabric-interop/components/ViroButton.tsx | New Fabric-enabled component for interactive 3D buttons with visual feedback. |
fabric-interop/components/ViroBox.tsx | New Fabric-enabled component for 3D boxes with customizable dimensions and materials. |
fabric-interop/components/ViroAnimatedImage.tsx | New Fabric-enabled component for displaying animated 2D images in 3D scenes. |
fabric-interop/components/ViroAnimatedComponent.tsx | New Fabric-enabled wrapper for adding animations to Viro components. |
fabric-interop/components/ViroAmbientLight.tsx | New Fabric-enabled component for ambient lighting in 3D scenes. |
fabric-interop/components/ViroARSceneNavigator.tsx | New Fabric-enabled component for rendering AR scenes with AR session management. |
fabric-interop/components/ViroARScene.tsx | New Fabric-enabled AR scene component with AR-specific event handling. |
fabric-interop/components/ViroARPlaneSelector.tsx | New Fabric-enabled component providing UI for selecting detected AR planes. |
fabric-interop/components/AR/ViroARPlane.tsx | Fabric-enabled container component anchoring Viro components to detected AR planes. |
fabric-interop/components/AR/ViroARObjectMarker.tsx | New Fabric-enabled component for detecting and tracking real-world objects. |
fabric-interop/components/AR/ViroARImageMarker.tsx | New Fabric-enabled component for detecting and tracking real-world images. |
fabric-interop/components/ViroARCamera.tsx | New Fabric-enabled component for AR camera control with transform and tracking events. |
fabric-interop/components/Viro3DSceneNavigator.tsx | New Fabric-enabled component providing navigation between multiple 3D scenes. |
fabric-interop/components/Viro3DObject.tsx | New Fabric-enabled component for loading and displaying 3D models in various formats. |
fabric-interop/components/Viro360Video.tsx | New Fabric-enabled component for displaying 360° videos in immersive scenes. |
fabric-interop/components/Viro360Image.tsx | New Fabric-enabled component for displaying 360° images as panoramic environments. |
fabric-interop/components/Types/ViroUtils.ts | Type definitions for Viro utility types and commonly used props. |
fabric-interop/components/Types/ViroEvents.ts | Comprehensive type definitions for Viro event handling. |
fabric-interop/components/Material/ViroMaterials.ts | Utility module for creating, managing, and updating Viro materials. |
fabric-interop/components/Animation/ViroAnimations.ts | Utility module for registering and executing animations via JSI bridge. |
fabric-interop/components/AR/ViroCommonProps.ts | Common prop type definitions for AR components. |
fabric-interop/components/AR/ViroARTrackingTargets.ts | Utility for registering and managing AR tracking targets. |
fabric-interop/components/AR/ViroARPlaneSelector.tsx | (See above) Component wrapping AR plane selection logic. |
fabric-interop/components/AR/ViroARPlane.tsx | Fabric-enabled AR plane component anchoring children to detected surfaces. |
fabric-interop/ViroFabricContainer.tsx | Main Fabric container component that initializes the Viro system via JSI and manages native events. |
fabric-interop/README.md | Updated documentation detailing New Architecture requirements, setup instructions, and component support. |
this was a commit pending to ship
🚀 React Native New Architecture Support for ReactVision (Viro)
This PR adds full support for React Native’s New Architecture to the ReactVision (Viro) library by integrating with an existing Fabric Interop Layer.
✅ Summary of Changes
🧪 Testing
<ViroBox>
,<ViroText>
).📘 Documentation
📌 Implementation Strategy
📚 References
This PR establishes the recommended path for supporting the React Native New Architecture in ReactVision without requiring a disruptive rewrite.