Saghen / WebGL-Particles

A replica of Particles.js rendered with webgl
https://particles.saghen.dev
5 stars 1 forks source link

Middleware for updating particle positions and generation #3

Open Saghen opened 4 years ago

Saghen commented 4 years ago

The existing code can be found here. The entire update stack needs to moved over to a middleware stack for easy customization.

Saghen commented 4 years ago

The system will work like so:

Note: If the 3rd step isnt reached on the last render loop, run the third step on each render loop until it is complete. Note 2: The index of the last checked particle must be stored so that we can resume from that index Note 3: By default, we should have a customizable limit on how many particles can be processed in a loop since this timer should almost never be fired except on the lowest end hardware and battery life must be considered