Quote:
Originally Posted by reapercurious
looking for a way to create one function with private variables that can somehow be instantiated by looping through all the used channels, to keep the code as short as possible.
|
AFAIK there's no way to determine how many channels are in use. Also JSFX is not dynamic, in that all code paths are determined when the script is loaded and compiled. There's no way to spawn new variables once the effect is running.
The closest you can get is to manage data in the effect memory, using it to represent objects.