Skip to content

Commit ae185a3

Browse files
authored
Merge pull request #8305 from menacingly-coded/docsupdate-main
Updated point() examples for visible points in main branch.
2 parents 555a82b + 0a40d0e commit ae185a3

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/core/shape/2d_primitives.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,11 @@ p5.prototype.line = function(...args) {
751751
*
752752
* background(200);
753753
*
754+
*
755+
* // Making point to 5 pixels
756+
* strokeWeight(5);
757+
*
758+
*
754759
* // Top-left.
755760
* point(30, 20);
756761
*
@@ -777,6 +782,11 @@ p5.prototype.line = function(...args) {
777782
*
778783
* background(200);
779784
*
785+
*
786+
* // Making point to 5 pixels.
787+
* strokeWeight(5);
788+
*
789+
*
780790
* // Top-left.
781791
* point(30, 20);
782792
*
@@ -807,6 +817,11 @@ p5.prototype.line = function(...args) {
807817
*
808818
* background(200);
809819
*
820+
*
821+
* // Making point to 5 pixels.
822+
* strokeWeight(5);
823+
*
824+
*
810825
* // Top-left.
811826
* let a = createVector(30, 20);
812827
* point(a);

src/webgl/p5.RendererGL.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,8 @@ p5.RendererGL = class RendererGL extends p5.Renderer {
634634
}
635635
};
636636

637-
this.pointSize = 5.0; //default point size
638637
this.curStrokeWeight = 1;
638+
this.pointSize = this.curStrokeWeight;
639639
this.curStrokeCap = constants.ROUND;
640640
this.curStrokeJoin = constants.ROUND;
641641

0 commit comments

Comments
 (0)