@@ -43,7 +43,7 @@ function Agence(pos, id, name, waitingTime, maxWaitingTime, sliderValue){
43
43
44
44
// TRAILS
45
45
this . history . push ( [ x , y ] ) ;
46
- this . showTrails ( color , this . size , sliderValue ) ;
46
+ this . showTrails ( sliderValue ) ;
47
47
48
48
circle ( x , y , this . size ) ;
49
49
@@ -59,13 +59,13 @@ function Agence(pos, id, name, waitingTime, maxWaitingTime, sliderValue){
59
59
let y = this . radius * sin ( this . angle ) ;
60
60
let x = this . radius * cos ( this . angle ) ;
61
61
62
- this . showTrails ( this . size , sliderValue ) ;
62
+ this . showTrails ( sliderValue ) ;
63
63
this . mouseOver ( x , y ) ;
64
64
if ( ! this . runOnce ) { ;
65
65
this . runOnce = true ;
66
66
this . interval = setInterval ( ( ) => {
67
67
this . deleteTrail ( ) ;
68
- } , 500 ) ;
68
+ } , 300 ) ;
69
69
}
70
70
71
71
text ( this . history , 0 , this . y + 100 ) ;
@@ -97,14 +97,14 @@ function Agence(pos, id, name, waitingTime, maxWaitingTime, sliderValue){
97
97
this . color = map ( this . waitingTime , 0 , this . maxWaitingTime + 10 , 150 , 255 , true ) + this . random
98
98
}
99
99
100
- this . showTrails = function ( size , sliderValue ) {
100
+ this . showTrails = function ( sliderValue ) {
101
101
let length = sliderValue - ( 14 - this . pos ) ;
102
102
if ( this . history . length > length ) {
103
103
this . history . splice ( 0 , abs ( this . history . length - length ) ) ;
104
104
}
105
105
;
106
106
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 ) ) ;
108
108
} ;
109
109
}
110
110
0 commit comments