Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/darnfish/use-synced-camera

Sync multiple cameras position / quaternion / rotation in @react-three/fiber
https://github.com/darnfish/use-synced-camera

react react-three-fiber threejs

Last synced: about 15 hours ago
JSON representation

Sync multiple cameras position / quaternion / rotation in @react-three/fiber

Awesome Lists containing this project

README

        

# useSyncedCamera
Sync multiple cameras position/quaternion/rotation in react-three/fiber

You can view a demo [here](https://usdztogltf.com), or watch below:

https://user-images.githubusercontent.com/8293444/219300723-9a35946a-ac05-4109-966f-a7dff88dad46.mp4

## Installation
```bash
yarn add use-synced-camera
```

## Usage
```tsx
import useSyncedCamera from 'use-synced-camera'

import { useThree } from '@react-three/fiber'
import { OrbitControls } from '@react-three/drei'

function SceneA() {
const update = useSyncedCamera(useThree)

return (
<>


>
)
}

function SceneB() {
const update = useSyncedCamera(useThree)

return (
<>


>
)
}

function App() {
return (






)
}
```

## License
MIT