@@ -33,6 +33,8 @@ var Stats = function () {
33
33
34
34
}
35
35
36
+ mode = id ;
37
+
36
38
}
37
39
38
40
//
@@ -125,7 +127,7 @@ Stats.Panel = function ( name, fg, bg ) {
125
127
context . globalAlpha = 0.9 ;
126
128
context . fillRect ( 3 , 15 , 74 , 30 ) ;
127
129
128
- var min = Infinity , max = 0 ;
130
+ var min = Infinity , max = 0 , round = Math . round ;
129
131
130
132
return {
131
133
@@ -140,15 +142,15 @@ Stats.Panel = function ( name, fg, bg ) {
140
142
context . fillStyle = bg ;
141
143
context . fillRect ( 0 , 0 , 80 , 15 ) ;
142
144
context . fillStyle = fg ;
143
- context . fillText ( ( value | 0 ) + ' ' + name + ' (' + ( min | 0 ) + '-' + ( max | 0 ) + ')' , 3 , 10 ) ;
145
+ context . fillText ( round ( value ) + ' ' + name + ' (' + round ( min ) + '-' + round ( max ) + ')' , 3 , 10 ) ;
144
146
145
147
context . drawImage ( canvas , 4 , 15 , 74 , 30 , 3 , 15 , 74 , 30 ) ;
146
148
147
149
context . fillRect ( 76 , 15 , 1 , 30 ) ;
148
150
149
151
context . fillStyle = bg ;
150
152
context . globalAlpha = 0.9 ;
151
- context . fillRect ( 76 , 15 , 1 , 30 - ( ( value / maxValue ) * 30 ) | 0 ) ;
153
+ context . fillRect ( 76 , 15 , 1 , 30 - round ( ( value / maxValue ) * 30 ) ) ;
152
154
153
155
}
154
156
0 commit comments