We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c174c4c commit 352a60cCopy full SHA for 352a60c
src/webgl/p5.Shader.js
@@ -1327,8 +1327,16 @@ p5.Shader = class {
1327
break;
1328
case gl.SAMPLER_2D:
1329
if (typeof data == 'number') {
1330
- if (data < gl.TEXTURE0 || data > gl.TEXTURE31 || data === Math.ceil(data)) {
1331
- console.log('🌸 p5.js says: You\'re trying to use a number as the data for a texture. Please use a texture.');
+ if (
+ data < gl.TEXTURE0 ||
1332
+ data > gl.TEXTURE31 ||
1333
+ data === Math.ceil(data)
1334
+ ) {
1335
+ console.log(
1336
+ '🌸 p5.js says: ' +
1337
+ 'You\'re trying to use a number as the data for a texture.' +
1338
+ 'Please use a texture.'
1339
+ );
1340
return this;
1341
}
1342
gl.activeTexture(data);
0 commit comments