Animation
For creating your animation with DepthFlow, the recommended method is via #extending the main Scene class, and writing a custom update method changing Camera parameters over time.
Extending¶
Import the main class, create a new one inheriting from it, write an update method:
Circle animation example
from depthflow.scene import DepthScene
class MyAnimation(DepthScene):
def update(self):
self.state.offset = (
math.cos(self.cycle),
math.sin(self.cycle),
)
You can use many temporal parameters such as:
Normalized time from 0-1 relative to total duration.
Normalized time from 0-2pi relative to total duration.
Elapsed time in seconds since the start of the animation.
Current frame count since the start of the animation.
See Exporting for realtime previews or encoding a video file.
Presets¶
DepthFlow will include a simple animation system in a future release.