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

feat: curve path animator #1651

Merged
merged 19 commits into from
Sep 18, 2023
Merged

Conversation

netgfx
Copy link
Contributor

@netgfx netgfx commented Sep 14, 2023

Why

Added MotionPath component, which allows objects to be animated along a path that is constructed via ThreeJS bezier curves. It allows for complex flythroughs and staging. Also it can be useful for moving objects along a path for example in a tower defense game.

What

Added MotionPath react component, with properties to declare the path, set the animation speed, loop, auto-start, the object of focus, and whether or not the main camera is animated along the path

An example can be found here: https://codesandbox.io/s/drei-motion-path-n75jcq?file=/src/App.tsx

Checklist

  • [ x] Documentation updated (example)
  • Storybook entry added (example)
  • [ x] Ready to be merged

@vercel
Copy link

vercel bot commented Sep 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drei ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2023 3:22pm

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 14, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c3355b5:

Sandbox Source
sharp-driscoll-h3jhvx Configuration
Ground reflections and video textures Configuration
arc-x-pmndrs-colors Configuration
drei-motion-path PR

@netgfx netgfx changed the title Feat/curve path animator feat: curve path animator Sep 14, 2023
@drcmda drcmda merged commit 9e00d8f into pmndrs:master Sep 18, 2023
2 checks passed
@github-actions
Copy link

🎉 This PR is included in version 9.84.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants