Skip to content

p5 logs a message every time noSmooth() is called on a graphics object #5723

@IkeB108

Description

@IkeB108

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:

  1. Create a p5 graphics object
  2. Call noSmooth() on the graphics object
  3. 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
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions