Skip to content

Fix: Smoke particle example - #1522

Draft
kaissy-a wants to merge 2 commits into
processing:mainfrom
kaissy-a:fix_smoke_particle
Draft

Fix: Smoke particle example#1522
kaissy-a wants to merge 2 commits into
processing:mainfrom
kaissy-a:fix_smoke_particle

Conversation

@kaissy-a

@kaissy-a kaissy-a commented Jul 19, 2026

Copy link
Copy Markdown

Issue: 1025

Changes: Added parameters to createVector.

Changes running here: https://editor.p5js.org/kaissy/sketches/Xovljq5vg

Team Members:
@kaissy-a
@esoloriovilla-dot
@RyRy241

@limzykenneth

Copy link
Copy Markdown
Member

Why is length renamed len here? I don't think there would be anything that would conflict with the name length?

@kaissy-a

Copy link
Copy Markdown
Author

Hi! We noticed during testing in the p5.js web editor that the original variable name threw a redeclaration error (Function "length" on line 32 is being redeclared and conflicts with a p5.js function). With the user in mind we thought renaming the variable would help avoid conflict with the global length property. Please let us know if you prefer a different naming convention or approach!

@ksen0

ksen0 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Thanks for flagging that @kaissy-a, it is indeed a v2 behavior that was not present in v1. It's not intended so I will look into whether it should be reported as a bug, because there is no global length function in the pubic API, and multiple examples use length as a var name, which might cause other weirder errors/behaviors in other examples or in the future.

@davepagurek @limzykenneth this seems to be a strands shadow problem introduced in v2, should I make a bug issue in p5.js repo?

image

@kaissy-a let's rename it back to length in this example though because this shouldn't be happening. Really helpful you spotted this weird behavior, thank you

@ksen0

ksen0 commented Jul 23, 2026

Copy link
Copy Markdown
Member

@kaissy-a thanks; this is still marked as "draft" - intentional or ready from your side?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants