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

Allow more control over the animation loop #13

Open
BinaryMuse opened this issue Dec 13, 2014 · 0 comments
Open

Allow more control over the animation loop #13

BinaryMuse opened this issue Dec 13, 2014 · 0 comments

Comments

@BinaryMuse
Copy link
Owner

doDrawLoop currently decides how often to redraw planets (based on d3.timer). As per part of #12, it would be nice to allow end-users to customize the draw ticks. We should extract the main draw body:

planet.context.clearRect(0, 0, canvas.width, canvas.height);
for (var i = 0; i < hooks.onDraw.length; i++) {
  hooks.onDraw[i]();
}

and allow end-users to call it whenever they want.

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

1 participant