moai/moai-dev — pull request #911 by seebs (2014-04-29 04:23:47+00:00)
Title: Add user-settable registers for particle scripts

The idea here is to provide a way for live parameter updates for
a particle script. So, we introduce a new kind of register, a
"live" register. Live registers are associated with the particle
script, not with a specific particle. The intended use is that
these allow you to prepare arbitrary values, stored in a
particle script, then have the script use those values.

If you use these values in the initialization script, they're
fixed once a particle is created. If you use them in the render
script, they continue to update live throughout the life of the
particle.

Added a new example (particles-registers) to illustrate how to
use this.