Closed jeromeetienne closed 12 years ago
maybe this Math.floor is related
SPARKS.SteadyCounter.prototype.updateEmitter = function(emitter, time) {
return Math.floor(time * this.rate);
};
ah yes.. that was a cheap way to calculate the number of particles in step, because of the high refresh loop, (maybe 100 times a second), the emitter can't emit a fraction of 1 every loop.
i could add a counter to track particles generated every second to ensure more accurate emission..
fix for a more reliable SteadyCounter
pushed.
https://github.com/zz85/sparks.js/compare/320980f498...790f7749ba
now it accept values of <60, even 1 or 0.5
excelent! thanks :)
sparksEmitter = new SPARKS.Emitter(new SPARKS.SteadyCounter(67));
This will emit particles BUT
sparksEmitter = new SPARKS.Emitter(new SPARKS.SteadyCounter(66));
wont.
any rate <= 66 doesnt emit anything here