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

https://github.com/pmndrs/timeline

Write composable declarative 3D behaviors like a story.
https://github.com/pmndrs/timeline

Last synced: 6 months ago
JSON representation

Write composable declarative 3D behaviors like a story.

Awesome Lists containing this project

README

          

# @react-three/timeline

Write composable declarative 3D behaviors like a story.

```tsx
const camera = useThree((s) => s.camera)
const target1 = useRef(null)
const target2 = useRef(null)

useTimeline(async function* () {
while (true) {
//transition to look at target2
yield* action({ update: lookAt(camera, target1.current!), ease: spring() })
//wait for 2 seconds
yield* action({ until: duration(2, 'seconds') })
//transition to look at target2
yield* action({ update: lookAt(camera, target2.current!), ease: spring() })
//wait for 2 seconds
yield* action({ until: duration(2, 'seconds') })
}
}, [])

return (
<>






>
)
```

## Roadmap before Release

[ ] lookAt, rotateArround, moveTo, ...
[ ] ease configuration
[ ] target distance configuration (allowing to move towards a target with a certain distance)