Skip to content

okwasniewski/react-native-model3d

Repository files navigation

react-native-model3d

Render 3D models in visionOS apps

Screenshot

Installation

yarn add react-native-model3d

Supported platforms

  • visionOS
  • iOS (Coming soon)

Usage

import { Model3dView } from "react-native-model3d";

// ...

<Model3dView
  source="https://developer.apple.com/augmented-reality/quick-look/models/stratocaster/fender_stratocaster.usdz"
  aspectRatio="fit"
  onLoad={() => console.log('Model loaded')}
  style={styles.model3d}
/>

Props

Name Type Default Description
source string URL to the 3D model file
aspectRatio enum('fit', 'fill') 'fit' Aspect ratio of the view
onLoad function Callback called when the model is loaded

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library