regl
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -458,11 +458,13 @@ var check = require('./util/check') | ||
} else { | ||
if (colorTexture) { | ||
check.oneOf( | ||
options.colorFormat, colorTextureFormats, | ||
'invalid color format for texture') | ||
} else { | ||
check.oneOf( | ||
options.colorFormat, colorRenderbufferFormats, | ||
'invalid color format for renderbuffer') | ||
} | ||
check.optional(function () { | ||
if (colorTexture) { | ||
check.oneOf( | ||
options.colorFormat, colorTextureFormats, | ||
'invalid color format for texture') | ||
} else { | ||
check.oneOf( | ||
options.colorFormat, colorRenderbufferFormats, | ||
'invalid color format for renderbuffer') | ||
} | ||
}) | ||
} | ||
@@ -469,0 +471,0 @@ } |
@@ -30,15 +30,17 @@ var check = require('./util/check') | ||
if (extensions.oes_texture_float) { | ||
check( | ||
type === GL_UNSIGNED_BYTE || type === GL_FLOAT, | ||
'Reading from a framebuffer is only allowed for the types \'uint8\' and \'float\'') | ||
check.optional(function () { | ||
if (extensions.oes_texture_float) { | ||
check( | ||
type === GL_UNSIGNED_BYTE || type === GL_FLOAT, | ||
'Reading from a framebuffer is only allowed for the types \'uint8\' and \'float\'') | ||
if (type === GL_FLOAT) { | ||
check(limits.readFloat, 'Reading \'float\' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float') | ||
if (type === GL_FLOAT) { | ||
check(limits.readFloat, 'Reading \'float\' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float') | ||
} | ||
} else { | ||
check( | ||
type === GL_UNSIGNED_BYTE, | ||
'Reading from a framebuffer is only allowed for the type \'uint8\'') | ||
} | ||
} else { | ||
check( | ||
type === GL_UNSIGNED_BYTE, | ||
'Reading from a framebuffer is only allowed for the type \'uint8\'') | ||
} | ||
}) | ||
} | ||
@@ -45,0 +47,0 @@ |
@@ -1439,7 +1439,8 @@ var check = require('./util/check') | ||
copyFlags(texture, faces[0]) | ||
check.optional(function () { | ||
if (!limits.npotTextureCube) { | ||
check(isPow2(texture.width) && isPow2(texture.height), 'your browser does not support non power or two texture dimensions') | ||
} | ||
}) | ||
if (!limits.npotTextureCube) { | ||
check(isPow2(texture.width) && isPow2(texture.height), 'your browser does not support non power or two texture dimensions') | ||
} | ||
if (texInfo.genMipmaps) { | ||
@@ -1446,0 +1447,0 @@ texture.mipmask = (faces[0].width << 1) - 1 |
{ | ||
"name": "regl", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "regl is a fast functional WebGL framework.", | ||
@@ -5,0 +5,0 @@ "main": "dist/regl.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1213520
29833