Explorar el Código

gl.UNSIGNED_BYTE type for Uint8ClampedArray (#21876)

0X-JonMichaelGalindo hace 4 años
padre
commit
c50649f1ce
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      src/renderers/webgl/WebGLAttributes.js

+ 4 - 0
src/renderers/webgl/WebGLAttributes.js

@@ -66,6 +66,10 @@ function WebGLAttributes( gl, capabilities ) {
 
 			type = gl.UNSIGNED_BYTE;
 
+		} else if ( array instanceof Uint8ClampedArray ) {
+			
+			type = gl.UNSIGNED_BYTE;
+			
 		}
 
 		return {