var sun = new Sun();
var mercury = new Mercury();
var venus = new Venus();
var earth = new Earth();
var mars = new Mars();
var jupiter = new Jupiter();
var saturn = new Saturn();
var uranus = new Uranus();
var neptune = new Neptune();
function Move(){
ctx.clearRect(0,0,1000,1000);
drawTrack();
sun.draw();
mercury.draw();
venus.draw();
earth.draw();
mars.draw();
jupiter.draw();
saturn.draw();
uranus.draw();
neptune.draw();
}
setInterval(Move,10);
</script>
</body>
</html>
运行效果:
--------------------------------------分割线 --------------------------------------
HTML5 地理位置定位(HTML5 Geolocation)原理及应用
--------------------------------------分割线 --------------------------------------