瀏覽代碼

Docs: Clean up.

linbingquan 5 年之前
父節點
當前提交
2ea220ba38
共有 4 個文件被更改,包括 33 次插入34 次删除
  1. 5 5
      docs/api/zh/geometries/DodecahedronGeometry.html
  2. 5 5
      docs/api/zh/geometries/OctahedronGeometry.html
  3. 22 23
      docs/index.html
  4. 1 1
      docs/page.js

+ 5 - 5
docs/api/zh/geometries/DodecahedronGeometry.html

@@ -22,13 +22,13 @@
 
 		// iOS iframe auto-resize workaround
 
-		if (/(iPad|iPhone|iPod)/g.test(navigator.userAgent)) {
+		if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
 
-			var scene = document.getElementById('scene');
+			var scene = document.getElementById( 'scene' );
 
-			scene.style.width = getComputedStyle(scene).width;
-			scene.style.height = getComputedStyle(scene).height;
-			scene.setAttribute('scrolling', 'no');
+			scene.style.width = getComputedStyle( scene ).width;
+			scene.style.height = getComputedStyle( scene ).height;
+			scene.setAttribute( 'scrolling', 'no' );
 
 		}
 

+ 5 - 5
docs/api/zh/geometries/OctahedronGeometry.html

@@ -22,13 +22,13 @@
 
 		// iOS iframe auto-resize workaround
 
-		if (/(iPad|iPhone|iPod)/g.test(navigator.userAgent)) {
+		if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
 
-			var scene = document.getElementById('scene');
+			var scene = document.getElementById( 'scene' );
 
-			scene.style.width = getComputedStyle(scene).width;
-			scene.style.height = getComputedStyle(scene).height;
-			scene.setAttribute('scrolling', 'no');
+			scene.style.width = getComputedStyle( scene ).width;
+			scene.style.height = getComputedStyle( scene ).height;
+			scene.setAttribute( 'scrolling', 'no' );
 
 		}
 

+ 22 - 23
docs/index.html

@@ -10,7 +10,7 @@
 		<script src="../build/three.min.js" async defer></script>
 	</head>
 	<body>
-		<div id="panel" class="">
+		<div id="panel">
 
 			<div id="header">
 				<h1><a href="http://threejs.org">three.js</a></h1>
@@ -103,7 +103,6 @@
 
 			var navigation;
 
-
 			// Functionality for hamburger button (on small devices)
 
 			expandButton.onclick = function ( event ) {
@@ -124,25 +123,27 @@
 			// Functionality for search/filter input field
 			filterInput.onfocus = function ( event ) {
 
-				panel.classList.add('searchFocused');
+				panel.classList.add( 'searchFocused' );
 
-			}
+			};
 
 			filterInput.onblur = function ( event ) {
 
-				if(filterInput.value === '') {
-					panel.classList.remove('searchFocused');
+				if ( filterInput.value === '' ) {
+
+					panel.classList.remove( 'searchFocused' );
+
 				}
 
-			}
+			};
 
-			exitSearchButton.onclick = function( event ) {
+			exitSearchButton.onclick = function ( event ) {
 
 				filterInput.value = '';
 				updateFilter();
-				panel.classList.remove('searchFocused');
+				panel.classList.remove( 'searchFocused' );
 
-			}
+			};
 
 			filterInput.oninput = function ( event ) {
 
@@ -181,7 +182,7 @@
 
 					} );
 
-					link.classList.add('selected');
+					link.classList.add( 'selected' );
 
 				} );
 
@@ -241,7 +242,7 @@
 							var listElement = document.createElement( 'li' );
 							categoryContent.appendChild( listElement );
 
-							var linkElement = createLink( pageName, pageURL )
+							var linkElement = createLink( pageName, pageURL );
 							listElement.appendChild( linkElement );
 
 							// Gather the main properties for the current subpage
@@ -253,9 +254,9 @@
 								linkElement: linkElement
 							};
 
-						// Gather the document titles (used for easy access on browser navigation)
+							// Gather the document titles (used for easy access on browser navigation)
 
-						titles[ pageURL ] = pageName;
+							titles[ pageURL ] = pageName;
 
 						}
 
@@ -282,7 +283,6 @@
 
 			}
 
-
 			// Filtering
 
 			function updateFilter() {
@@ -302,12 +302,14 @@
 
 						// Accentuate matching characters
 
-						for ( var i = 0; i < filterResults.length; i++ ) {
+						for ( var i = 0; i < filterResults.length; i ++ ) {
 
 							var result = filterResults[ i ];
 
 							if ( result !== '' ) {
+
 								pageName = pageName.replace( result, '<b>' + result + '</b>' );
+			
 							}
 
 						}
@@ -370,7 +372,6 @@
 
 			}
 
-
 			// Routing
 
 			function setUrlFragment( pageName ) {
@@ -414,7 +415,7 @@
 				oldIframe = iframe;
 				iframe = oldIframe.cloneNode();
 
-				if(hash) {
+				if ( hash ) {
 
 					iframe.src = splitHash[ 0 ] + '.html' + splitHash[ 1 ];
 					subtitle = titles[ splitHash[ 0 ] ] + splitHash[ 1 ] + ' – ';
@@ -429,7 +430,6 @@
 				document.body.replaceChild( iframe, oldIframe );
 				document.title = subtitle + 'three.js docs';
 
-
 			}
 
 			function decomposePageName( pageName, oldDelimiter, newDelimiter ) {
@@ -443,7 +443,7 @@
 
 				var dotIndex = pageName.indexOf( oldDelimiter );
 
-				if ( dotIndex !== -1 ) {
+				if ( dotIndex !== - 1 ) {
 
 					parts = pageName.split( oldDelimiter );
 					parts[ 1 ] = newDelimiter + parts[ 1 ];
@@ -461,7 +461,7 @@
 
 			//
 
-			console.log([
+			console.log( [
 				'    __     __',
 				' __/ __\\  / __\\__   ____   _____   _____',
 				'/ __/  /\\/ /  /___\\/ ____\\/ _____\\/ _____\\',
@@ -470,8 +470,7 @@
 				'\\/__/  \\/__/\\/__/\\/__/  \\/_____/\\/_____/\\/__/ /  / /  ___/',
 				'                                         / __/  /  \\__  \\',
 				'                                         \\/____/\\/_____/'
-			].join('\n'));
-
+			].join( '\n' ) );
 
 		</script>
 

+ 1 - 1
docs/page.js

@@ -1,4 +1,4 @@
-if ( !window.frameElement && window.location.protocol !== 'file:' ) {
+if ( ! window.frameElement && window.location.protocol !== 'file:' ) {
 
 	// If the page is not yet displayed as an iframe of the index page (navigation panel/working links),
 	// redirect to the index page (using the current URL without extension as the new fragment).