Skip to content

Commit

Permalink
Change 'smooth' function to match 'noSmooth' function
Browse files Browse the repository at this point in the history
  • Loading branch information
zeesworth committed Aug 2, 2024
1 parent 449e6dc commit c74baed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/shape/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,12 @@ p5.prototype.rectMode = function(m) {
* </div>
*/
p5.prototype.smooth = function() {
this.setAttributes('antialias', true);
if (!this._renderer.isP3D) {
if ('imageSmoothingEnabled' in this.drawingContext) {
this.drawingContext.imageSmoothingEnabled = true;
}
} else {
this.setAttributes('antialias', true);
}
return this;
};
Expand Down

0 comments on commit c74baed

Please sign in to comment.