From 3045812e18c1bb3c0827ea7f03f391946bb598fa Mon Sep 17 00:00:00 2001 From: Leslie Yip Date: Sat, 28 Jan 2023 18:44:04 +0800 Subject: [PATCH 1/3] Changed calculateStroke --- 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 f83e295e0a..54cea58720 100644 --- a/src/webgl/p5.RendererGL.Immediate.js +++ b/src/webgl/p5.RendererGL.Immediate.js @@ -226,7 +226,7 @@ p5.RendererGL.prototype.endShape = function( p5.RendererGL.prototype._processVertices = function(mode) { if (this.immediateMode.geometry.vertices.length === 0) return; - const calculateStroke = this._doStroke && this.drawMode !== constants.TEXTURE; + const calculateStroke = this._doStroke; const shouldClose = mode === constants.CLOSE; if (calculateStroke) { this.immediateMode.geometry.edges = this._calculateEdges( From 686c131cbf8387508b4ec4128ad1a7330fb6a1c5 Mon Sep 17 00:00:00 2001 From: Leslie Yip Date: Thu, 2 Feb 2023 23:57:15 +0800 Subject: [PATCH 2/3] Added noStroke to remove line border from img --- src/webgl/3d_primitives.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/webgl/3d_primitives.js b/src/webgl/3d_primitives.js index 94e4dfdf2f..882014382c 100644 --- a/src/webgl/3d_primitives.js +++ b/src/webgl/3d_primitives.js @@ -1995,6 +1995,7 @@ p5.RendererGL.prototype.image = function( this._pInst.noLights(); + noStroke(); this._pInst.texture(img); this._pInst.textureMode(constants.NORMAL); From 1f70f3481806891d8adb54205acb98774e5e4a33 Mon Sep 17 00:00:00 2001 From: Leslie Yip Date: Sun, 5 Feb 2023 09:06:15 +0800 Subject: [PATCH 3/3] Fix: use this._pInst.noStroke() instead --- src/webgl/3d_primitives.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webgl/3d_primitives.js b/src/webgl/3d_primitives.js index 882014382c..cdb525ab43 100644 --- a/src/webgl/3d_primitives.js +++ b/src/webgl/3d_primitives.js @@ -1994,8 +1994,8 @@ p5.RendererGL.prototype.image = function( this._pInst.push(); this._pInst.noLights(); + this._pInst.noStroke(); - noStroke(); this._pInst.texture(img); this._pInst.textureMode(constants.NORMAL);