Browse Source

Merge pull request #14586 from Mugen87/dev18

Examples: Clean up
Michael Herzog 7 năm trước cách đây
mục cha
commit
6a7f52b46f
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      examples/webgl_geometry_colors.html

+ 1 - 2
examples/webgl_geometry_colors.html

@@ -83,8 +83,7 @@
 				context.fillStyle = gradient;
 				context.fillRect( 0, 0, canvas.width, canvas.height );
 
-				var shadowTexture = new THREE.Texture( canvas );
-				shadowTexture.needsUpdate = true;
+				var shadowTexture = new THREE.CanvasTexture( canvas );
 
 				var shadowMaterial = new THREE.MeshBasicMaterial( { map: shadowTexture } );
 				var shadowGeo = new THREE.PlaneBufferGeometry( 300, 300, 1, 1 );