Closed
Description
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
beta5
Web browser and version
Firefox 136.0.2
Operating system
Linux
Steps to reproduce this
Description:
Calling image.copy(src, ...)
on an image or p5.Graphics
source throws:
ReferenceError: fn is not defined
This did not happen in p5.js v1.x and appears to be a regression introduced in v2 betas.
Steps to Reproduce:
function setup() {
createCanvas(100, 100)
let src = createGraphics(50, 50)
let image = new p5.Image(src.width, src.height)
image.copy(src, 0, 0, src.width, src.height, 0, 0, src.width, src.height)
}
Error:
Uncaught (in promise) ReferenceError: fn is not defined
Expected Behavior:
Image should copy content from src
without throwing.