funvas 0.0.1 funvas: ^0.0.1 copied to clipboard
Package that allows creating canvas animations based on time and math functions. Fun + canvas -> funvas :)
funvas #
Flutter package that allows creating canvas animations based on time and math functions.
The name "funvas" is based on Flutter + fun + canvas. Let me know if you have any better ideas :)
Concept #
The idea of the package is to provide an easy way to create custom canvas animations based only on time and some math functions (sine, cosine, etc.) - like this one.
GIFs to be inserted here (:
Will be added once 0.1.0
is around.
Inspired by Dwitter (check it out). This is also the reason why the following shortcut functions and variables are available; they might be expanded upon in the future given that there are a lot more possibilities:
u(t) is called 60 times per second.
t: Elapsed time in seconds.
S: Shorthand for sin from dart:math.
C: Shorthand for cos from dart:math.
T: Shorthand for tan from dart:math.
R: Shorthand for Color.fromRGBA, usage ex.: R(255, 255, 255, 0.5)
c: A dart:ui canvas.
x: A context for the canvas, providing size.
You can of course use all of the Canvas
functionality, the same way you can use them in a
CustomPainter
; the above is just in homage to Dwitter :)
Usage #
USAGE to be inserted here (:
Will be added once 0.1.0
is around.
See the example package for a complete example implementation.