From 0787bf103a4e6a1fe799de5cbfd0113b4f67aa94 Mon Sep 17 00:00:00 2001 From: Gaurav Tiwary <97665755+Gaurav-1306@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:06:41 +0530 Subject: [PATCH 1/9] spacing corrected --- lib/empty-example/sketch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/empty-example/sketch.js b/lib/empty-example/sketch.js index 69b202ee71..0f0eba67f4 100644 --- a/lib/empty-example/sketch.js +++ b/lib/empty-example/sketch.js @@ -1,7 +1,7 @@ function setup() { - // put setup code here + // put setup code here } function draw() { - // put drawing code here + // put drawing code here } From 34461f47f0b0aa1f1b22f00f99337d299fb913c3 Mon Sep 17 00:00:00 2001 From: Gaurav Tiwary <97665755+Gaurav-1306@users.noreply.github.com> Date: Sun, 15 Oct 2023 19:03:02 +0530 Subject: [PATCH 2/9] added if statement to not throw error --- lib/empty-example/sketch.js | 6 +++--- src/webgl/p5.RendererGL.Immediate.js | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/empty-example/sketch.js b/lib/empty-example/sketch.js index 0f0eba67f4..de6c862644 100644 --- a/lib/empty-example/sketch.js +++ b/lib/empty-example/sketch.js @@ -1,7 +1,7 @@ function setup() { - // put setup code here + // put setup code here } function draw() { - // put drawing code here -} + // put drawing code here +} \ No newline at end of file diff --git a/src/webgl/p5.RendererGL.Immediate.js b/src/webgl/p5.RendererGL.Immediate.js index 5a2beaf990..c166076365 100644 --- a/src/webgl/p5.RendererGL.Immediate.js +++ b/src/webgl/p5.RendererGL.Immediate.js @@ -128,12 +128,21 @@ p5.RendererGL.prototype.vertex = function(x, y) { lineVertexColor[3] ); - if (this.textureMode === constants.IMAGE && !this.isProcessingVertices) { - if (this._tex !== null) { - if (this._tex.width > 0 && this._tex.height > 0) { + if ( + this.textureMode === constants.IMAGE && + !this.isProcessingVertices + ) { + if (this._tex !== null ) { + if (this._tex.width > 0 && this._tex.height > 0 ) { u /= this._tex.width; v /= this._tex.height; } + } if ( + (this.userFillShader !== undefined || + this.userStrokeShader !== undefined || + this.userPointShader !== undefined) + ) { + // Do nothing if user-defined shaders are present } else if ( this._tex === null && arguments.length >= 4 From 4775dec5adc4727b4d25db9c89331cd742dd803d Mon Sep 17 00:00:00 2001 From: Gaurav Tiwary <97665755+Gaurav-1306@users.noreply.github.com> Date: Sun, 15 Oct 2023 19:12:13 +0530 Subject: [PATCH 3/9] minor indentation changes --- src/webgl/p5.RendererGL.Immediate.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/webgl/p5.RendererGL.Immediate.js b/src/webgl/p5.RendererGL.Immediate.js index c166076365..5fcc7219b1 100644 --- a/src/webgl/p5.RendererGL.Immediate.js +++ b/src/webgl/p5.RendererGL.Immediate.js @@ -128,12 +128,9 @@ p5.RendererGL.prototype.vertex = function(x, y) { lineVertexColor[3] ); - if ( - this.textureMode === constants.IMAGE && - !this.isProcessingVertices - ) { - if (this._tex !== null ) { - if (this._tex.width > 0 && this._tex.height > 0 ) { + if (this.textureMode === constants.IMAGE && !this.isProcessingVertices) { + if (this._tex !== null) { + if (this._tex.width > 0 && this._tex.height > 0) { u /= this._tex.width; v /= this._tex.height; } From f261506b59045cd2e10f8fe5f2289f751f8685fb Mon Sep 17 00:00:00 2001 From: Gaurav Tiwary <97665755+Gaurav-1306@users.noreply.github.com> Date: Sun, 15 Oct 2023 19:13:27 +0530 Subject: [PATCH 4/9] minor changes --- lib/empty-example/sketch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/empty-example/sketch.js b/lib/empty-example/sketch.js index de6c862644..b0cf149f56 100644 --- a/lib/empty-example/sketch.js +++ b/lib/empty-example/sketch.js @@ -1,7 +1,7 @@ function setup() { - // put setup code here + // put setup code here } function draw() { - // put drawing code here + // put drawing code here } \ No newline at end of file From 0fba290a9150277f1f0dd9134aa4dd0dd4dbef3d Mon Sep 17 00:00:00 2001 From: Gaurav Tiwary <97665755+Gaurav-1306@users.noreply.github.com> Date: Sun, 15 Oct 2023 19:14:30 +0530 Subject: [PATCH 5/9] minor changes --- lib/empty-example/sketch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/empty-example/sketch.js b/lib/empty-example/sketch.js index b0cf149f56..de6c862644 100644 --- a/lib/empty-example/sketch.js +++ b/lib/empty-example/sketch.js @@ -1,7 +1,7 @@ function setup() { - // put setup code here + // put setup code here } function draw() { - // put drawing code here + // put drawing code here } \ No newline at end of file From 64a365265df21f53ce17b2a94c6472724bea37d2 Mon Sep 17 00:00:00 2001 From: Gaurav Tiwary <97665755+Gaurav-1306@users.noreply.github.com> Date: Sun, 15 Oct 2023 21:39:07 +0530 Subject: [PATCH 6/9] Update sketch.js --- lib/empty-example/sketch.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/empty-example/sketch.js b/lib/empty-example/sketch.js index de6c862644..d075d801b3 100644 --- a/lib/empty-example/sketch.js +++ b/lib/empty-example/sketch.js @@ -1,7 +1,7 @@ function setup() { - // put setup code here +// put setup code here } function draw() { - // put drawing code here -} \ No newline at end of file +// put drawing code here +} From e46b16b258940c404825fe307b837d340ab7a144 Mon Sep 17 00:00:00 2001 From: Gaurav Tiwary <97665755+Gaurav-1306@users.noreply.github.com> Date: Sun, 15 Oct 2023 21:40:10 +0530 Subject: [PATCH 7/9] Update sketch.js --- lib/empty-example/sketch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/empty-example/sketch.js b/lib/empty-example/sketch.js index d075d801b3..69b202ee71 100644 --- a/lib/empty-example/sketch.js +++ b/lib/empty-example/sketch.js @@ -1,7 +1,7 @@ function setup() { -// put setup code here + // put setup code here } function draw() { -// put drawing code here + // put drawing code here } From ead09ac604411480758a924b3c5531052a8b5f37 Mon Sep 17 00:00:00 2001 From: Gaurav Tiwary <97665755+Gaurav-1306@users.noreply.github.com> Date: Mon, 16 Oct 2023 07:24:43 +0530 Subject: [PATCH 8/9] Update p5.RendererGL.Immediate.js --- src/webgl/p5.RendererGL.Immediate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webgl/p5.RendererGL.Immediate.js b/src/webgl/p5.RendererGL.Immediate.js index 5fcc7219b1..1b2c0fdabd 100644 --- a/src/webgl/p5.RendererGL.Immediate.js +++ b/src/webgl/p5.RendererGL.Immediate.js @@ -135,9 +135,9 @@ p5.RendererGL.prototype.vertex = function(x, y) { v /= this._tex.height; } } if ( - (this.userFillShader !== undefined || + this.userFillShader !== undefined || this.userStrokeShader !== undefined || - this.userPointShader !== undefined) + this.userPointShader !== undefined ) { // Do nothing if user-defined shaders are present } else if ( From 332ab1ea2ca150bbacbc98aaca7e9e754d666b6f Mon Sep 17 00:00:00 2001 From: Gaurav Tiwary <97665755+Gaurav-1306@users.noreply.github.com> Date: Mon, 16 Oct 2023 19:14:07 +0530 Subject: [PATCH 9/9] Update src/webgl/p5.RendererGL.Immediate.js Co-authored-by: Dave Pagurek --- src/webgl/p5.RendererGL.Immediate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webgl/p5.RendererGL.Immediate.js b/src/webgl/p5.RendererGL.Immediate.js index 1b2c0fdabd..2409dae3d6 100644 --- a/src/webgl/p5.RendererGL.Immediate.js +++ b/src/webgl/p5.RendererGL.Immediate.js @@ -134,7 +134,7 @@ p5.RendererGL.prototype.vertex = function(x, y) { u /= this._tex.width; v /= this._tex.height; } - } if ( + } else if ( this.userFillShader !== undefined || this.userStrokeShader !== undefined || this.userPointShader !== undefined