Pārlūkot izejas kodu

Fixed shadows in cars demo.

Bah, this one was tricky. World positions are not updated for objects that are not part of the scene graph so spotlight target was just hanging in limbo.
alteredq 13 gadi atpakaļ
vecāks
revīzija
2b7c115d57
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      examples/webgl_materials_cubemap_dynamic.html

+ 1 - 0
examples/webgl_materials_cubemap_dynamic.html

@@ -178,6 +178,7 @@
 				spotLight.shadowMapHeight = SHADOW_MAP_HEIGHT;
 
 				scene.add( spotLight );
+				scene.add( spotLight.target );
 
 				directionalLight2 = new THREE.PointLight( 0xff9900, 0.25 );
 				directionalLight2.position.set( 0.5, -1, 0.5 );