Skip to content
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

FX particle system #3820

Closed
wants to merge 44 commits into from
Closed

Conversation

DedeHai
Copy link
Collaborator

@DedeHai DedeHai commented Mar 12, 2024

finally ready to merge particle system and particle animations.
plz check it and add suggestions/comments

Basic Particle system defining particle structs, some emitters and particle to LED rendering
not yet final version but working
update from another commit that got lost
this somehow also got lost from an earlier commit
particle box now is more random in random mode (still a work in progress)
firework is now more configurable by sliders
particle attractor animation does not work, somthing wrong with pointer allocation, it worked with static variables
still unknown, why more than 256 particles are needed in memory allocation to not make it crash, but it works for now
at the expense of more ram usage, animations now have more options for color control (already used in fireworks now)
improved efficiency for stackup (pushback), added code to correctly determine direction if particles meed (probably overkill but now its there)
untested, need to verify it works
…ables to 32bit for faster calculation

32bit variables are faster on ESP32, so use them whenever a variable is used a lot, it saves one instruction per access.
it made very little difference in performance, but for ESP8266 it may matter so it is set permanently there. graphically the difference is also very small (sometimes a particle gets brighter or less saturated)
particle pile-up did not work correctly, now fixed
touch is implemented differently on S2 and S3, these changes make touch buttons work on S2 and S3
now better fits the default threshold value of 32
-removed wrap_update function, now integrated into move_update
-added more 'out of bounds' checking in fire functions, may speed it up a little
-removed particle box 'rocking boat' (buggy) and replaced with random sloshing.
-removed comments
-changed some variables into 32bit for speed boost on ESP32
-added link to KB at the top of FX.cpp
removed / added comments
@softhack007
Copy link
Collaborator

outdated - newer PR is here:

@DedeHai DedeHai deleted the PR_FX_particlesystem branch March 15, 2024 18:32
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.

2 participants