Browse Source

Clean up.

Mr.doob 6 years ago
parent
commit
8277c26478
1 changed files with 24 additions and 22 deletions
  1. 24 22
      index.html

+ 24 - 22
index.html

@@ -353,36 +353,38 @@
 				<!-- <a href="http://helloracer.com/webgl/" target="_blank" rel="noopener"><img src="files/projects/helloracer.jpg" loading="lazy"/></a> -->
 			</div>
 
+		<!--
 		<script>
 
 			// I wish I could do this with CSS
 
 			var projects = document.getElementById( 'projects' );
 
-			// function resize() {
-			//
-			// 	var baseWidth = 200;
-			// 	var baseHeight = 150;
-			//
-			// 	var fullWidth = projects.clientWidth;
-			// 	var width = ( fullWidth / ( Math.ceil( fullWidth / baseWidth ) * baseWidth ) ) * baseWidth;
-			// 	var height = ( width / baseWidth ) * baseHeight;
-			//
-			// 	for ( var i = 0; i < projects.children.length; i ++ ) {
-			//
-			// 		var child = projects.children[ i ];
-			//
-			// 		child.style.width = width + 'px';
-			// 		child.style.height = height + 'px';
-			//
-			// 	}
-			//
-			// }
-
-			// window.addEventListener( 'resize', resize, false );
-			// resize();
+			function resize() {
+
+				var baseWidth = 200;
+				var baseHeight = 150;
+
+				var fullWidth = projects.clientWidth;
+				var width = ( fullWidth / ( Math.ceil( fullWidth / baseWidth ) * baseWidth ) ) * baseWidth;
+				var height = ( width / baseWidth ) * baseHeight;
+
+				for ( var i = 0; i < projects.children.length; i ++ ) {
+
+					var child = projects.children[ i ];
+
+					child.style.width = width + 'px';
+					child.style.height = height + 'px';
+
+				}
+
+			}
+
+			window.addEventListener( 'resize', resize, false );
+			resize();
 
 		</script>
+		-->
 
 		</div>