2 steps; 2 functions
Give nodes mass; Give nodes a new pose
1) Initialize
Fizzx returns a class representing an element that you gave physics properties
const fx = new Fizzx(Element)
2) Animate
Direct it somewhere on the document absolutely or direct it somewhere relative to itself
// absolute
fx.to({translate,rotate})
// relative
fx.effect({translate,rotate})
to(): <Promise>
directs the element to a new location on the document body, as if it's absolutely positioned
effect(): <Promise>
changes the element from it's current location, as if it's relatively positioned
Each return a promise, making async/await with Promise.all() very powerful for orchestration of sequences or repetition!
Notice the use of await in the demo code.