Skip to content

Commit 0113f5f

Browse files
committed
More bug fixes
1 parent c3d157c commit 0113f5f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

orbit/js/agence.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function Agence(pos, id, name, waitingTime, maxWaitingTime, sliderValue){
4343

4444
// TRAILS
4545
this.history.push([x,y]);
46-
this.showTrails(color, this.size, sliderValue);
46+
this.showTrails(sliderValue);
4747

4848
circle(x, y, this.size);
4949

@@ -59,13 +59,13 @@ function Agence(pos, id, name, waitingTime, maxWaitingTime, sliderValue){
5959
let y = this.radius * sin(this.angle);
6060
let x = this.radius * cos(this.angle);
6161

62-
this.showTrails(this.size, sliderValue);
62+
this.showTrails(sliderValue);
6363
this.mouseOver(x, y);
6464
if(!this.runOnce){;
6565
this.runOnce = true;
6666
this.interval = setInterval(() => {
6767
this.deleteTrail();
68-
}, 500);
68+
}, 300);
6969
}
7070

7171
text(this.history,0,this.y+100);
@@ -97,14 +97,14 @@ function Agence(pos, id, name, waitingTime, maxWaitingTime, sliderValue){
9797
this.color = map(this.waitingTime, 0, this.maxWaitingTime+10, 150, 255, true)+this.random
9898
}
9999

100-
this.showTrails = function(size, sliderValue){
100+
this.showTrails = function(sliderValue){
101101
let length = sliderValue-(14-this.pos);
102102
if(this.history.length > length){
103103
this.history.splice(0,abs(this.history.length-length));
104104
}
105105
;
106106
for(let i = this.history.length-1; i >= 0; i--){
107-
circle(this.history[i][0], this.history[i][1], map(i, length, 0, size, 0, true));
107+
circle(this.history[i][0], this.history[i][1], map(i, 0, this.history.length, 0, this.size, true));
108108
};
109109
}
110110

0 commit comments

Comments
 (0)