treeform / boxy

2D GPU rendering with a tiling atlas.
MIT License
102 stars 7 forks source link

How to control animation? #46

Closed geohuz closed 2 years ago

geohuz commented 2 years ago

I've played examples and I'm curious on animation control, for example how can I control the duration/speed, and how can I implement transition ease effect like linear, elastic, bounce in html/css?

treeform commented 2 years ago

With Boxy, you define the animation. You do it all yourself. Boxy is just for drawing. Draw stuff differently every frame to make animation. You could take epochTime() and use that for your animation as we do in examples, but there are many ways to do it.