Skip to content

Instantly share code, notes, and snippets.

@jugalpatel803
Created August 17, 2016 21:50
Show Gist options
  • Select an option

  • Save jugalpatel803/0cc90626163bd45516df72e7180c6b14 to your computer and use it in GitHub Desktop.

Select an option

Save jugalpatel803/0cc90626163bd45516df72e7180c6b14 to your computer and use it in GitHub Desktop.
d3.timer(function() {
var angle = velocity * (Date.now() - then);
canvas.each(function(i) {
var rotate = [0, 0, 0], context = this.getContext("2d");
rotate[i] = angle, projection.rotate(rotate);
context.clearRect(0, 0, diameter, diameter);
context.beginPath(), path.context(context)(land), context.fill();
context.beginPath(), path(globe), context.stroke();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment