Forráskód Böngészése

* Added point lights example

Mr.doob 14 éve
szülő
commit
98693605e8
2 módosított fájl, 8 hozzáadás és 7 törlés
  1. 1 0
      README.md
  2. 7 7
      examples/lights_pointlights.html

+ 1 - 0
README.md

@@ -15,6 +15,7 @@ Other similar projects: [pre3d](http://deanm.github.com/pre3d/), [pvjs](http://c
 
 ### Examples ###
 
+[![lights_pointligts](http://mrdoob.github.com/three.js/assets/examples/09_walthead.png)](http://mrdoob.github.com/three.js/examples/lights_pointligts.html)
 [![geometry_birds](http://mrdoob.github.com/three.js/assets/examples/08_birds.png)](http://mrdoob.github.com/three.js/examples/geometry_birds.html)
 [![geometry_earth](http://mrdoob.github.com/three.js/assets/examples/07_earth.png)](http://mrdoob.github.com/three.js/examples/geometry_earth.html)
 [![geometry_terrain](http://mrdoob.github.com/three.js/assets/examples/06_terrain.png)](http://mrdoob.github.com/three.js/examples/geometry_terrain.html)

+ 7 - 7
examples/lights_pointlights.html

@@ -99,24 +99,24 @@
 
 				object.rotation.y -= 0.01;
 
-				particle1.position.x = Math.sin( time * 0.5 ) * 30;
-				particle1.position.y = Math.cos( time ) * 40;
-				particle1.position.z = Math.cos( time ) * 30;
+				particle1.position.x = Math.sin( time * 0.7 ) * 30;
+				particle1.position.y = Math.cos( time * 0.5 ) * 40;
+				particle1.position.z = Math.cos( time * 0.3 ) * 30;
 
 				light1.position.x = particle1.position.x;
 				light1.position.y = particle1.position.y;
 				light1.position.z = particle1.position.z;
 
-				particle2.position.x = Math.cos( time ) * 30;
+				particle2.position.x = Math.cos( time * 0.3 ) * 30;
 				particle2.position.y = Math.sin( time * 0.5 ) * 40;
-				particle2.position.z = Math.sin( time ) * 30;
+				particle2.position.z = Math.sin( time * 0.7 ) * 30;
 
 				light2.position.x = particle2.position.x;
 				light2.position.y = particle2.position.y;
 				light2.position.z = particle2.position.z;
 
-				particle3.position.x = Math.sin( time ) * 30;
-				particle3.position.y = Math.cos( time ) * 40;
+				particle3.position.x = Math.sin( time * 0.7 ) * 30;
+				particle3.position.y = Math.cos( time * 0.3 ) * 40;
 				particle3.position.z = Math.sin( time * 0.5 ) * 30;
 
 				light3.position.x = particle3.position.x;