From 98693605e8567f7b179629ccafa023e419a92ef6 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Fri, 29 Oct 2010 04:15:00 +0100 Subject: [PATCH] * Added point lights example --- README.md | 1 + examples/lights_pointlights.html | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 03d965d2..a2ebf5fe 100644 --- a/README.md +++ b/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) diff --git a/examples/lights_pointlights.html b/examples/lights_pointlights.html index 469c70f9..3c7f78da 100644 --- a/examples/lights_pointlights.html +++ b/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;