Explorar o código

Fixed example.

Mr.doob %!s(int64=12) %!d(string=hai) anos
pai
achega
5fd1c8b684
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      examples/webgl_loader_collada_keyframe.html

+ 3 - 2
examples/webgl_loader_collada_keyframe.html

@@ -47,6 +47,7 @@
 
 			var stats;
 			var scene;
+			var pointLight;
 			var camera;
 			var renderer;
 			var model;
@@ -126,8 +127,6 @@
 				// Lights
 
 				pointLight = new THREE.PointLight( 0xffffff, 1.75 );
-				pointLight.position = camera.position;
-
 				scene.add( pointLight );
 
 				// Renderer
@@ -224,6 +223,8 @@
 
 				}
 
+				pointLight.position.copy( camera.position );
+
 				progress += frameTime;
 				lastTimestamp = timestamp;
 				renderer.render( scene, camera );

粤ICP备19079148号