* Added point lights example

This commit is contained in:
Mr.doob
2010-10-29 04:15:00 +01:00
parent 4f1cb8f48f
commit 98693605e8
2 changed files with 8 additions and 7 deletions
+1
View File
@@ -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
View File
@@ -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;