p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

Cannot console.log objects having circular references

Open dipamsen opened this issue 8 months ago • 5 comments

p5.js version

1.9.4

What is your operating system?

Windows

Web browser and version

Chrome 126.0.6478.127

Actual Behavior

Printing a p5.Image object breaks the console.

Expected Behavior

p5.Image should be printable.

Steps to reproduce

Steps:

  1. Copy the following code in a sketch
  2. Running the code prints nothing on the console
  3. Commenting out the third line prints "Hi".

Snippet:

let img = createImage(20, 20);
console.log("Hi");
console.log(img);

dipamsen avatar Jun 30 '24 21:06 dipamsen