Преглед изворни кода

Examples: Ensure CanvasTexture is used in webgl_materials_texture_canvas

Mugen87 пре 7 година
родитељ
комит
7519995f89
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.)
 
-				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