Explorar el Código

Examples: More clean up. (#21809)

Michael Herzog hace 4 años
padre
commit
9a3a23768e

+ 0 - 10
examples/misc_exporter_draco.html

@@ -5,16 +5,6 @@
 		<meta charset="utf-8">
 		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
 		<link type="text/css" rel="stylesheet" href="main.css">
-		<style>
-			body {
-				background-color: #a0a0a0;
-				color: #fff;
-			}
-
-			a {
-				color: #0f0;
-			}
-		</style>
 	</head>
 	<body>
 		<div id="info">

BIN
examples/screenshots/webgl_shaders_tonemapping.jpg


+ 1 - 18
examples/webgl2_multiple_rendertargets.html

@@ -4,24 +4,7 @@
 		<title>three.js webgl - Multiple Render Targets</title>
 		<meta charset="utf-8">
 		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
-		<style>
-			body {
-				font-family: Monospace;
-				background-color: #000;
-				color: #fff;
-				margin: 0px;
-				overflow: hidden;
-			}
-			#info {
-				color: #fff;
-				position: absolute;
-				top: 10px;
-				width: 100%;
-				text-align: center;
-				display:block;
-			}
-			#info a, .button { color: #f00; font-weight: bold; text-decoration: underline; cursor: pointer }
-		</style>
+		<link type="text/css" rel="stylesheet" href="main.css">
 
 		<!-- Write to G-Buffer -->
 		<script id="gbuffer-vert" type="x-shader/x-vertex">

+ 26 - 17
examples/webgl_shaders_tonemapping.html

@@ -6,11 +6,19 @@
 		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
 		<link type="text/css" rel="stylesheet" href="main.css">
 		<style>
-			.label {
-				background-color: black;
+			#labels {
 				position: absolute;
-				z-index: 100;
-				padding: 5px
+				display: grid;
+				grid-template-columns: 1fr 1fr 1fr;
+				justify-items: center;
+				align-items: end;
+				height: 100%;
+				width: 100%;
+			}
+			#labels > div {
+				background-color: black;
+				padding: 6px;
+				margin-bottom: 20%;
 			}
 		</style>
 	</head>
@@ -19,20 +27,21 @@
 		<div id="d">
 			<div id="info">
 				<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> webgl demo :
-				Earth diffuse and city lights by <a href="http://seanward.org" target="_blank" rel="noopener">Sean Ward</a> :
-
-			</div>
-			<div class="label" style="position: absolute;left: 10%;bottom: 10%;">
-				Low Dynamic Range<br/>
-				Static Tone Mapping
-			</div>
-			<div class="label" style="position: absolute;left: 40%;bottom: 10%;">
-				High Dynamic Range<br/>
-				Static Tone Mapping
+				Earth diffuse and city lights by <a href="http://seanward.org" target="_blank" rel="noopener">Sean Ward</a>
 			</div>
-			<div class="label" style="position: absolute;left: 73%;bottom: 10%;">
-				High Dynamic Range<br/>
-				Adaptive Tone Mapping
+			<div id="labels">
+				<div>
+					Low Dynamic Range<br/>
+					Static Tone Mapping
+				</div>
+				<div>
+					High Dynamic Range<br/>
+					Static Tone Mapping
+				</div>
+				<div>
+					High Dynamic Range<br/>
+					Adaptive Tone Mapping
+				</div>
 			</div>
 		</div>