Skip to content

Commit 9521fe8

Browse files
committed
- Instructions on how to enable the MEM mode
1 parent a35a61a commit 9521fe8

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

README.md

+16-15
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This class provides a simple info box that will help you monitor your code perfo
99

1010
* **FPS** Frames rendered in the last second. The higher the number the better.
1111
* **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)
1313

1414
### Screenshots ###
1515

@@ -18,35 +18,36 @@ This class provides a simple info box that will help you monitor your code perfo
1818
### Usage ###
1919

2020
var stats = new Stats();
21-
parentElement.appendChild(stats.domElement);
2221

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
3223
stats.domElement.style.position = 'absolute';
3324
stats.domElement.style.left = '0px';
3425
stats.domElement.style.top = '0px';
3526

36-
parentElement.appendChild(stats.domElement);
27+
parentElement.appendChild( stats.domElement );
3728

38-
setInterval(function () {
29+
setInterval( function () {
3930

4031
stats.update();
4132

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))
4344

4445
### Change Log ###
4546

4647
2010 09 21 - **r5** (3.800 kb)
4748

4849
* Different color per mode.
49-
* Added MEM mode. (Chrome only)
50+
* Added MEM mode. (Webkit-based browsers only)
5051
* Force text left aligned.
5152

5253

0 commit comments

Comments
 (0)