浏览代码

Merge pull request #15042 from XanderLuciano/fix-trackball-html

[Examples] Prevent content overflow in some demos
Mr.doob 6 年之前
父节点
当前提交
8b5da8c4c4

+ 1 - 0
examples/misc_controls_deviceorientation.html

@@ -20,6 +20,7 @@
 				font-size:13px;
 				font-weight: bold;
 				text-align:center;
+				box-sizing: border-box;
 			}
 
 			a {

+ 4 - 1
examples/misc_controls_fly.html

@@ -23,6 +23,7 @@
 				top: 0px; width: 100%;
 				padding: 5px;
 				z-index:100;
+				box-sizing: border-box;
 			}
 
 			a {
@@ -30,7 +31,9 @@
 				color: #0080ff;
 			}
 
-			b { color:orange }
+			b {
+				color:orange
+			}
 		</style>
 
 		<script src="../build/three.js"></script>

+ 1 - 1
examples/misc_controls_map.html

@@ -22,7 +22,7 @@
 				position: absolute;
 				top: 0px; width: 100%;
 				padding: 5px;
-
+				box-sizing: border-box;
 			}
 
 			a {

+ 1 - 1
examples/misc_controls_orbit.html

@@ -22,7 +22,7 @@
 				position: absolute;
 				top: 0px; width: 100%;
 				padding: 5px;
-
+				box-sizing: border-box;
 			}
 
 			a {

+ 10 - 3
examples/misc_controls_trackball.html

@@ -5,6 +5,12 @@
 		<meta charset="utf-8">
 		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
 		<style>
+			html, body {
+				width: 100%;
+				height: 100%;
+				overflow: hidden;
+			}
+			
 			body {
 				color: #000;
 				font-family:Monospace;
@@ -14,7 +20,6 @@
 
 				background-color: #fff;
 				margin: 0px;
-				overflow: hidden;
 			}
 
 			#info {
@@ -22,7 +27,7 @@
 				position: absolute;
 				top: 0px; width: 100%;
 				padding: 5px;
-
+				box-sizing: border-box;
 			}
 
 			a {
@@ -149,14 +154,16 @@
 			function animate() {
 
 				requestAnimationFrame( animate );
+				
 				controls.update();
+				
+				stats.update();
 
 			}
 
 			function render() {
 
 				renderer.render( scene, camera );
-				stats.update();
 
 			}
 

+ 3 - 0
examples/misc_controls_transform.html

@@ -15,12 +15,15 @@
 				line-height: 30px;
 				overflow: hidden;
 			}
+			
 			#info {
 				position: absolute;
 				top: 0px; width: 100%;
 				padding: 15px;
 				z-index:100;
+				box-sizing: border-box;
 			}
+			
 			a {
 				color: white;
 			}