aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/src/core/script/particle.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes/RDGE/src/core/script/particle.js')
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/particle.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/js/helper-classes/RDGE/src/core/script/particle.js b/js/helper-classes/RDGE/src/core/script/particle.js
index 158807bb..1730e823 100755
--- a/js/helper-classes/RDGE/src/core/script/particle.js
+++ b/js/helper-classes/RDGE/src/core/script/particle.js
@@ -77,7 +77,7 @@ RDGE.particle = function (def, id) {
77 // calculate the initial position in world space. 77 // calculate the initial position in world space.
78 this.pos = RDGE.mat4.transformPoint(spawnMatrix, this.pos); 78 this.pos = RDGE.mat4.transformPoint(spawnMatrix, this.pos);
79 } 79 }
80 // all other values are assumed to be defined in local or world space depending on 80 // all other values are assumed to be defined in local or world space depending on
81 // the particles worldSpace designation. 81 // the particles worldSpace designation.
82 var toRadians = Math.PI / 180.0; 82 var toRadians = Math.PI / 180.0;
83 if (this.def.initialsize) { 83 if (this.def.initialsize) {
@@ -334,10 +334,10 @@ RDGE.particleBuffer = function (pdef, emitter, size) {
334 var x, y, z, w; 334 var x, y, z, w;
335 var p = this.particles[i]; 335 var p = this.particles[i];
336 var age = (p.age / p.lifespan); // normalized age 336 var age = (p.age / p.lifespan); // normalized age
337 // combine frame number and age and store in w. 337 // combine frame number and age and store in w.
338 // to decode : 338 // to decode :
339 // frame = floor( w ); 339 // frame = floor( w );
340 // age = fract( w ); 340 // age = fract( w );
341 var pw = Math.min(age, 0.999) + Math.floor(p.frame); 341 var pw = Math.min(age, 0.999) + Math.floor(p.frame);
342 if (age < 1.0) { // || (pdef.persist != undefined && pdef.persist == true)) { 342 if (age < 1.0) { // || (pdef.persist != undefined && pdef.persist == true)) {
343 var px = p.pos[0]; 343 var px = p.pos[0];
@@ -747,7 +747,7 @@ RDGE.particleSys = function (addr) {
747 var emin = emitter.pbuffer.bounds.min; 747 var emin = emitter.pbuffer.bounds.min;
748 var emax = emitter.pbuffer.bounds.max; 748 var emax = emitter.pbuffer.bounds.max;
749 749
750 // calculate a bounds that fits all particles. 750 // calculate a bounds that fits all particles.
751 if (emin[0] < bmin[0]) { bmin[0] = emin[0]; } 751 if (emin[0] < bmin[0]) { bmin[0] = emin[0]; }
752 if (emin[1] < bmin[1]) { bmin[1] = emin[1]; } 752 if (emin[1] < bmin[1]) { bmin[1] = emin[1]; }
753 if (emin[2] < bmin[2]) { bmin[2] = emin[2]; } 753 if (emin[2] < bmin[2]) { bmin[2] = emin[2]; }