Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/shape/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@
this.drawingContext.imageSmoothingEnabled = false;
}
} else {
this.setAttributes('antialias', false);
// Only change if necessary to prevent canvas recreation
if (this._renderer.attributes.antialias !== false) {

Check failure on line 177 in src/shape/attributes.js

View workflow job for this annotation

GitHub Actions / test

test/unit/webgl/p5.RendererGL.js > p5.RendererGL > noSmooth() canvas position preservation > should maintain the canvas position after calling noSmooth()

TypeError: Cannot read properties of undefined (reading 'antialias') ❯ fn.noSmooth src/shape/attributes.js:177:37 ❯ <computed> [as noSmooth] src/core/friendly_errors/param_validator.js:535:23 ❯ test/unit/webgl/p5.RendererGL.js:37:12
this.setAttributes('antialias', false);
}
}
return this;
};
Expand Down
Loading