Browse Source

GLTFLoader extensions example: set castShadow true for lights extension

Takahiro 7 năm trước cách đây
mục cha
commit
8ca9564927
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      examples/webgl_loader_gltf_extensions.html

+ 1 - 1
examples/webgl_loader_gltf_extensions.html

@@ -348,7 +348,7 @@
 
 					object.traverse( function ( node ) {
 
-						if ( node.isMesh ) node.castShadow = true;
+						if ( node.isMesh || node.isLight ) node.castShadow = true;
 
 					} );