瀏覽代碼

stats.js usage clean up

Mr.doob 9 年之前
父節點
當前提交
173caa387a
共有 100 個文件被更改,包括 98 次插入323 次删除
  1. 1 3
      examples/canvas_ascii_effect.html
  2. 1 3
      examples/canvas_camera_orthographic.html
  3. 1 3
      examples/canvas_camera_orthographic2.html
  4. 1 5
      examples/canvas_geometry_birds.html
  5. 1 3
      examples/canvas_geometry_cube.html
  6. 1 3
      examples/canvas_geometry_earth.html
  7. 1 4
      examples/canvas_geometry_hierarchy.html
  8. 1 3
      examples/canvas_geometry_nurbs.html
  9. 1 3
      examples/canvas_geometry_shapes.html
  10. 1 3
      examples/canvas_geometry_terrain.html
  11. 1 3
      examples/canvas_geometry_text.html
  12. 1 3
      examples/canvas_interactive_cubes.html
  13. 1 3
      examples/canvas_interactive_cubes_tween.html
  14. 1 3
      examples/canvas_interactive_particles.html
  15. 1 3
      examples/canvas_lines_colors.html
  16. 1 3
      examples/canvas_lines_colors_2d.html
  17. 1 3
      examples/canvas_lines_dashed.html
  18. 1 3
      examples/canvas_materials.html
  19. 1 3
      examples/canvas_materials_video.html
  20. 1 3
      examples/canvas_morphtargets_horse.html
  21. 1 3
      examples/canvas_particles_floor.html
  22. 1 3
      examples/canvas_particles_random.html
  23. 1 3
      examples/canvas_particles_sprites.html
  24. 1 3
      examples/canvas_particles_waves.html
  25. 1 3
      examples/canvas_performance.html
  26. 1 3
      examples/canvas_sandbox.html
  27. 1 3
      examples/misc_animation_keys.html
  28. 1 4
      examples/misc_controls_fly.html
  29. 1 4
      examples/misc_controls_orbit.html
  30. 1 4
      examples/misc_controls_trackball.html
  31. 1 4
      examples/misc_lights_test.html
  32. 1 4
      examples/misc_lookat.html
  33. 1 3
      examples/misc_ubiquity_test.html
  34. 1 3
      examples/misc_ubiquity_test2.html
  35. 1 3
      examples/software_geometry_earth.html
  36. 0 2
      examples/software_lines_colors.html
  37. 0 2
      examples/software_lines_splines.html
  38. 1 3
      examples/software_sandbox.html
  39. 1 3
      examples/svg_sandbox.html
  40. 1 3
      examples/webgl_animation_cloth.html
  41. 1 6
      examples/webgl_animation_scene.html
  42. 1 3
      examples/webgl_animation_skinning_blending.html
  43. 1 6
      examples/webgl_animation_skinning_morph.html
  44. 1 3
      examples/webgl_buffergeometry.html
  45. 1 3
      examples/webgl_buffergeometry_constructed_from_geometry.html
  46. 1 3
      examples/webgl_buffergeometry_custom_attributes_particles.html
  47. 1 3
      examples/webgl_buffergeometry_drawcalls.html
  48. 1 3
      examples/webgl_buffergeometry_instancing.html
  49. 1 3
      examples/webgl_buffergeometry_instancing_billboards.html
  50. 1 3
      examples/webgl_buffergeometry_instancing_dynamic.html
  51. 1 3
      examples/webgl_buffergeometry_instancing_interleaved_dynamic.html
  52. 1 3
      examples/webgl_buffergeometry_lines.html
  53. 1 3
      examples/webgl_buffergeometry_lines_indexed.html
  54. 1 3
      examples/webgl_buffergeometry_points.html
  55. 1 3
      examples/webgl_buffergeometry_rawshader.html
  56. 1 3
      examples/webgl_buffergeometry_selective_draw.html
  57. 1 3
      examples/webgl_buffergeometry_uint.html
  58. 1 6
      examples/webgl_camera.html
  59. 1 3
      examples/webgl_camera_cinematic.html
  60. 1 3
      examples/webgl_camera_logarithmicdepthbuffer.html
  61. 1 6
      examples/webgl_clipping_advanced.html
  62. 1 3
      examples/webgl_custom_attributes.html
  63. 1 3
      examples/webgl_custom_attributes_lines.html
  64. 1 3
      examples/webgl_custom_attributes_points.html
  65. 1 3
      examples/webgl_custom_attributes_points2.html
  66. 1 3
      examples/webgl_custom_attributes_points3.html
  67. 1 4
      examples/webgl_effects_parallaxbarrier.html
  68. 1 3
      examples/webgl_geometries.html
  69. 1 3
      examples/webgl_geometries2.html
  70. 1 3
      examples/webgl_geometry_colors.html
  71. 1 3
      examples/webgl_geometry_colors_blender.html
  72. 1 4
      examples/webgl_geometry_colors_lookuptable.html
  73. 1 3
      examples/webgl_geometry_convex.html
  74. 1 3
      examples/webgl_geometry_dynamic.html
  75. 1 3
      examples/webgl_geometry_extrude_shapes2.html
  76. 1 3
      examples/webgl_geometry_extrude_splines.html
  77. 1 4
      examples/webgl_geometry_hierarchy.html
  78. 1 4
      examples/webgl_geometry_hierarchy2.html
  79. 1 4
      examples/webgl_geometry_large_mesh.html
  80. 1 3
      examples/webgl_geometry_minecraft.html
  81. 1 3
      examples/webgl_geometry_minecraft_ao.html
  82. 1 3
      examples/webgl_geometry_normals.html
  83. 1 3
      examples/webgl_geometry_nurbs.html
  84. 1 3
      examples/webgl_geometry_shapes.html
  85. 1 3
      examples/webgl_geometry_spline_editor.html
  86. 1 3
      examples/webgl_geometry_terrain.html
  87. 1 3
      examples/webgl_geometry_terrain_fog.html
  88. 1 3
      examples/webgl_geometry_terrain_raycast.html
  89. 1 3
      examples/webgl_geometry_text.html
  90. 1 3
      examples/webgl_geometry_text_earcut.html
  91. 1 3
      examples/webgl_geometry_text_pnltri.html
  92. 1 3
      examples/webgl_gpgpu_birds.html
  93. 1 3
      examples/webgl_hdr.html
  94. 1 3
      examples/webgl_interactive_buffergeometry.html
  95. 1 3
      examples/webgl_interactive_cubes.html
  96. 1 3
      examples/webgl_interactive_cubes_gpu.html
  97. 1 3
      examples/webgl_interactive_cubes_ortho.html
  98. 1 3
      examples/webgl_interactive_draggablecubes.html
  99. 1 3
      examples/webgl_interactive_instances_gpu.html
  100. 1 3
      examples/webgl_interactive_lines.html

+ 1 - 3
examples/canvas_ascii_effect.html

@@ -90,9 +90,7 @@
 				container.appendChild( effect.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/canvas_camera_orthographic.html

@@ -116,9 +116,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/canvas_camera_orthographic2.html

@@ -185,9 +185,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				window.addEventListener( 'resize', onWindowResize, false );
 

+ 1 - 5
examples/canvas_geometry_birds.html

@@ -377,11 +377,7 @@
 				document.body.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.left = '0px';
-				stats.domElement.style.top = '0px';
-
-				document.getElementById( 'container' ).appendChild(stats.domElement);
+				document.getElementById( 'container' ).appendChild(stats.dom);
 
 				//
 

+ 1 - 3
examples/canvas_geometry_cube.html

@@ -96,9 +96,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousedown', onDocumentMouseDown, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/canvas_geometry_earth.html

@@ -117,9 +117,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 

+ 1 - 4
examples/canvas_geometry_hierarchy.html

@@ -79,10 +79,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				stats.domElement.style.zIndex = 100;
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/canvas_geometry_nurbs.html

@@ -133,9 +133,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousedown', onDocumentMouseDown, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/canvas_geometry_shapes.html

@@ -298,9 +298,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousedown', onDocumentMouseDown, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/canvas_geometry_terrain.html

@@ -97,9 +97,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 

+ 1 - 3
examples/canvas_geometry_text.html

@@ -118,9 +118,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousedown', onDocumentMouseDown, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/canvas_interactive_cubes.html

@@ -103,9 +103,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousedown', onDocumentMouseDown, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/canvas_interactive_cubes_tween.html

@@ -83,9 +83,7 @@
 				container.appendChild(renderer.domElement);
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousedown', onDocumentMouseDown, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/canvas_interactive_particles.html

@@ -95,9 +95,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 

+ 1 - 3
examples/canvas_lines_colors.html

@@ -116,9 +116,7 @@
 				//
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				//container.appendChild( stats.domElement );
+				//container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/canvas_lines_colors_2d.html

@@ -116,9 +116,7 @@
 				//
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				//container.appendChild( stats.domElement );
+				//container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/canvas_lines_dashed.html

@@ -107,9 +107,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/canvas_materials.html

@@ -160,9 +160,7 @@
 				debugContext.strokeStyle = '#000000';
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild(stats.domElement);
+				container.appendChild(stats.dom);
 
 				//
 

+ 1 - 3
examples/canvas_materials_video.html

@@ -156,9 +156,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 

+ 1 - 3
examples/canvas_morphtargets_horse.html

@@ -93,9 +93,7 @@
 				//
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/canvas_particles_floor.html

@@ -73,9 +73,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/canvas_particles_random.html

@@ -80,9 +80,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/canvas_particles_sprites.html

@@ -69,9 +69,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/canvas_particles_waves.html

@@ -88,9 +88,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/canvas_performance.html

@@ -101,9 +101,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild(stats.domElement);
+				container.appendChild(stats.dom);
 
 				//
 

+ 1 - 3
examples/canvas_sandbox.html

@@ -154,9 +154,7 @@
 				debugContext.strokeStyle = '#000000';
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild(stats.domElement);
+				container.appendChild(stats.dom);
 
 				document.addEventListener( 'keydown', onDocumentKeyDown, false );
 				document.addEventListener( 'keyup', onDocumentKeyUp, false );

+ 1 - 3
examples/misc_animation_keys.html

@@ -68,9 +68,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				window.addEventListener( 'resize', onWindowResize, false );
 			};

+ 1 - 4
examples/misc_controls_fly.html

@@ -222,10 +222,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				stats.domElement.style.zIndex = 100;
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				window.addEventListener( 'resize', onWindowResize, false );
 

+ 1 - 4
examples/misc_controls_orbit.html

@@ -110,10 +110,7 @@
 				//
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				stats.domElement.style.zIndex = 100;
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 4
examples/misc_controls_trackball.html

@@ -125,10 +125,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				stats.domElement.style.zIndex = 100;
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 4
examples/misc_lights_test.html

@@ -128,10 +128,7 @@
 
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				stats.domElement.style.zIndex = 100;
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 4
examples/misc_lookat.html

@@ -93,10 +93,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				stats.domElement.style.zIndex = 100;
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/misc_ubiquity_test.html

@@ -209,9 +209,7 @@
 				document.body.appendChild( webglRenderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				document.body.appendChild( stats.domElement );
+				document.body.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/misc_ubiquity_test2.html

@@ -162,9 +162,7 @@
 				container2.appendChild( webglRenderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				document.body.appendChild( stats.domElement );
+				document.body.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/software_geometry_earth.html

@@ -117,9 +117,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 

+ 0 - 2
examples/software_lines_colors.html

@@ -133,8 +133,6 @@
 				}
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 0 - 2
examples/software_lines_splines.html

@@ -144,8 +144,6 @@
 				}
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/software_sandbox.html

@@ -132,9 +132,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/svg_sandbox.html

@@ -183,9 +183,7 @@
 				document.body.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				document.body.appendChild( stats.domElement );
+				document.body.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_animation_cloth.html

@@ -289,9 +289,7 @@
 				// performance monitor
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 6
examples/webgl_animation_scene.html

@@ -25,11 +25,6 @@
 			a {
 				color: #0af;
 			}
-
-			#stats { position: absolute; top:0; left: 0 }
-			#stats #fps { background: transparent !important }
-			#stats #fps #fpsText { color: #777 !important }
-			#stats #fps #fpsGraph { display: none }
 		</style>
 	</head>
 
@@ -117,7 +112,7 @@
 				// STATS
 
 				stats = new Stats();
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_animation_skinning_blending.html

@@ -74,9 +74,7 @@
 				//
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 6
examples/webgl_animation_skinning_morph.html

@@ -31,11 +31,6 @@
 			a {
 				color: #0af;
 			}
-
-			#stats { position: absolute; top:0; left: 0 }
-			#stats #fps { background: transparent !important }
-			#stats #fps #fpsText { color: #777 !important }
-			#stats #fps #fpsGraph { display: none }
 		</style>
 	</head>
 
@@ -152,7 +147,7 @@
 				// STATS
 
 				stats = new Stats();
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_buffergeometry.html

@@ -208,9 +208,7 @@
 				//
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_buffergeometry_constructed_from_geometry.html

@@ -79,9 +79,7 @@
 			controls.dynamicDampingFactor = 0.1;
 
 			stats = new Stats();
-			stats.domElement.style.position = 'absolute';
-			stats.domElement.style.top = '24px';
-			document.body.appendChild( stats.domElement );
+			document.body.appendChild( stats.dom );
 
 			window.addEventListener( 'resize', onWindowResize, false );
 

+ 1 - 3
examples/webgl_buffergeometry_custom_attributes_particles.html

@@ -160,9 +160,7 @@
 			container.appendChild( renderer.domElement );
 
 			stats = new Stats();
-			stats.domElement.style.position = 'absolute';
-			stats.domElement.style.top = '0px';
-			container.appendChild( stats.domElement );
+			container.appendChild( stats.dom );
 
 			//
 

+ 1 - 3
examples/webgl_buffergeometry_drawcalls.html

@@ -185,9 +185,7 @@
 				//
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				window.addEventListener( 'resize', onWindowResize, false );
 

+ 1 - 3
examples/webgl_buffergeometry_instancing.html

@@ -223,9 +223,7 @@
 			container.appendChild( renderer.domElement );
 
 			stats = new Stats();
-			stats.domElement.style.position = 'absolute';
-			stats.domElement.style.top = '0px';
-			container.appendChild( stats.domElement );
+			container.appendChild( stats.dom );
 
 			window.addEventListener( 'resize', onWindowResize, false );
 

+ 1 - 3
examples/webgl_buffergeometry_instancing_billboards.html

@@ -172,9 +172,7 @@
 			//
 
 			stats = new Stats();
-			stats.domElement.style.position = 'absolute';
-			stats.domElement.style.top = '0px';
-			container.appendChild( stats.domElement );
+			container.appendChild( stats.dom );
 
 			window.addEventListener( 'resize', onWindowResize, false );
 

+ 1 - 3
examples/webgl_buffergeometry_instancing_dynamic.html

@@ -271,9 +271,7 @@
 			container.appendChild( renderer.domElement );
 
 			stats = new Stats();
-			stats.domElement.style.position = 'absolute';
-			stats.domElement.style.top = '0px';
-			container.appendChild( stats.domElement );
+			container.appendChild( stats.dom );
 
 			window.addEventListener( 'resize', onWindowResize, false );
 

+ 1 - 3
examples/webgl_buffergeometry_instancing_interleaved_dynamic.html

@@ -242,9 +242,7 @@
 		container.appendChild( renderer.domElement );
 
 		stats = new Stats();
-		stats.domElement.style.position = 'absolute';
-		stats.domElement.style.top = '0px';
-		container.appendChild( stats.domElement );
+		container.appendChild( stats.dom );
 
 		window.addEventListener( 'resize', onWindowResize, false );
 

+ 1 - 3
examples/webgl_buffergeometry_lines.html

@@ -115,9 +115,7 @@
 				//
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_buffergeometry_lines_indexed.html

@@ -207,9 +207,7 @@
 				//
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_buffergeometry_points.html

@@ -125,9 +125,7 @@
 				//
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_buffergeometry_rawshader.html

@@ -161,9 +161,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				window.addEventListener( 'resize', onWindowResize, false );
 

+ 1 - 3
examples/webgl_buffergeometry_selective_draw.html

@@ -109,9 +109,7 @@
 			scene.add( new THREE.AmbientLight( 0x444444 ) );
 
 			stats = new Stats();
-			stats.domElement.style.position = 'absolute';
-			stats.domElement.style.top = '40px';
-			document.body.appendChild( stats.domElement );
+			document.body.appendChild( stats.dom );
 
 			window.addEventListener( 'resize', onWindowResize, false );
 

+ 1 - 3
examples/webgl_buffergeometry_uint.html

@@ -217,9 +217,7 @@
 				//
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 6
examples/webgl_camera.html

@@ -29,11 +29,6 @@
 			}
 
 			b { color: lightgreen }
-
-			#stats { position: absolute; top:0; left: 0 }
-			#stats #fps { background: transparent !important }
-			#stats #fps #fpsText { color: #777 !important }
-			#stats #fps #fpsGraph { display: none }
 		</style>
 	</head>
 	<body>
@@ -155,7 +150,7 @@
 				//
 
 				stats = new Stats();
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_camera_cinematic.html

@@ -86,9 +86,7 @@
 				container.appendChild(renderer.domElement);
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 

+ 1 - 3
examples/webgl_camera_logarithmicdepthbuffer.html

@@ -31,8 +31,6 @@
 
 			b { color: lightgreen }
 
-			#stats { position: absolute; top:0; left: 0 }
-
 			.renderer_label {
 				position: absolute;
 				bottom: 1em;
@@ -148,7 +146,7 @@
 				} );
 
 				stats = new Stats();
-				container.appendChild(stats.domElement);
+				container.appendChild(stats.dom);
 
 				// Resize border allows the user to easily compare effects of logarithmic depth buffer over the whole scene
 				border = document.getElementById( 'renderer_border' );

+ 1 - 6
examples/webgl_clipping_advanced.html

@@ -10,11 +10,6 @@
 				background-color: #000000;
 				overflow: hidden;
 			}
-
-			#stats { position: absolute; top:0; left: 0 }
-			#stats #fps { background: transparent !important }
-			#stats #fps #fpsText { color: #777 !important }
-			#stats #fps #fpsGraph { display: none }
 		</style>
 	</head>
 	<body>
@@ -284,7 +279,7 @@
 				// Stats
 
 				stats = new Stats();
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				// Controls
 

+ 1 - 3
examples/webgl_custom_attributes.html

@@ -148,9 +148,7 @@
 			container.appendChild( renderer.domElement );
 
 			stats = new Stats();
-			stats.domElement.style.position = 'absolute';
-			stats.domElement.style.top = '0px';
-			container.appendChild( stats.domElement );
+			container.appendChild( stats.dom );
 
 			//
 

+ 1 - 3
examples/webgl_custom_attributes_lines.html

@@ -170,9 +170,7 @@
 			container.appendChild( renderer.domElement );
 
 			stats = new Stats();
-			stats.domElement.style.position = 'absolute';
-			stats.domElement.style.top = '0px';
-			container.appendChild( stats.domElement );
+			container.appendChild( stats.dom );
 
 			//
 

+ 1 - 3
examples/webgl_custom_attributes_points.html

@@ -169,9 +169,7 @@
 			container.appendChild( renderer.domElement );
 
 			stats = new Stats();
-			stats.domElement.style.position = 'absolute';
-			stats.domElement.style.top = '0px';
-			container.appendChild( stats.domElement );
+			container.appendChild( stats.dom );
 
 			//
 

+ 1 - 3
examples/webgl_custom_attributes_points2.html

@@ -170,9 +170,7 @@
 			container.appendChild( renderer.domElement );
 
 			stats = new Stats();
-			stats.domElement.style.position = 'absolute';
-			stats.domElement.style.top = '0px';
-			container.appendChild( stats.domElement );
+			container.appendChild( stats.dom );
 
 			//
 

+ 1 - 3
examples/webgl_custom_attributes_points3.html

@@ -241,9 +241,7 @@
 			container.appendChild( renderer.domElement );
 
 			stats = new Stats();
-			stats.domElement.style.position = 'absolute';
-			stats.domElement.style.top = '0px';
-			container.appendChild( stats.domElement );
+			container.appendChild( stats.dom );
 
 			//
 

+ 1 - 4
examples/webgl_effects_parallaxbarrier.html

@@ -215,10 +215,7 @@
 				if ( STATS_ENABLED ) {
 
 					stats = new Stats();
-					stats.domElement.style.position = 'absolute';
-					stats.domElement.style.top = '0px';
-					stats.domElement.style.zIndex = 100;
-					container.appendChild( stats.domElement );
+					container.appendChild( stats.dom );
 
 				}
 

+ 1 - 3
examples/webgl_geometries.html

@@ -134,9 +134,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_geometries2.html

@@ -157,9 +157,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_geometry_colors.html

@@ -178,9 +178,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 

+ 1 - 3
examples/webgl_geometry_colors_blender.html

@@ -81,9 +81,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 

+ 1 - 4
examples/webgl_geometry_colors_lookuptable.html

@@ -76,10 +76,7 @@
 				scene.add( camera );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.bottom = '0px';
-				stats.domElement.style.zIndex = 100;
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				// LIGHT
 				var ambientLight = new THREE.AmbientLight( 0x444444 );

+ 1 - 3
examples/webgl_geometry_convex.html

@@ -117,9 +117,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_geometry_dynamic.html

@@ -113,9 +113,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_geometry_extrude_shapes2.html

@@ -513,9 +513,7 @@ var initSVGObject = function() {
 	container.appendChild( renderer.domElement );
 
 	stats = new Stats();
-	stats.domElement.style.position = 'absolute';
-	stats.domElement.style.top = '0px';
-	container.appendChild( stats.domElement );
+	container.appendChild( stats.dom );
 
 	document.addEventListener( 'mousedown', onDocumentMouseDown, false );
 	document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/webgl_geometry_extrude_splines.html

@@ -230,9 +230,7 @@
 			container.appendChild( renderer.domElement );
 
 			stats = new Stats();
-			stats.domElement.style.position = 'absolute';
-			stats.domElement.style.top = '0px';
-			container.appendChild( stats.domElement );
+			container.appendChild( stats.dom );
 
 			renderer.domElement.addEventListener( 'mousedown', onDocumentMouseDown, false );
 			renderer.domElement.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 4
examples/webgl_geometry_hierarchy.html

@@ -81,10 +81,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				stats.domElement.style.zIndex = 100;
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 			//
 

+ 1 - 4
examples/webgl_geometry_hierarchy2.html

@@ -134,10 +134,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				stats.domElement.style.zIndex = 100;
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 4
examples/webgl_geometry_large_mesh.html

@@ -153,10 +153,7 @@
 
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				stats.domElement.style.zIndex = 100;
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				bcanvas.addEventListener( "click", toggleCanvas, false );
 				bwebgl.addEventListener( "click", toggleWebGL, false );

+ 1 - 3
examples/webgl_geometry_minecraft.html

@@ -205,9 +205,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_geometry_minecraft_ao.html

@@ -298,9 +298,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_geometry_normals.html

@@ -303,9 +303,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_geometry_nurbs.html

@@ -175,9 +175,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousedown', onDocumentMouseDown, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/webgl_geometry_shapes.html

@@ -354,9 +354,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousedown', onDocumentMouseDown, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/webgl_geometry_spline_editor.html

@@ -129,9 +129,7 @@
 				container.appendChild( options );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				// Controls
 				controls = new THREE.OrbitControls( camera, renderer.domElement );

+ 1 - 3
examples/webgl_geometry_terrain.html

@@ -109,9 +109,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_geometry_terrain_fog.html

@@ -111,9 +111,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 
 				//

+ 1 - 3
examples/webgl_geometry_terrain_raycast.html

@@ -125,9 +125,7 @@
 				container.addEventListener( 'mousemove', onMouseMove, false );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_geometry_text.html

@@ -212,9 +212,7 @@
 				// STATS
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				//container.appendChild( stats.domElement );
+				//container.appendChild( stats.dom );
 
 				// EVENTS
 

+ 1 - 3
examples/webgl_geometry_text_earcut.html

@@ -249,9 +249,7 @@
 				// STATS
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				//container.appendChild( stats.domElement );
+				//container.appendChild( stats.dom );
 
 				// EVENTS
 

+ 1 - 3
examples/webgl_geometry_text_pnltri.html

@@ -226,9 +226,7 @@
 				// STATS
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				//container.appendChild( stats.domElement );
+				//container.appendChild( stats.dom );
 
 				// EVENTS
 

+ 1 - 3
examples/webgl_gpgpu_birds.html

@@ -513,9 +513,7 @@
 				simulator.init();
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 				document.addEventListener( 'touchstart', onDocumentTouchStart, false );

+ 1 - 3
examples/webgl_hdr.html

@@ -154,9 +154,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_interactive_buffergeometry.html

@@ -221,9 +221,7 @@
 				//
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				//
 

+ 1 - 3
examples/webgl_interactive_cubes.html

@@ -83,9 +83,7 @@
 				container.appendChild(renderer.domElement);
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 

+ 1 - 3
examples/webgl_interactive_cubes_gpu.html

@@ -171,9 +171,7 @@
 				container.appendChild( renderer.domElement );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				renderer.domElement.addEventListener( 'mousemove', onMouseMove );
 

+ 1 - 3
examples/webgl_interactive_cubes_ortho.html

@@ -85,9 +85,7 @@
 				container.appendChild(renderer.domElement);
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 

+ 1 - 3
examples/webgl_interactive_draggablecubes.html

@@ -121,9 +121,7 @@
 				container.appendChild( info );
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				renderer.domElement.addEventListener( 'mousemove', onDocumentMouseMove, false );
 				renderer.domElement.addEventListener( 'mousedown', onDocumentMouseDown, false );

+ 1 - 3
examples/webgl_interactive_instances_gpu.html

@@ -945,9 +945,7 @@
 			// stats
 
 			stats = new Stats();
-			stats.domElement.style.position = 'absolute';
-			stats.domElement.style.top = '0px';
-			container.appendChild( stats.domElement );
+			container.appendChild( stats.dom );
 
 			// listeners
 

+ 1 - 3
examples/webgl_interactive_lines.html

@@ -129,9 +129,7 @@
 				container.appendChild(renderer.domElement);
 
 				stats = new Stats();
-				stats.domElement.style.position = 'absolute';
-				stats.domElement.style.top = '0px';
-				container.appendChild( stats.domElement );
+				container.appendChild( stats.dom );
 
 				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
 

部分文件因文件數量過多而無法顯示