Sfoglia il codice sorgente

Merge pull request #14586 from Mugen87/dev18

Examples: Clean up
Michael Herzog 7 anni fa
parent
commit
6a7f52b46f
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  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 );