-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Milestone
Description
Most appropriate sub-area of p5.js?
- Accessibility (Web Accessibility)
- Build tools and processes
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Friendly error system
- Image
- IO (Input/Output)
- Localization
- Math
- Unit Testing
- Typography
- Utilities
- WebGL
- Other (specify if possible)
p5.js version
1.4.1
Web browser and version
Chrome 103.0.5060.114
Operating System
Windows 10
Steps to reproduce this
Steps:
- Create a p5 graphics object
- Call noSmooth() on the graphics object
- A message is logged to the console (even though
noSmooth()
works properly):
You are trying to use setAttributes on a p5.Graphics object that does not use a WEBGL renderer.
There is no way to stop the logs as far as I know (even with disableFriendlyErrors). This is problematic if a sketch calls noSmooth() frequently.
Snippet:
function setup(){
myGraphics = createGraphics(100,100)
myGraphics.noSmooth() //message is logged once
}
function draw(){
myGraphics.noSmooth(); //message is logged once per frame
}