Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add progress parameter #5

Open
pomber opened this issue May 27, 2020 · 2 comments
Open

Add progress parameter #5

pomber opened this issue May 27, 2020 · 2 comments

Comments

@pomber
Copy link

pomber commented May 27, 2020

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%.

@pshihn
Copy link
Collaborator

pshihn commented Jun 6, 2020

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.

@pomber
Copy link
Author

pomber commented Jun 6, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants