Skip to content
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

Now drei’s OrbitControls works on React Native again? #49

Open
tomsoderlund opened this issue Oct 5, 2024 · 0 comments
Open

Now drei’s OrbitControls works on React Native again? #49

tomsoderlund opened this issue Oct 5, 2024 · 0 comments

Comments

@tomsoderlund
Copy link

Seems it's working now?

import React from 'react'
import { Canvas } from '@react-three/fiber/native'
import { OrbitControls } from '@react-three/drei/native'

const Plane: React.FC = () => {
  return (
    <mesh rotation={[0, 0, 0]} position={[0, 0, 0]}>
      <planeGeometry args={[1.8, 3.2]} />
      <meshStandardMaterial color='lightblue' />
    </mesh>
  )
}

const App3D: React.FC = () => {
  return (
    <Canvas>
      <OrbitControls />
      <ambientLight intensity={1} />
      <pointLight position={[0, 0, 1]} intensity={1.5} />
      <Plane />
    </Canvas>
  )
}
export default App3D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant