rough-notation
rough-notation copied to clipboard
Add progress parameter
Hey, thanks for opensourcing this library. I haven't even tried it yet but I know it will come in handy.
Most of my use cases would use the annotate animation in sync with other (js controlled) animations. For example, using it together with something like Code Surfer.
Is it possible to add a progress parameter somewhere?
For example, annotation.show(0.5) shows the animation at 50%.
Bu default rough-annotation draws 2 iterations (configurable). e.g. for underline, it will go from left to right and then from right to left - to create a scribble effect. This can be removed by setting iterations to 1 in the config.
But the question in this context is what does it mean when animation is at 50%. Is that the point where the first iteration, left to right, is done or when both iterations are drawn half way through.
If you run the animation using a linear function from 0% to 100% it should look the same as running it without a progress parameter. So, if both iterations take the same time, 50% is when the first iteration finishes.