From 032c042620665075142685372e4e8a53c3f4ee85 Mon Sep 17 00:00:00 2001 From: Shreya Sharma Date: Sun, 30 Nov 2025 00:10:07 +0530 Subject: [PATCH 1/3] fixes --- src/core/shape/2d_primitives.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/core/shape/2d_primitives.js b/src/core/shape/2d_primitives.js index 7b00125241..d2176d1cc6 100644 --- a/src/core/shape/2d_primitives.js +++ b/src/core/shape/2d_primitives.js @@ -751,6 +751,11 @@ p5.prototype.line = function(...args) { * * background(200); * + * + * // Making point to 5 pixels + * strokeWeight(5); + * + * * // Top-left. * point(30, 20); * @@ -776,7 +781,12 @@ p5.prototype.line = function(...args) { * createCanvas(100, 100); * * background(200); + * + * + * // Making point to 5 pixels. + * strokeWeight(5); * + * * // Top-left. * point(30, 20); * @@ -806,6 +816,11 @@ p5.prototype.line = function(...args) { * createCanvas(100, 100); * * background(200); + * + * + * // Making point to 5 pixels. + * strokeWeight(5); + * * * // Top-left. * let a = createVector(30, 20); From 73b13369a0db358caa4be5365a5aa889640207d4 Mon Sep 17 00:00:00 2001 From: Shreya Sharma Date: Sat, 6 Dec 2025 15:26:41 +0530 Subject: [PATCH 2/3] changed point to 1 pixel respecting strokeWeight --- src/webgl/p5.RendererGL.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/webgl/p5.RendererGL.js b/src/webgl/p5.RendererGL.js index fa67acc34d..925e51797b 100644 --- a/src/webgl/p5.RendererGL.js +++ b/src/webgl/p5.RendererGL.js @@ -634,8 +634,7 @@ p5.RendererGL = class RendererGL extends p5.Renderer { } }; - this.pointSize = 5.0; //default point size - this.curStrokeWeight = 1; + this.pointSize = this.curStrokeWeight; this.curStrokeCap = constants.ROUND; this.curStrokeJoin = constants.ROUND; From fb0a2db6a754d649944f239457e60e7b56d96413 Mon Sep 17 00:00:00 2001 From: Shreya Sharma Date: Sat, 6 Dec 2025 15:41:38 +0530 Subject: [PATCH 3/3] lint fixes --- src/core/shape/2d_primitives.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/shape/2d_primitives.js b/src/core/shape/2d_primitives.js index d2176d1cc6..e7949fa7d2 100644 --- a/src/core/shape/2d_primitives.js +++ b/src/core/shape/2d_primitives.js @@ -751,11 +751,11 @@ p5.prototype.line = function(...args) { * * background(200); * - * + * * // Making point to 5 pixels * strokeWeight(5); - * - * + * + * * // Top-left. * point(30, 20); * @@ -781,12 +781,12 @@ p5.prototype.line = function(...args) { * createCanvas(100, 100); * * background(200); - * - * + * + * * // Making point to 5 pixels. * strokeWeight(5); * - * + * * // Top-left. * point(30, 20); * @@ -816,11 +816,11 @@ p5.prototype.line = function(...args) { * createCanvas(100, 100); * * background(200); - * - * + * + * * // Making point to 5 pixels. * strokeWeight(5); - * + * * * // Top-left. * let a = createVector(30, 20);