From b964403b7dcdc69895f95dd29ad53b7a3007dbea Mon Sep 17 00:00:00 2001 From: AryanKoundal Date: Fri, 27 Oct 2023 17:35:15 +0530 Subject: [PATCH] modified timeout to 25sec for imageLight examples to work --- src/webgl/light.js | 2 +- src/webgl/p5.RendererGL.js | 4 ++-- test/test-reference.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/webgl/light.js b/src/webgl/light.js index 898a8b979b..5f6619d504 100644 --- a/src/webgl/light.js +++ b/src/webgl/light.js @@ -533,7 +533,7 @@ p5.prototype.pointLight = function(v1, v2, v3, x, y, z) { * imageLight(img); * // This will use specular once we add it * specularMaterial(20); - * shininess(slider.value()); + * // shininess(slider.value()); * // orbitControl(); * noStroke(); * scale(2); diff --git a/src/webgl/p5.RendererGL.js b/src/webgl/p5.RendererGL.js index fb596161a3..5e95a83088 100644 --- a/src/webgl/p5.RendererGL.js +++ b/src/webgl/p5.RendererGL.js @@ -1927,7 +1927,7 @@ p5.RendererGL = class RendererGL extends p5.Renderer { let smallWidth = 200; let width = smallWidth; let height = Math.floor(smallWidth * (input.height / input.width)); - newGraphic = this._pInst.createGraphics(width, height, WEBGL); + newGraphic = this._pInst.createGraphics(width, height, constants.WEBGL); // create graphics is like making a new sketch, all functions on main // sketch it would be available on graphics let irradiance = newGraphic.createShader( @@ -1962,7 +1962,7 @@ p5.RendererGL = class RendererGL extends p5.Renderer { const size = 512; let tex; const levels = []; - const graphic = this._pInst.createGraphics(size, size, WEBGL); + const graphic = this._pInst.createGraphics(size, size, constants.WEBGL); let count = Math.log(size)/Math.log(2); graphic.pixelDensity(1); // currently only 8 levels diff --git a/test/test-reference.html b/test/test-reference.html index 66d0ae9a90..6faf5146c9 100644 --- a/test/test-reference.html +++ b/test/test-reference.html @@ -38,7 +38,7 @@ {regex: /acceleration/, condition: Modernizr.webgl}, {regex: /sound/, condition: Modernizr.webaudio} ]; - var MS_TIMEOUT = 4000; + var MS_TIMEOUT = 25000; var fxns = [ 'setup', 'draw', 'preload', 'mousePressed', 'mouseReleased', 'mouseMoved', 'mouseDragged', 'mouseClicked', 'mouseWheel',