nodebox / seed

Procedural Content Generator
https://seed.emrg.be/
MIT License
22 stars 8 forks source link

Configurable animation duration / type #6

Closed fdb closed 6 years ago

fdb commented 6 years ago

As a user I want to be able to configure the duration of the animation instead of using the standard duration.

Using simple syntax at the top of the sketch I could set how long the animation would take (in seconds) and how the animation behaves:

% duration: 10s
% animation: linear

root:
- <svg ... />

Animation types are:

This depends on #4 (preamble syntax).

fdb commented 6 years ago

Gifloopcoder implements the animation types using these formulas: https://github.com/bit101/gifloopcoder/blob/master/src/src/app/render/Interpolation.js

kunal-mohta commented 6 years ago

I would like to try this issue if not yet solved.. I have read the code base, and realized that you have used requestAnimationFrame for the animations. Several different animation-types can be added when using requestAnimationFrame by using some Math expressions and formulas manipulating how animation varies with time as mentioned above by @fdb

stebanos commented 6 years ago

Duration setting was implemented in 2a2e9781, but animation type is still open.

kunal-mohta commented 6 years ago

Can I try it?

stebanos commented 6 years ago

Sure, why not? :)

kunal-mohta commented 6 years ago

The editors don't seem to be working on my forked repo screenshot from 2018-02-15 21-24-50

fdb commented 6 years ago

Do you see an error message in the Firefox console?

kunal-mohta commented 6 years ago

My bad, there was a typo I don't how that occurred Sorry for bothering