From efac93e50dda7879c275465d6625b43e8973ac6e Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Wed, 7 Mar 2018 15:03:37 +0100 Subject: [PATCH] some cleaning on edlp_corpus js file --- .../edlp_corpus/assets/dist/scripts/corpus.min.js | 11 ++--------- .../figli/edlp_corpus/assets/scripts/corpus.js | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/sites/all/modules/figli/edlp_corpus/assets/dist/scripts/corpus.min.js b/sites/all/modules/figli/edlp_corpus/assets/dist/scripts/corpus.min.js index 2be142c05..7952b8ecd 100644 --- a/sites/all/modules/figli/edlp_corpus/assets/dist/scripts/corpus.min.js +++ b/sites/all/modules/figli/edlp_corpus/assets/dist/scripts/corpus.min.js @@ -142,7 +142,6 @@ this.debug = d; this.mass = 8; this.velocity_threshold = 0.01; - this.moving = true; // define radius regarding entries length switch(true){ case this.entrees.length > 1 & this.entrees.length <= 3: @@ -208,7 +207,7 @@ // console.log(_physics.playing); // } if(!this.p.resting()){ - this.checkVelocity(); + this.checkVelocityThreshold(); this.checkWallBouncing(); this.updatePos(); } @@ -218,17 +217,11 @@ this.draw(); }; - Node.prototype.checkVelocity = function(){ + Node.prototype.checkVelocityThreshold = function(){ if (Math.abs(this.p.velocity.x) < this.velocity_threshold && Math.abs(this.p.velocity.y) < this.velocity_threshold){ - // console.log('checkVelocity stoping',this.p.velocity); this.p.velocity.multiplyScalar(0); - // this.moving = false; - // console.log('checkVelocity particule is resting',this.p.resting()); } - // else{ - // this.moving = true; - // } }; Node.prototype.checkWallBouncing = function(){ diff --git a/sites/all/modules/figli/edlp_corpus/assets/scripts/corpus.js b/sites/all/modules/figli/edlp_corpus/assets/scripts/corpus.js index 2be142c05..7952b8ecd 100644 --- a/sites/all/modules/figli/edlp_corpus/assets/scripts/corpus.js +++ b/sites/all/modules/figli/edlp_corpus/assets/scripts/corpus.js @@ -142,7 +142,6 @@ this.debug = d; this.mass = 8; this.velocity_threshold = 0.01; - this.moving = true; // define radius regarding entries length switch(true){ case this.entrees.length > 1 & this.entrees.length <= 3: @@ -208,7 +207,7 @@ // console.log(_physics.playing); // } if(!this.p.resting()){ - this.checkVelocity(); + this.checkVelocityThreshold(); this.checkWallBouncing(); this.updatePos(); } @@ -218,17 +217,11 @@ this.draw(); }; - Node.prototype.checkVelocity = function(){ + Node.prototype.checkVelocityThreshold = function(){ if (Math.abs(this.p.velocity.x) < this.velocity_threshold && Math.abs(this.p.velocity.y) < this.velocity_threshold){ - // console.log('checkVelocity stoping',this.p.velocity); this.p.velocity.multiplyScalar(0); - // this.moving = false; - // console.log('checkVelocity particule is resting',this.p.resting()); } - // else{ - // this.moving = true; - // } }; Node.prototype.checkWallBouncing = function(){