Estoy tratando de mostrar modelos 3D en un proyecto nativo de reacción sin usar expo. Todo lo que puedo encontrar son ejemplos usando expo para reaccionar nativo.
Puede implementar modelos 3D (gltf, glb, obj...) en react-native usando Three.js
Ejemplo: https://github.com/pmndrs/react-three-fiber
import { createRoot } from 'react-dom/client' import React, { useRef, useState } from 'react' import { Canvas, useFrame } from '@react-three/fiber' function Box(props) { // This reference gives us direct access to the THREE.Mesh object const ref = useRef() // Hold state for hovered and clicked events const [hovered, hover] = useState(false) const [clicked, click] = useState(false) // Subscribe this component to the render-loop, rotate the mesh every frame useFrame((state, delta) => (ref.current.rotation.x += 0.01)) // Return the view, these are regular Threejs elements expressed in JSX return ( <mesh {...props} ref={ref} scale={clicked ? 1.5 : 1} onClick={(event) => click(!clicked)} onPointerOver={(event) => hover(true)} onPointerOut={(event) => hover(false)}> <boxGeometry args={[1, 1, 1]} /> <meshStandardMaterial color={hovered ? 'hotpink' : 'orange'} /> </mesh> ) } createRoot(document.getElementById('root')).render( <Canvas> <ambientLight /> <pointLight position={[10, 10, 10]} /> <Box position={[-1.2, 0, 0]} /> <Box position={[1.2, 0, 0]} /> </Canvas>, )Puede encontrar la documentación completa aquí: https://github.com/pmndrs/react-three-fiber
NOTA: Este no es mi código, solo lo pegué aquí como referencia.