-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
p5.min.js WEBGL behaving differently than p5.js #5890
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you! |
Hi! I tried pasting your code into editor.p5js.org and then toggling between .min.js and .js but I don't see a difference between them. Is there a chance that your non-minified p5 file is from an earlier version? The .min.js output you've shown is the expected output in v1.5.0, which disables alpha by default. Alpha can be turned on by calling However, I've noticed a bug when doing this! In your code, you have this: let canvas2 = sketch.createCanvas(100, 100, sketch.WEBGL);
// ...
canvas2.position(0,0); Unfortunately, this stops working after a sketch.createCanvas(100, 100, sketch.WEBGL);
sketch.setAttributes({ alpha: true });
let canvas2 = sketch._renderer;
// ...
canvas2.position(0,0); This doesn't seem great, I wonder if there's a way that we can make the output of Live version here: https://editor.p5js.org/davepagurek/sketches/ZTPqeBdb9 |
Yep, my bad. As I changed the old p5.min.js for the new one, did the exact opposite with the p5.js (how?!) and ended up using an old version. |
For organizational purposes, I'm going to close this issue, but I've made a new issue with a more descriptive title for that issue where the return value of I've also made another issue here #5891 to discuss a potential solution to let us allow WebGL canvases to have alpha again by default. Feel free to carry on the discussions there 🙂 |
Most appropriate sub-area of p5.js?
p5.js version
1.5.0
Web browser and version
Firefox 102
Operating System
OSX 10.15
Steps to reproduce this
Steps:
Snippet:
The text was updated successfully, but these errors were encountered: