Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/darnfish/use-synced-camera
- Owner: darnfish
- License: mit
- Created: 2023-02-16T05:57:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-17T00:10:59.000Z (almost 2 years ago)
- Last Synced: 2025-01-24T09:48:24.449Z (21 days ago)
- Topics: react, react-three-fiber, threejs
- Language: TypeScript
- Homepage:
- Size: 36.1 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# useSyncedCamera
Sync multiple cameras position/quaternion/rotation in react-three/fiberYou 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