瀏覽代碼

Merge pull request #14561 from Mugen87/dev18

Examples: Ensure CanvasTexture is used in webgl_materials_texture_canvas
Michael Herzog 7 年之前
父節點
當前提交
6d492ed3ae
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      examples/webgl_materials_texture_canvas.html

+ 1 - 2
examples/webgl_materials_texture_canvas.html

@@ -95,8 +95,7 @@
 
 
 				// set canvas as material.map (this could be done to any map, bump, displacement etc.)
 				// set canvas as material.map (this could be done to any map, bump, displacement etc.)
 
 
-				material.map = new THREE.Texture( drawingCanvas );
-				material.map.needsUpdate = true;
+				material.map = new THREE.CanvasTexture( drawingCanvas );
 
 
 				// set the variable to keep track of when to draw
 				// set the variable to keep track of when to draw