Skip to content

Commit aa15566

Browse files
authored
Merge pull request #5726 from limzykenneth/fix-nosmooth-warn
Fix noSmooth printing message when used with a non WebGL graphics
2 parents 8c58b32 + ba661dc commit aa15566

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/shape/attributes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,12 @@ p5.prototype.ellipseMode = function(m) {
103103
* 2 pixelated 36×36 white ellipses to left & right of center, black background
104104
*/
105105
p5.prototype.noSmooth = function() {
106-
this.setAttributes('antialias', false);
107106
if (!this._renderer.isP3D) {
108107
if ('imageSmoothingEnabled' in this.drawingContext) {
109108
this.drawingContext.imageSmoothingEnabled = false;
110109
}
110+
} else {
111+
this.setAttributes('antialias', false);
111112
}
112113
return this;
113114
};

0 commit comments

Comments
 (0)