is a package for integrating React Three Fiber with Remotion.
<ThreeCanvas />will allow you to use
useCurrentFrame()and other Remotion hooks within a R3F Canvas. Animations are now not inside a
useFrame()hook but directly rendered into the markup.
These are the only two APIs provided - for everything else you can use the standard React Three Fiber APIs.
Check out remotion-template-three, a minimal boilerplate for Remotion and React Three Fiber. It is a template repository, you can click "Use this template" on the Github repo to get started.
The template features a 3D phone with a video inside which you can effortlessly swap out. Just as easily, you can change properties like the color, size, thickness, corner radius of the phone.
The template serves as an soft introduction on how to use
<ThreeCanvas /> and
useVideoTexture(). You can easily delete everything inside the canvas to start working on a different idea.
You are now set up and can render a
<ThreeCanvas /> in your project.
Big thanks to Björn Zeutzheim for researching and discovering the techniques needed for React Three Fiber integration and for doing the initial implementation of the @remotion/three APIs.