Skip to content

Allow more control over the animation loop #13

@BinaryMuse

Description

@BinaryMuse

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions