-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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.js compatibility issue with Arc browser on Windows #3261
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already. |
@raclim Can I work on it ? |
Yes @ujjwaldubey1 feel free to take it on! :) |
Hello @raclim As a Contributer I wanted to tell you i think the issue is no longer there i followed the Process as the above described .... p5.js.Web.Editor.-.Google.Chrome.2024-12-10.19-56-30.mp4 |
Issue: The sketch freezes when a ball approaches the top edge, and an error occurs: TypeError: Cannot read properties of undefined (reading 'length'). Fix: The issue is likely caused by the ball going out of bounds when approaching the top or bottom edge. To resolve this, I added the constrain() function to make sure the ball stays within the canvas boundaries. Updated Code : function setup() { function draw() { class Ball { display() { move() { edges() { Thankyou and if You have any doubts feel free to ask. |
p5.js version
1.10.0
What is your operating system?
Windows
Web browser and version
Arc Browser Based on Chromium version 130.0.6723.92 (Official Build) (64-bit)
Actual Behavior
I'm working on a simple p5.js sketch where balls bounce off the edges of the canvas. The sketch runs as expected for a while, but when a ball approaches the top edge, the sketch freezes, and I receive an error message.
TypeError: Cannot read properties of undefined (reading 'length')
at undefined:53173:127
🌸 p5.js says:
[p5.js, line 53173] Cannot read property of undefined. Check the line number in error and make sure the variable which is being operated is not undefined.
┌[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.10.0/p5.js:53173:127]
Error at line 53173 in _gridMap()
└[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.10.0/p5.js:53138:26]
Called from line 53138 in _main.default._updateGridOutput()
└[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.10.0/p5.js:53690:20]
Called from line 53690 in _main.default._updateAccsOutput()
└[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.10.0/p5.js:78952:22]
Called from line 78952 in _main.default.redraw()
└[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.10.0/p5.js:66079:23]
Called from line 66079 in _draw()
Expected Behavior
The ball should bounce off the top edge and continue moving within the canvas without any errors.
Steps to reproduce
Steps:
Snippet:
The text was updated successfully, but these errors were encountered: