You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Visual mismatch between Array example and corresponding liveSketch.js #622
Hi @SableRaf ,
The visual mismatch occurs due to the absence of an explicit stroke() declaration in the web example. Adding stroke(255); within the setup() function resolves the issue and ensures the output aligns with the Processing IDE. Including strokeWeight(1) or (2); can further improve consistency across both versions.
This update should effectively address the discrepancy.
Thanks for taking the time to suggest a solution. However, it seems that your response missed some important context. Is it possible it was generated by an LLM? 🙂
The livesketch.js sketch actually contains three calls to stroke(), so the solution is not as simple as adding a single stroke(255) declaration, especially in setup() where it would be overwritten by the calls to stroke() in draw().
You might want to take a closer look at the original issue. You could also try to reproduce the behavior in a similar sketch in the p5.js editor for example.
Hi @SableRaf,
Yes, I do use an LLM to help with grammar and formatting — it makes my responses cleaner and easier to follow. 🙂
That said, I really appreciate you pointing out the missed context. You're totally right — with multiple stroke() calls in draw(), setting it once in setup() wouldn't have the intended effect. I'll take a closer look at the sketch itself and try reproducing the behavior in the p5.js editor. Thanks again for catching that!
Activity
rishabdev2997 commentedon Apr 5, 2025
Hi @SableRaf ,
The visual mismatch occurs due to the absence of an explicit stroke() declaration in the web example. Adding stroke(255); within the setup() function resolves the issue and ensures the output aligns with the Processing IDE. Including strokeWeight(1) or (2); can further improve consistency across both versions.
This update should effectively address the discrepancy.
Can I go ahead and raise a PR with this solution?
SableRaf commentedon Apr 5, 2025
Hi @rishabdev2997
Thanks for taking the time to suggest a solution. However, it seems that your response missed some important context. Is it possible it was generated by an LLM? 🙂
The
livesketch.jssketch actually contains three calls tostroke(), so the solution is not as simple as adding a singlestroke(255)declaration, especially insetup()where it would be overwritten by the calls tostroke()indraw().You might want to take a closer look at the original issue. You could also try to reproduce the behavior in a similar sketch in the p5.js editor for example.
rishabdev2997 commentedon Apr 6, 2025
Hi @SableRaf,
Yes, I do use an LLM to help with grammar and formatting — it makes my responses cleaner and easier to follow. 🙂
That said, I really appreciate you pointing out the missed context. You're totally right — with multiple stroke() calls in draw(), setting it once in setup() wouldn't have the intended effect. I'll take a closer look at the sketch itself and try reproducing the behavior in the p5.js editor. Thanks again for catching that!
Pratik5252 commentedon Oct 7, 2025
@rishabdev2997 are you still working on this issue?