Render 3D models in visionOS apps
yarn add react-native-model3d
- visionOS
- iOS (Coming soon)
import { Model3dView } from "react-native-model3d";
// ...
<Model3dView
source="https://developer.apple.com/augmented-reality/quick-look/models/stratocaster/fender_stratocaster.usdz"
modelAspectRatio="fit"
onLoad={() => console.log('Model loaded')}
style={styles.model3d}
/>
Name | Type | Default | Description |
---|---|---|---|
source | string | URL to the 3D model file | |
modelAspectRatio | enum('fit', 'fill') | 'fit' | Aspect ratio of the view |
onLoad | function | Callback called when the model is loaded |
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library