Skip to content

[p5.js 2.0 Beta Bug Report]: pixels is not defined #7482

Closed
@davepagurek

Description

@davepagurek

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 beta 1

Web browser and version

Firefox

Operating system

MacOS

Steps to reproduce this

When trying to access pixels after loadPixels(), it does not appear to be defined. _renderer.pixels is defined, though, so it seems like it's just not being forwarded to the global p5 scope.

e.g.:

function setup() {
  createCanvas(400, 400);
  background('red')
  loadPixels()
  console.log(pixels[0])
}

This throws the error pixels is not defined, but it should log 255 (as it does on 1.11.2.)

Live: https://editor.p5js.org/davepagurek/sketches/mrrBUOX6M

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions