@@ -9,7 +9,7 @@ This class provides a simple info box that will help you monitor your code perfo
9
9
10
10
* ** FPS** Frames rendered in the last second. The higher the number the better.
11
11
* ** MS** Milliseconds needed to render a frame. The lower the number the better.
12
- * ** MEM** Mbytes of memory allocated. Make sure it doesn't keep incrementing. (Chrome only, --enable-memory-info flag required )
12
+ * ** MEM** Mbytes of memory allocated. Make sure it doesn't keep incrementing. (Webkit-based browsers only )
13
13
14
14
### Screenshots ###
15
15
@@ -18,35 +18,36 @@ This class provides a simple info box that will help you monitor your code perfo
18
18
### Usage ###
19
19
20
20
var stats = new Stats();
21
- parentElement.appendChild(stats.domElement);
22
21
23
- setInterval(function () {
24
-
25
- stats.update();
26
-
27
- }, 1000/60);
28
-
29
- Aligning the panel to the top-left corner:
30
-
31
- var stats = new Stats();
22
+ // Align top-left
32
23
stats.domElement.style.position = 'absolute';
33
24
stats.domElement.style.left = '0px';
34
25
stats.domElement.style.top = '0px';
35
26
36
- parentElement.appendChild(stats.domElement);
27
+ parentElement.appendChild( stats.domElement );
37
28
38
- setInterval(function () {
29
+ setInterval( function () {
39
30
40
31
stats.update();
41
32
42
- }, 1000/60);
33
+ }, 1000 / 60 );
34
+
35
+ ## Enable MEM ##
36
+
37
+ * ** Chrome**
38
+ * * Linux* /opt/google/chrome/google-chrome --enable-memory-info
39
+ * * Windows* "C:\Program Files\Google\Chrome\Application\chrome.exe" --enable-memory-info
40
+ * * MacOS* /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-memory-info
41
+
42
+ * ** Safari**
43
+ * * MacOS* Open ~ /Library/Preferences/com.apple.Safari.plist file for editing, and add & set enabled a boolean preference WebKitMemoryInfoEnabled ([ pic] ( http://mrdoob.github.com/stats.js/assets/safari_enablemem.png ) )
43
44
44
45
### Change Log ###
45
46
46
47
2010 09 21 - ** r5** (3.800 kb)
47
48
48
49
* Different color per mode.
49
- * Added MEM mode. (Chrome only)
50
+ * Added MEM mode. (Webkit-based browsers only)
50
51
* Force text left aligned.
51
52
52
53
0 commit comments