diff --git a/src/core/shape/2d_primitives.js b/src/core/shape/2d_primitives.js index 7b00125241..e7949fa7d2 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); * @@ -777,6 +782,11 @@ p5.prototype.line = function(...args) { * * background(200); * + * + * // Making point to 5 pixels. + * strokeWeight(5); + * + * * // Top-left. * point(30, 20); * @@ -807,6 +817,11 @@ p5.prototype.line = function(...args) { * * background(200); * + * + * // Making point to 5 pixels. + * strokeWeight(5); + * + * * // Top-left. * let a = createVector(30, 20); * point(a); diff --git a/src/webgl/p5.RendererGL.js b/src/webgl/p5.RendererGL.js index fa67acc34d..e76c37fb15 100644 --- a/src/webgl/p5.RendererGL.js +++ b/src/webgl/p5.RendererGL.js @@ -634,8 +634,8 @@ 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;