Skip to content

Commit 173caa3

Browse files
committed
stats.js usage clean up
1 parent 12b9c52 commit 173caa3

File tree

211 files changed

+440
-1000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+440
-1000
lines changed

examples/canvas_ascii_effect.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@
9090
container.appendChild( effect.domElement );
9191

9292
stats = new Stats();
93-
stats.domElement.style.position = 'absolute';
94-
stats.domElement.style.top = '0px';
95-
container.appendChild( stats.domElement );
93+
container.appendChild( stats.dom );
9694

9795
//
9896

examples/canvas_camera_orthographic.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@
116116
container.appendChild( renderer.domElement );
117117

118118
stats = new Stats();
119-
stats.domElement.style.position = 'absolute';
120-
stats.domElement.style.top = '0px';
121-
container.appendChild( stats.domElement );
119+
container.appendChild( stats.dom );
122120

123121
//
124122

examples/canvas_camera_orthographic2.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,7 @@
185185
container.appendChild( renderer.domElement );
186186

187187
stats = new Stats();
188-
stats.domElement.style.position = 'absolute';
189-
stats.domElement.style.top = '0px';
190-
container.appendChild( stats.domElement );
188+
container.appendChild( stats.dom );
191189

192190
window.addEventListener( 'resize', onWindowResize, false );
193191

examples/canvas_geometry_birds.html

+1-5
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,7 @@
377377
document.body.appendChild( renderer.domElement );
378378

379379
stats = new Stats();
380-
stats.domElement.style.position = 'absolute';
381-
stats.domElement.style.left = '0px';
382-
stats.domElement.style.top = '0px';
383-
384-
document.getElementById( 'container' ).appendChild(stats.domElement);
380+
document.getElementById( 'container' ).appendChild(stats.dom);
385381

386382
//
387383

examples/canvas_geometry_cube.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@
9696
container.appendChild( renderer.domElement );
9797

9898
stats = new Stats();
99-
stats.domElement.style.position = 'absolute';
100-
stats.domElement.style.top = '0px';
101-
container.appendChild( stats.domElement );
99+
container.appendChild( stats.dom );
102100

103101
document.addEventListener( 'mousedown', onDocumentMouseDown, false );
104102
document.addEventListener( 'touchstart', onDocumentTouchStart, false );

examples/canvas_geometry_earth.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@
117117
container.appendChild( renderer.domElement );
118118

119119
stats = new Stats();
120-
stats.domElement.style.position = 'absolute';
121-
stats.domElement.style.top = '0px';
122-
container.appendChild( stats.domElement );
120+
container.appendChild( stats.dom );
123121

124122
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
125123

examples/canvas_geometry_hierarchy.html

+1-4
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@
7979
container.appendChild( renderer.domElement );
8080

8181
stats = new Stats();
82-
stats.domElement.style.position = 'absolute';
83-
stats.domElement.style.top = '0px';
84-
stats.domElement.style.zIndex = 100;
85-
container.appendChild( stats.domElement );
82+
container.appendChild( stats.dom );
8683

8784
//
8885

examples/canvas_geometry_nurbs.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@
133133
container.appendChild( renderer.domElement );
134134

135135
stats = new Stats();
136-
stats.domElement.style.position = 'absolute';
137-
stats.domElement.style.top = '0px';
138-
container.appendChild( stats.domElement );
136+
container.appendChild( stats.dom );
139137

140138
document.addEventListener( 'mousedown', onDocumentMouseDown, false );
141139
document.addEventListener( 'touchstart', onDocumentTouchStart, false );

examples/canvas_geometry_shapes.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,7 @@
298298
container.appendChild( renderer.domElement );
299299

300300
stats = new Stats();
301-
stats.domElement.style.position = 'absolute';
302-
stats.domElement.style.top = '0px';
303-
container.appendChild( stats.domElement );
301+
container.appendChild( stats.dom );
304302

305303
document.addEventListener( 'mousedown', onDocumentMouseDown, false );
306304
document.addEventListener( 'touchstart', onDocumentTouchStart, false );

examples/canvas_geometry_terrain.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@
9797
container.appendChild( renderer.domElement );
9898

9999
stats = new Stats();
100-
stats.domElement.style.position = 'absolute';
101-
stats.domElement.style.top = '0px';
102-
container.appendChild( stats.domElement );
100+
container.appendChild( stats.dom );
103101

104102
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
105103

examples/canvas_geometry_text.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@
118118
container.appendChild( renderer.domElement );
119119

120120
stats = new Stats();
121-
stats.domElement.style.position = 'absolute';
122-
stats.domElement.style.top = '0px';
123-
container.appendChild( stats.domElement );
121+
container.appendChild( stats.dom );
124122

125123
document.addEventListener( 'mousedown', onDocumentMouseDown, false );
126124
document.addEventListener( 'touchstart', onDocumentTouchStart, false );

examples/canvas_interactive_cubes.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@
103103
container.appendChild( renderer.domElement );
104104

105105
stats = new Stats();
106-
stats.domElement.style.position = 'absolute';
107-
stats.domElement.style.top = '0px';
108-
container.appendChild( stats.domElement );
106+
container.appendChild( stats.dom );
109107

110108
document.addEventListener( 'mousedown', onDocumentMouseDown, false );
111109
document.addEventListener( 'touchstart', onDocumentTouchStart, false );

examples/canvas_interactive_cubes_tween.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@
8383
container.appendChild(renderer.domElement);
8484

8585
stats = new Stats();
86-
stats.domElement.style.position = 'absolute';
87-
stats.domElement.style.top = '0px';
88-
container.appendChild( stats.domElement );
86+
container.appendChild( stats.dom );
8987

9088
document.addEventListener( 'mousedown', onDocumentMouseDown, false );
9189
document.addEventListener( 'touchstart', onDocumentTouchStart, false );

examples/canvas_interactive_particles.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@
9595
container.appendChild( renderer.domElement );
9696

9797
stats = new Stats();
98-
stats.domElement.style.position = 'absolute';
99-
stats.domElement.style.top = '0px';
100-
container.appendChild( stats.domElement );
98+
container.appendChild( stats.dom );
10199

102100
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
103101

examples/canvas_lines_colors.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@
116116
//
117117

118118
stats = new Stats();
119-
stats.domElement.style.position = 'absolute';
120-
stats.domElement.style.top = '0px';
121-
//container.appendChild( stats.domElement );
119+
//container.appendChild( stats.dom );
122120

123121
//
124122

examples/canvas_lines_colors_2d.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@
116116
//
117117

118118
stats = new Stats();
119-
stats.domElement.style.position = 'absolute';
120-
stats.domElement.style.top = '0px';
121-
//container.appendChild( stats.domElement );
119+
//container.appendChild( stats.dom );
122120

123121
//
124122

examples/canvas_lines_dashed.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@
107107
container.appendChild( renderer.domElement );
108108

109109
stats = new Stats();
110-
stats.domElement.style.position = 'absolute';
111-
stats.domElement.style.top = '0px';
112-
container.appendChild( stats.domElement );
110+
container.appendChild( stats.dom );
113111

114112
//
115113

examples/canvas_materials.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,7 @@
160160
debugContext.strokeStyle = '#000000';
161161

162162
stats = new Stats();
163-
stats.domElement.style.position = 'absolute';
164-
stats.domElement.style.top = '0px';
165-
container.appendChild(stats.domElement);
163+
container.appendChild(stats.dom);
166164

167165
//
168166

examples/canvas_materials_video.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,7 @@
156156
container.appendChild( renderer.domElement );
157157

158158
stats = new Stats();
159-
stats.domElement.style.position = 'absolute';
160-
stats.domElement.style.top = '0px';
161-
container.appendChild( stats.domElement );
159+
container.appendChild( stats.dom );
162160

163161
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
164162

examples/canvas_morphtargets_horse.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@
9393
//
9494

9595
stats = new Stats();
96-
stats.domElement.style.position = 'absolute';
97-
stats.domElement.style.top = '0px';
98-
container.appendChild( stats.domElement );
96+
container.appendChild( stats.dom );
9997

10098
//
10199

examples/canvas_particles_floor.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@
7373
container.appendChild( renderer.domElement );
7474

7575
stats = new Stats();
76-
stats.domElement.style.position = 'absolute';
77-
stats.domElement.style.top = '0px';
78-
container.appendChild( stats.domElement );
76+
container.appendChild( stats.dom );
7977

8078
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
8179
document.addEventListener( 'touchstart', onDocumentTouchStart, false );

examples/canvas_particles_random.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@
8080
container.appendChild( renderer.domElement );
8181

8282
stats = new Stats();
83-
stats.domElement.style.position = 'absolute';
84-
stats.domElement.style.top = '0px';
85-
container.appendChild( stats.domElement );
83+
container.appendChild( stats.dom );
8684

8785
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
8886
document.addEventListener( 'touchstart', onDocumentTouchStart, false );

examples/canvas_particles_sprites.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@
6969
container.appendChild( renderer.domElement );
7070

7171
stats = new Stats();
72-
stats.domElement.style.position = 'absolute';
73-
stats.domElement.style.top = '0px';
74-
container.appendChild( stats.domElement );
72+
container.appendChild( stats.dom );
7573

7674
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
7775
document.addEventListener( 'touchstart', onDocumentTouchStart, false );

examples/canvas_particles_waves.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@
8888
container.appendChild( renderer.domElement );
8989

9090
stats = new Stats();
91-
stats.domElement.style.position = 'absolute';
92-
stats.domElement.style.top = '0px';
93-
container.appendChild( stats.domElement );
91+
container.appendChild( stats.dom );
9492

9593
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
9694
document.addEventListener( 'touchstart', onDocumentTouchStart, false );

examples/canvas_performance.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@
101101
container.appendChild( renderer.domElement );
102102

103103
stats = new Stats();
104-
stats.domElement.style.position = 'absolute';
105-
stats.domElement.style.top = '0px';
106-
container.appendChild(stats.domElement);
104+
container.appendChild(stats.dom);
107105

108106
//
109107

examples/canvas_sandbox.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,7 @@
154154
debugContext.strokeStyle = '#000000';
155155

156156
stats = new Stats();
157-
stats.domElement.style.position = 'absolute';
158-
stats.domElement.style.top = '0px';
159-
container.appendChild(stats.domElement);
157+
container.appendChild(stats.dom);
160158

161159
document.addEventListener( 'keydown', onDocumentKeyDown, false );
162160
document.addEventListener( 'keyup', onDocumentKeyUp, false );

examples/misc_animation_keys.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@
6868
container.appendChild( renderer.domElement );
6969

7070
stats = new Stats();
71-
stats.domElement.style.position = 'absolute';
72-
stats.domElement.style.top = '0px';
73-
container.appendChild( stats.domElement );
71+
container.appendChild( stats.dom );
7472

7573
window.addEventListener( 'resize', onWindowResize, false );
7674
};

examples/misc_controls_fly.html

+1-4
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,7 @@
222222
container.appendChild( renderer.domElement );
223223

224224
stats = new Stats();
225-
stats.domElement.style.position = 'absolute';
226-
stats.domElement.style.top = '0px';
227-
stats.domElement.style.zIndex = 100;
228-
container.appendChild( stats.domElement );
225+
container.appendChild( stats.dom );
229226

230227
window.addEventListener( 'resize', onWindowResize, false );
231228

examples/misc_controls_orbit.html

+1-4
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,7 @@
110110
//
111111

112112
stats = new Stats();
113-
stats.domElement.style.position = 'absolute';
114-
stats.domElement.style.top = '0px';
115-
stats.domElement.style.zIndex = 100;
116-
container.appendChild( stats.domElement );
113+
container.appendChild( stats.dom );
117114

118115
//
119116

examples/misc_controls_trackball.html

+1-4
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,7 @@
125125
container.appendChild( renderer.domElement );
126126

127127
stats = new Stats();
128-
stats.domElement.style.position = 'absolute';
129-
stats.domElement.style.top = '0px';
130-
stats.domElement.style.zIndex = 100;
131-
container.appendChild( stats.domElement );
128+
container.appendChild( stats.dom );
132129

133130
//
134131

examples/misc_lights_test.html

+1-4
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,7 @@
128128

129129

130130
stats = new Stats();
131-
stats.domElement.style.position = 'absolute';
132-
stats.domElement.style.top = '0px';
133-
stats.domElement.style.zIndex = 100;
134-
container.appendChild( stats.domElement );
131+
container.appendChild( stats.dom );
135132

136133
//
137134

examples/misc_lookat.html

+1-4
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@
9393
container.appendChild( renderer.domElement );
9494

9595
stats = new Stats();
96-
stats.domElement.style.position = 'absolute';
97-
stats.domElement.style.top = '0px';
98-
stats.domElement.style.zIndex = 100;
99-
container.appendChild( stats.domElement );
96+
container.appendChild( stats.dom );
10097

10198
//
10299

examples/misc_ubiquity_test.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,7 @@
209209
document.body.appendChild( webglRenderer.domElement );
210210

211211
stats = new Stats();
212-
stats.domElement.style.position = 'absolute';
213-
stats.domElement.style.top = '0px';
214-
document.body.appendChild( stats.domElement );
212+
document.body.appendChild( stats.dom );
215213

216214
//
217215

examples/misc_ubiquity_test2.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,7 @@
162162
container2.appendChild( webglRenderer.domElement );
163163

164164
stats = new Stats();
165-
stats.domElement.style.position = 'absolute';
166-
stats.domElement.style.top = '0px';
167-
document.body.appendChild( stats.domElement );
165+
document.body.appendChild( stats.dom );
168166

169167
//
170168

examples/software_geometry_earth.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@
117117
container.appendChild( renderer.domElement );
118118

119119
stats = new Stats();
120-
stats.domElement.style.position = 'absolute';
121-
stats.domElement.style.top = '0px';
122-
container.appendChild( stats.domElement );
120+
container.appendChild( stats.dom );
123121

124122
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
125123

0 commit comments

Comments
 (0)