repo: janusweb action: commit revision: path_from: revision_from: 9ca5d76c2a201d9267f6c4c7e1f1cbed3ac17131: path_to: revision_to:
commit 9ca5d76c2a201d9267f6c4c7e1f1cbed3ac17131 Author: James BaicoianuDate: Fri Feb 3 00:52:39 2017 -0800 Use one random number for rand_col instead of one per color channel diff --git a/scripts/janusparticle.js b/scripts/janusparticle.js
--- a/scripts/janusparticle.js
+++ b/scripts/janusparticle.js
@@ -258,9 +258,10 @@ elation.require(['janusweb.janusbase'], function() {
}
col.copy(this.properties.color);
if (rand_col.lengthSq() > 0) {
- col.r += Math.random() * rand_col.x;
- col.g += Math.random() * rand_col.y;
- col.b += Math.random() * rand_col.z;
+ var rand = Math.random();
+ col.r += rand * rand_col.x;
+ col.g += rand * rand_col.y;
+ col.b += rand * rand_col.z;
}
if (this.geometry.attributes.position) {
-----END OF PAGE-----