Update rotating example
This commit is contained in:
parent
bae0d216e6
commit
72cbd4990d
@ -19,10 +19,11 @@
|
||||
planet.loadPlugin(planetaryjs.plugins.earth({
|
||||
topojson: { file: '/world-110m.json' }
|
||||
}));
|
||||
// Scale the planet's radius to half the canvas' size...
|
||||
planet.projection.scale(canvas.width / 2);
|
||||
// ...and move the planet to the center of the canvas.
|
||||
planet.projection.translate([canvas.width / 2, canvas.height / 2]);
|
||||
// Scale the planet's radius to half the canvas' size
|
||||
// and move it to the center of the canvas.
|
||||
planet.projection
|
||||
.scale(canvas.width / 2)
|
||||
.translate([canvas.width / 2, canvas.height / 2]);
|
||||
planet.draw(canvas);
|
||||
})();</code></pre>
|
||||
</div>
|
||||
|
||||
@ -6,9 +6,10 @@
|
||||
planet.loadPlugin(planetaryjs.plugins.earth({
|
||||
topojson: { file: '/world-110m.json' }
|
||||
}));
|
||||
// Scale the planet's radius to half the canvas' size...
|
||||
planet.projection.scale(canvas.width / 2);
|
||||
// ...and move the planet to the center of the canvas.
|
||||
planet.projection.translate([canvas.width / 2, canvas.height / 2]);
|
||||
// Scale the planet's radius to half the canvas' size
|
||||
// and move it to the center of the canvas.
|
||||
planet.projection
|
||||
.scale(canvas.width / 2)
|
||||
.translate([canvas.width / 2, canvas.height / 2]);
|
||||
planet.draw(canvas);
|
||||
})();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user