<! DOCTYPE html>Body {color: #808080; Font-Family:monospace; Font-size:13px; Text-Align:center; Background-color: #000; margin:0px; Overflow:hidden; } #info {Position:absolute; top:0px; Width:100%; padding:5px; Z-index:100; } A {color: #0080ff; } b {Color:lightgreen} #stats {position:absolute; Top:0; left:0} #stats #fps {background:transparent!Important} #stats #fps #fpsText {color: #777!Important} #stats #fps #fpsGraph {display:none}</style> <script>varT =three; varScreen_width =window.innerwidth; varScreen_height =Window.innerheight; varcontainer; varrenderer; varscene; varcamera; varLight ; varCube; var_earth = 1; //1300000 varSun ={r: _earth* 2 } //0.056 varShui ={r: _earth* 0.1, S:87 } //0.86 varJin ={r: _earth* 0.2, S:224 } varearth ={r: _earth* 1, S:365 } //0.15 varHuo ={r: _earth* 1, S:678 } //1330 varMu ={r: _earth* 1.5, S:365 * 11 } //745 varTu ={r: _earth* 1.1, S:365 * 29 } // $ varTian ={r: _earth* 0.65, S:365 * 84 } // - varHai ={r: _earth* 0.6, S:365 * 164 } varPARR =[Sun,shui,jin,earth,huo,mu,tu,tian,hai]; functionInitthree () {container= document.getElementById (' Canvas-frame '); Renderer=NewT.webglrenderer ({antialias:true}); Renderer.setsize (Screen_width, screen_height); Renderer.autoclear=false; Container.appendchild (renderer.domelement); } functionInitcamera () {camera=NewT.perspectivecamera (screen_width/screen_height,1,1000000000); CAMERA.POSITION.Z = SUN.R * 30; CAMERA.POSITION.Y= SUN.R * 5; Camerarig=Newthree. Object3d (); Camerarig.add (camera) Scene.add (Camerarig); } functionInitscene () {Scene=NewT.scene (); } functioninitlight () {}//A begin varMesharr = []; functionInitobject () {varGeometry =NewT.geometry (); for(varI =0;i<1000;i++){ varVertex =NewT.vector3 (); vertex.x= T.math.randfloatspread (2000); Vertex.y= T.math.randfloatspread (2000); Vertex.z= T.math.randfloatspread (2000); Geometry.vertices.push (vertex); } varparticles =NewThree. Pointcloud (Geometry,NewThree. Pointcloudmaterial ({color:0x888888 } ) ); Scene.add (particles); varL=0; for(vari=0;i<parr.length;i++){ varcolor; varp; if(i = = 0) {color= 0xFF0000; }Else{color= 0xFFFFFF; } P=NewT.mesh (NewT.spheregeometry (parr[i].r,16,8),NewThree. Meshbasicmaterial ({color:color, wireframe:true } )); if(I! = 0) {p.position.x= L +PARR[I].R; } PARR[I].L= l+= PARR[I].R * 2; Scene.add (P); Mesharr.push (P); } } //A End functionThreestart () {initthree (); Initscene (); Initcamera (); Initlight (); Initobject (); Renderer.clear (); Renderer.render (scene, camera); Animate (); } functionrender () {renderer.clear (); varnow =Date.now (); for(varI =0;i<mesharr.length;i++){ if(i = = 0) {mesharr[i].position.x= 0; MESHARR[I].POSITION.Y= 0; Mesharr[i].position.z= 0; Continue; } varR = Now/parr[i].s;Console.log (R); Mesharr[i].position.x= Math.Cos (r) *PARR[I].L; MESHARR[I].POSITION.Y= Math.sin (r) *PARR[I].L; Mesharr[i].position.z= Math.sin (r) *PARR[I].L; } camera.position.x= SUN.R * 2; CAMERA.POSITION.Y= -SUN.R; Camera.position.z= SUN.R * 20; Camerarig.lookat (mesharr[0].position); Renderer.render (scene, camera); } functionAnimate () {requestanimationframe (animate); Render (); } </script>