Skip to content

[p5.js 2.0 Bug Report]: "TypeError: this.setAttributes is not a function" when calling noSmooth on a p5.Graphics object #8264

@nking07049925

Description

@nking07049925

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

>=2.0.0

Web browser and version

Chromium 142.0.7444.60

Operating system

Windows 11

Steps to reproduce this

Steps:

Calling noSmooh on a p5.Graphics object results in the "TypeError: this.setAttributes is not a function" error.
Doesn't matter if called in setup or in draw. Doesn't reproduce on pre 2.0 versions.

Snippet:

function setup() {
  createCanvas(100, 100, WEBGL);
  const graphics = createGraphics(100, 100, WEBGL);
  graphics.noSmooth();
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions