Преглед на файлове

Merge pull request #11078 from jostschmithals/docsIndexRefactoring

Docs: index.html refactored
Mr.doob преди 8 години
родител
ревизия
7e0d2b793d
променени са 5 файла, в които са добавени 941 реда и са изтрити 723 реда
  1. 205 0
      docs/index.css
  2. 326 325
      docs/index.html
  3. 373 391
      docs/list.js
  4. 8 4
      docs/page.css
  5. 29 3
      docs/page.js

+ 205 - 0
docs/index.css

@@ -0,0 +1,205 @@
+@font-face {
+	font-family: 'inconsolata';
+	src: url('files/inconsolata.woff') format('woff');
+	font-weight: normal;
+	font-style: normal;
+}
+
+*{
+	box-sizing: border-box;
+}
+
+html {
+	height: 100%;
+}
+
+body {
+	background-color: #ffffff;
+	margin: 0px;
+	height: 100%;
+	color: #555;
+	font-family: 'inconsolata';
+	font-size: 15px;
+	line-height: 18px;
+	overflow: hidden;
+}
+
+h1 {
+	margin-top: 30px;
+	margin-bottom: 40px;
+	margin-left: 20px;
+	font-size: 25px;
+	font-weight: normal;
+}
+
+h2 {
+	color: #454545;
+	font-size: 18px;
+	font-weight: normal;
+
+	margin-top: 20px;
+	margin-left: 20px;
+}
+
+h3 {
+	color: #666;
+	font-size: 16px;
+	font-weight: normal;
+
+	margin-top: 20px;
+	margin-left: 20px;
+}
+
+a {
+	color: #2194CE;
+	text-decoration: none;
+}
+
+#panel {
+	position: fixed;
+	left: 0px;
+	width: 260px;
+	height: 100%;
+	overflow: auto;
+	background: #fafafa;
+}
+
+#panel ul {
+	list-style-type: none;
+	padding: 0px;
+	margin-left: 20px;
+}
+
+iframe {
+	position: absolute;
+	border: 0px;
+	left: 260px;
+	width: calc(100% - 260px);
+	height: 100%;
+	overflow: auto;
+}
+
+.filterBlock{
+	margin: 20px;
+	position: relative;
+}
+
+.filterBlock p {
+	margin: 0;
+}
+
+#filterInput {
+	width: 100%;
+	padding: 5px;
+	font-family: inherit;
+	font-size: 15px;
+	outline: none;
+	border: 1px solid #dedede;
+}
+
+#filterInput:focus{
+	border: 1px solid #2194CE;
+}
+
+#clearFilterButton {
+	position: absolute;
+	right: 6px;
+	top: 50%;
+	margin-top: -8px;
+	width: 16px;
+	height: 16px;
+	font-size: 14px;
+	color: grey;
+	text-align: center;
+	line-height: 0;
+	padding-top: 7px;
+	opacity: .5;
+}
+
+#clearFilterButton:hover {
+	opacity: 1;
+}
+
+.hidden {
+	display: none;
+}
+
+#panel li b {
+	font-weight: bold;
+}
+
+/* mobile */
+
+#expandButton {
+	display: none;
+	position: absolute;
+	right: 20px;
+	top: 12px;
+	width: 32px;
+	height: 32px;
+}
+
+#expandButton span {
+	height: 2px;
+	background-color: #2194CE;
+	width: 16px;
+	position: absolute;
+	left: 8px;
+	top: 10px;
+}
+
+#expandButton span:nth-child(1) {
+	top: 16px;
+}
+
+#expandButton span:nth-child(2) {
+	top: 22px;
+}
+
+@media all and ( max-width: 640px ) {
+
+	h1{
+		margin-top: 20px;
+		margin-bottom: 20px;
+	}
+
+	#panel{
+		position: absolute;
+		left: 0;
+		top: 0;
+		height: 480px;
+		width: 100%;
+		right: 0;
+		z-index: 100;
+		overflow: hidden;
+		border-bottom: 1px solid #dedede;
+	}
+
+	#navigation{
+		position: absolute;
+		left: 0;
+		top: 90px;
+		right: 0;
+		bottom: 0;
+		font-size: 17px;
+		line-height: 22px;
+		overflow: auto;
+	}
+
+	iframe{
+		position: absolute;
+		left: 0;
+		top: 56px;
+		width: 100%;
+		height: calc(100% - 56px);
+	}
+
+	#expandButton{
+		display: block;
+	}
+
+	#panel.collapsed{
+		height: 56px;
+	}
+
+}

+ 326 - 325
docs/index.html

@@ -4,424 +4,424 @@
 		<meta charset="utf-8">
 		<title>three.js / documentation</title>
 		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
-		<style>
+		<link type="text/css" rel="stylesheet" href="index.css">
+	</head>
+	<body>
 
-			@font-face {
-				font-family: 'inconsolata';
-				src: url('files/inconsolata.woff') format('woff');
-				font-weight: normal;
-				font-style: normal;
-			}
+		<div id="panel" class="collapsed">
 
-			*{
-				box-sizing: border-box;
-			}
+			<h1><a href="http://threejs.org">three.js</a> / docs</h1>
 
-			html {
-				height: 100%;
-			}
+			<a id="expandButton" href="#">
+				<span></span>
+				<span></span>
+				<span></span>
+			</a>
 
-			body {
-				background-color: #ffffff;
-				margin: 0px;
-				height: 100%;
-				color: #555;
-				font-family: 'inconsolata';
-				font-size: 15px;
-				line-height: 18px;
-				overflow: hidden;
-			}
+			<div class="filterBlock" >
+				<input type="text" id="filterInput" placeholder="Type to filter">
+				<a href="#" id="clearFilterButton">x</a>
+			</div>
 
-				h1 {
-					margin-top: 30px;
-					margin-bottom: 40px;
-					margin-left: 20px;
-					font-size: 25px;
-					font-weight: normal;
-				}
+		</div>
 
-				h2 {
-					color: #454545;
-					font-size: 18px;
-					font-weight: normal;
+		<iframe></iframe>
 
-					margin-top: 20px;
-					margin-left: 20px;
-				}
+		<script src="list.js"></script>
 
-				h3 {
-					color: #666;
-					font-size: 16px;
-					font-weight: normal;
+		<script>
 
-					margin-top: 20px;
-					margin-left: 20px;
-				}
+			var panel = document.getElementById( 'panel' );
+			var clearFilterButton = document.getElementById( 'clearFilterButton' );
+			var expandButton = document.getElementById( 'expandButton' );
+			var filterInput = document.getElementById( 'filterInput' );
+			var iframe = document.querySelector( 'iframe' );
 
-			a {
-				color: #2194CE;
-				text-decoration: none;
-			}
+			var pageProperties = {};
+			var titles = {};
+			var categoryElements = [];
 
-			#panel {
-				position: fixed;
-				left: 0px;
-				width: 260px;
-				height: 100%;
-				overflow: auto;
-				background: #fafafa;
-			}
 
-				#panel ul {
-					list-style-type: none;
-					padding: 0px;
-					margin-left: 20px;
-				}
+// ----------------------------------------------------------------------------
+// Initialization
+// ----------------------------------------------------------------------------
 
-			#viewer {
-				position: absolute;
-				border: 0px;
-				left: 260px;
-				width: calc(100% - 260px);
-				height: 100%;
-				overflow: auto;
-			}
 
-			.filterBlock{
-				margin: 20px;
-				position: relative;
-			}
-			.filterBlock p {
-				margin: 0;
-			}
+			// Functionality for hamburger button (on small devices)
 
-			#filterInput {
-				width: 100%;
-				padding: 5px;
-				font-family: inherit;
-				font-size: 15px;
-				outline: none;
-				border: 1px solid #dedede;
-			}
+			expandButton.onclick = function ( event ) {
 
-			#filterInput:focus{
-				border: 1px solid #2194CE;
-			}
+				event.preventDefault();
+				panel.classList.toggle( 'collapsed' );
 
-			#clearFilterButton {
-				position: absolute;
-				right: 6px;
-				top: 50%;
-				margin-top: -8px;
-				width: 16px;
-				height: 16px;
-				font-size: 14px;
-				color: grey;
-				text-align: center;
-				line-height: 0;
-				padding-top: 7px;
-				opacity: .5;
-			}
+			};
 
-			#clearFilterButton:hover {
-				opacity: 1;
-			}
 
-			.filtered {
-				display: none;
-			}
+			// Functionality for search/filter input field
 
-			#panel li b {
-				font-weight: bold;
-			}
+			filterInput.oninput = function ( event ) {
 
-			/* mobile */
+				updateFilter();
 
-			#expandButton {
-				display: none;
-				position: absolute;
-				right: 20px;
-				top: 12px;
-				width: 32px;
-				height: 32px;
-			}
+			};
 
-				#expandButton span {
-					height: 2px;
-					background-color: #2194CE;
-					width: 16px;
-					position: absolute;
-					left: 8px;
-					top: 10px;
-				}
 
-				#expandButton span:nth-child(1) {
-					top: 16px;
-				}
+			// Functionality for filter clear button
 
-				#expandButton span:nth-child(2) {
-					top: 22px;
-				}
+			clearFilterButton.onclick = function ( event ) {
 
-			@media all and ( max-width: 640px ) {
-				h1{
-					margin-top: 20px;
-					margin-bottom: 20px;
-				}
-				#panel{
-					position: absolute;
-					left: 0;
-					top: 0;
-					height: 480px;
-					width: 100%;
-					right: 0;
-					z-index: 100;
-					overflow: hidden;
-					border-bottom: 1px solid #dedede;
-				}
-				#content{
-					position: absolute;
-					left: 0;
-					top: 90px;
-					right: 0;
-					bottom: 0;
-					font-size: 17px;
-					line-height: 22px;
-					overflow: auto;
-				}
-				#viewer{
-					position: absolute;
-					left: 0;
-					top: 56px;
-					width: 100%;
-					height: calc(100% - 56px);
-				}
-				#expandButton{
-					display: block;
-				}
-				#panel.collapsed{
-					height: 56px;
-				}
-			}
-		</style>
-	</head>
-	<body>
+				event.preventDefault();
 
-		<div id="panel" class="collapsed">
-			<h1><a href="http://threejs.org">three.js</a> / docs</h1>
-			<a id="expandButton" href="#">
-				<span></span>
-				<span></span>
-				<span></span>
-			</a>
-			<div class="filterBlock" >
-				<input type="text" id="filterInput" placeholder="Type to filter"/>
-				<a href="#" id="clearFilterButton" >x</a>
-			</div>
-			<div id="content"></div>
-		</div>
-		<iframe id="viewer"></iframe>
+				filterInput.value = '';
+				updateFilter();
 
-		<script src="list.js"></script>
-		<script>
+			};
 
-			function extractQuery() {
-				var p = window.location.search.indexOf( '?q=' );
-				if( p !== -1 ) {
-					return window.location.search.substr( 3 );
-				}
-				return ''
-			}
 
-			var panel = document.getElementById( 'panel' );
-			var viewer = document.getElementById( 'viewer' );
+			// Activate content and title change on browser navigation
 
-			var expandButton = document.getElementById( 'expandButton' );
-			expandButton.addEventListener( 'click', function ( event ) {
-				panel.classList.toggle( 'collapsed' );
-				event.preventDefault();
-			} );
+			window.onpopstate = createNewIframe;
 
-			var filterInput = document.getElementById( 'filterInput' );
-			var clearFilterButton = document.getElementById( 'clearFilterButton' );
 
-			var DELIMITER = '/';
-			var MEMBER_DELIMITER = '.';
-			var nameCategoryMap = {};
-			var sections = [];
+			// Create the navigation panel and configure the iframe
 
-			var content = document.getElementById( 'content' );
+			createNavigation();
+			createNewIframe();
 
-			for ( var section in list ) {
 
-				var h2 = document.createElement( 'h2' );
-				h2.textContent = section;
+// ----------------------------------------------------------------------------
+// Navigation Panel
+// ----------------------------------------------------------------------------
 
-				content.appendChild( h2 );
 
-				for ( var category in list[ section ] ) {
+			function createNavigation () {
 
-					var div = document.createElement( 'div' );
+				// Create the navigation panel using data from list.js
 
-					var h3 = document.createElement( 'h3' );
-					h3.textContent = category;
+				var navigation = createAndAppendDOMElement( { type: 'div', parent: panel } );
 
-					div.appendChild( h3 );
+				for ( var section in list ) {
 
-					var ul = document.createElement( 'ul' );
-					div.appendChild( ul );
+					// Create sections
 
-					for ( var i = 0; i < list[ section ][ category ].length; i ++ ) {
+					var categories = list[ section ];
 
-						var page = list[ section ][ category ][ i ];
+					var sectionHead = createAndAppendDOMElement( { type: 'h2', parent: navigation, content: section } )
 
-						var li = document.createElement( 'li' );
-						var a = document.createElement( 'a' );
-						a.setAttribute( 'href', '#' );
-						( function( s, c, p ) {
-							a.addEventListener( 'click', function( e ) {
-								goTo( s, c, p );
-								e.preventDefault();
-							} )
-						} )( section, category, page[ 0 ] );
-						a.textContent = page[ 0 ];
-						li.appendChild( a );
-						ul.appendChild( li );
+					for ( var category in categories ) {
 
-						nameCategoryMap[page[0]] = {
-							section: section,
-							category: category,
-							name: page[0],
-							element: a
-						};
+						// Create categories
 
-					}
+						var pages = categories[ category ];
 
-					content.appendChild( div );
-					sections.push( ul );
+						var categoryContainer = createAndAppendDOMElement( { type: 'div', parent: navigation } );
+						var categoryHead = createAndAppendDOMElement( { type: 'h3', parent: categoryContainer, content: category } );
+						var categoryContent = createAndAppendDOMElement( { type: 'ul', parent: categoryContainer } );
 
-				}
+						for ( var pageName in pages ) {
 
+							// Create page links
 
-			}
+							var pageURL = pages[ pageName ];
+
+							var listElement = createAndAppendDOMElement( { type: 'li', parent: categoryContent } );
+							var linkElement = createAndAppendDOMElement( { type: 'a', parent: listElement, content: pageName } );
 
-			panel.appendChild( content );
+							// The href attribute is only used for the option to create a new tab by right click
 
-			function layoutList() {
+							linkElement.setAttribute( 'href', '#' + pageURL );
+
+							addClickHandlers( linkElement, pageURL );
+
+							// Gather the main properties for the current subpage
+
+							pageProperties[ pageName ] = {
+								section: section,
+								category: category,
+								pageURL: pageURL,
+								linkElement: linkElement
+							};
+
+						// Gather the document titles (used for easy access on browser navigation)
+
+						titles[ pageURL ] = pageName;
 
-				sections.forEach( function( el ) {
-					var collapsed = true;
-					Array.prototype.slice.apply( el.children ).forEach( function( item ) {
-						if( !item.classList.contains( 'filtered' ) ) {
-							collapsed = false;
 						}
-					} );
-					if( collapsed ) {
-						el.parentElement.classList.add( 'filtered' );
-					} else {
-						el.parentElement.classList.remove( 'filtered' );
+
+						// Gather the category elements for easy access on filtering
+
+						categoryElements.push( categoryContent );
+
 					}
-				} );
+
+				}
+
+			};
+
+
+			function createAndAppendDOMElement( properties ) {
+
+				// Helper function for creating and appending new DOM elements
+
+				var newElement = document.createElement( properties.type );
+
+				properties.parent.appendChild( newElement );
+
+				if ( properties.content ) {
+
+					newElement.textContent = properties.content;
+
+				}
+
+				return newElement;
+
 			}
 
-			filterInput.addEventListener( 'input', function( e ) {
-				updateFilter();
-			} );
 
-			clearFilterButton.addEventListener( 'click', function( e ) {
-				filterInput.value = '';
-				updateFilter();
-				e.preventDefault();
-			} );
+			function addClickHandlers ( linkElement, pageURL ) {
+
+				// Helper function for adding ClickHandlers to the page links
+
+				linkElement.onclick = function ( event ) {
+
+					event.preventDefault();
+
+					window.location.hash = pageURL;
+					createNewIframe();
+
+					panel.classList.add( 'collapsed' );
+
+				};
+
+			};
+
+
+// ----------------------------------------------------------------------------
+// Query Strings (optional)
+// ----------------------------------------------------------------------------
+
+
+//			(uncomment the following lines and the first line in updateFilter(), if you want query strings):
+
+//			filterInput.value = extractFromQueryString();
+//			updateFilter();
+//
+//
+//			function extractFromQueryString() {
+//
+//				var queryString = window.location.search;
+//
+//				if ( queryString.indexOf( '?q=' ) === -1 ) return '';
+//
+//				return queryString.substr( 3 );
+//
+//			}
+//
+//			function updateQueryString() {
+//
+//				var searchString = filterInput.value;
+//				var query = '';
+//
+//				if (searchString !== '') {
+//
+//					query = '?q=' + searchString;
+//
+//				}
+//
+//				window.history.replaceState( {} , '', window.location.pathname + query + window.location.hash ); 
+//
+//			}
+
+
+// ----------------------------------------------------------------------------
+// Filtering
+// ----------------------------------------------------------------------------
+
 
 			function updateFilter() {
 
-				var v = filterInput.value;
-				if( v !== '' ) {
-					window.history.replaceState( {} , '', '?q=' + v + window.location.hash );
-				} else {
-					window.history.replaceState( {} , '', window.location.pathname + window.location.hash );
-				}
+//			(uncomment the following line and the "Query strings" section, if you want query strings):
+//			updateQueryString();
+
+				var regExp = new RegExp( filterInput.value, 'gi' );
+
+				for ( var pageName in pageProperties ) {
+
+					var linkElement = pageProperties[ pageName ].linkElement;
+					var categoryClassList = linkElement.parentElement.classList;
+					var filterResults = pageName.match( regExp );
+
+					if ( filterResults && filterResults.length > 0 ) {
+
+						// Accentuate matching characters
 
-				var exp = new RegExp( filterInput.value, 'gi' );
-				for( var j in nameCategoryMap ) {
-					var res = nameCategoryMap[ j ].name.match( exp );
-					if( res && res.length > 0 ) {
-						nameCategoryMap[ j ].element.parentElement.classList.remove( 'filtered' );
-						var str = nameCategoryMap[ j ].name;
-						for( var i = 0; i < res.length; i++ ) {
-							var resI = res[ i ];
-							if ( resI !== '' ) {
-							    str = str.replace( resI, '<b>' + resI + '</b>' );
+						for ( var i = 0; i < filterResults.length; i++ ) {
+
+							var result = filterResults[ i ];
+
+							if ( result !== '' ) {
+								pageName = pageName.replace( result, '<b>' + result + '</b>' );
 							}
+
 						}
-						nameCategoryMap[ j ].element.innerHTML = str;
+
+						categoryClassList.remove( 'hidden' );
+						linkElement.innerHTML = pageName;
+
 					} else {
-						nameCategoryMap[ j ].element.parentElement.classList.add( 'filtered' );
-						nameCategoryMap[ j ].element.textContent = nameCategoryMap[ j ].name;
+
+						// Hide all non-matching page names
+
+						categoryClassList.add( 'hidden' );
+
 					}
+
 				}
-				layoutList();
+
+				displayFilteredPanel();
 
 			}
 
-			function encodeUrl( path ) {
 
-				return path.replace(/\ \/\ /g, '.').replace(/\ /g, '_');
+			function displayFilteredPanel() {
 
-			}
+				// Show/hide categories depending on their content
+				// First check if at least one page in this category is not hidden
 
-			function decodeUrl( path ) {
+				categoryElements.forEach( function ( category ) {
 
-				return path.replace(/_/g, ' ').replace(/\./g, ' / ');
+					var pages = category.children;
+					var pagesLength = pages.length;
+					var sectionClassList = category.parentElement.classList;
 
-			}
+					var hideCategory = true;
 
-			// Page loading
+					for ( var i = 0; i < pagesLength; i ++ ) {
 
-			function goTo( section, category, name, member ) {
-				var parts, location;
+						var pageClassList = pages[ i ].classList;
 
-				// Fully resolve links that only provide a name
-				if(arguments.length == 1) {
+						if ( ! pageClassList.contains( 'hidden' ) ) {
+
+							hideCategory = false;
+
+						}
 
-					// Resolve links of the form 'Class.member'
-					if(section.indexOf(MEMBER_DELIMITER) !== -1) {
-						parts = section.split(MEMBER_DELIMITER);
-						section = parts[0];
-						member = parts[1];
 					}
 
-					location = nameCategoryMap[section];
-					if (!location) return;
-					section = location.section;
-					category = location.category;
-					name = location.name;
+					// If and only if all page names are hidden, hide the whole category
+
+					if ( hideCategory ) {
+
+						sectionClassList.add( 'hidden' );
+
+					} else {
+
+						sectionClassList.remove( 'hidden' );
+
+					}
+
+				} );
+
+			}
+
+
+// ----------------------------------------------------------------------------
+// Routing
+// ----------------------------------------------------------------------------
+
+
+			function setUrlFragment( pageName ) {
+
+				// Handle navigation from the subpages (iframes):
+				// First separate the memeber (if existing) from the page name,
+				// then identify the subpage's URL and set it as URL fragment (re-adding the member)
+
+				var splitPageName = decomposePageName( pageName, '.', '.' );
+
+				var currentProperties = pageProperties[ splitPageName[ 0 ] ];
+
+				if ( currentProperties ) {
+
+					window.location.hash = currentProperties.pageURL + splitPageName[ 1 ];
+
+					createNewIframe();
+
 				}
 
-				var title = 'three.js - documentation - ' + section + ' - ' + name;
-				var url = encodeUrl(section) + DELIMITER + encodeUrl( category ) + DELIMITER + encodeUrl(name) + (!!member ? MEMBER_DELIMITER + encodeUrl(member) : '');
+			}
+
+
+			function createNewIframe() {
+
+				// Change the content displayed in the iframe
+				// First separate the member part of the fragment (if existing)
+
+				var hash = window.location.hash.substring( 1 );
+				var splitHash = decomposePageName( hash, '.', '#' );
 
-				window.location.hash = url;
-				window.document.title = title;
+				// Creating a new Iframe instead of assigning a new src is
+				// a cross-browser solution to allow normal browser navigation;
+				// - only assigning a new src would result in two history states each time.
 
-				viewer.src = pages[ section ][ category ][ name ] + '.html' + (!!member ? '#'+member : '');
+				// Note: iframe.contentWindow.location.replace(hash) should work, too,
+				// but it doesn't work in Edge with links from the subpages!
 
-				panel.classList.add( 'collapsed' );
+				var oldIframe;
+				var subtitle;
+
+				oldIframe = iframe;
+				iframe = oldIframe.cloneNode();
+
+				if(hash) {
+
+					iframe.src = splitHash[ 0 ] + '.html' + splitHash[ 1 ];
+					subtitle = ' - ' + titles[ splitHash[ 0 ] ] + splitHash[ 1 ];
+
+				} else {
+
+					iframe.src = '';
+					subtitle = '';
+
+				}
+
+				document.body.replaceChild( iframe, oldIframe );
+				document.title = 'three.js docs' + subtitle;
 
 			}
 
-			function goToHash() {
 
-				var hash = window.location.hash.substring( 1 ).split(DELIMITER);
-				var member = hash[2].split(MEMBER_DELIMITER);
-				goTo( decodeUrl(hash[0]), decodeUrl(hash[1]), decodeUrl(member[0]), decodeUrl(member.length > 1 ? member[1] : '') );
+			function decomposePageName ( pageName, oldDelimiter, newDelimiter ) {
+
+				// Helper function for separating the member (if existing) from the pageName
+				// For example: 'Geometry.morphTarget' can be converted to 
+				// ['Geometry', '.morphTarget'] or ['Geometry', '#morphTarget']
+				// Note: According RFC 3986 no '#' allowed inside of an URL fragment!
+
+				var parts = [];
+
+				var dotIndex = pageName.indexOf( oldDelimiter );
+
+				if ( dotIndex !== -1 ) {
+
+					parts = pageName.split( oldDelimiter );
+					parts[ 1 ] = newDelimiter + parts[ 1 ];
+
+				} else {
+
+					parts[ 0 ] = pageName;
+					parts[ 1 ] = '';
+
+				}
+
+				return parts;
 
 			}
 
-			window.addEventListener( 'hashchange', goToHash, false );
 
-			if ( window.location.hash.length > 0 ) goToHash();
+// ----------------------------------------------------------------------------
+// ASCII Art ;-)
+// ----------------------------------------------------------------------------
+
 
 			console.log([
 				'    __     __',
@@ -434,10 +434,11 @@
 				'                                         \\/____/\\/_____/'
 			].join('\n'));
 
-			filterInput.value = extractQuery();
-			updateFilter( )
 
 		</script>
+
 		<script src="../build/three.min.js"></script> <!-- console sandbox -->
+
 	</body>
+
 </html>

+ 373 - 391
docs/list.js

@@ -1,413 +1,395 @@
 var list = {
 
 	"Manual": {
-		"Getting Started": [
-			[ "Creating a scene", "manual/introduction/Creating-a-scene" ],
-			[ "Detecting WebGL and browser compatibility", "manual/introduction/Detecting-WebGL-and-browser-compatibility" ],
-			[ "How to run things locally", "manual/introduction/How-to-run-thing-locally" ],
-			[ "Drawing Lines", "manual/introduction/Drawing-lines" ],
-			[ "Creating Text", "manual/introduction/Creating-text" ],
-			[ "Migration Guide", "manual/introduction/Migration-guide" ],
-			[ "Code Style Guide", "manual/introduction/Code-style-guide" ],
-			[ "FAQ", "manual/introduction/FAQ" ],
-			[ "Useful links", "manual/introduction/Useful-links" ]
-		],
-
-		"Next Steps": [
-			[ "How to update things", "manual/introduction/How-to-update-things" ],
-			[ "Matrix transformations", "manual/introduction/Matrix-transformations" ],
-            [ "Animation System", "manual/introduction/Animation-system" ]
-		],
-
-		"Build Tools": [
-			[ "Testing with NPM", "manual/buildTools/Testing-with-NPM" ]
-		]
+
+		"Getting Started": {
+			"Creating a scene": "manual/introduction/Creating-a-scene",
+			"Detecting WebGL and browser compatibility": "manual/introduction/Detecting-WebGL-and-browser-compatibility",
+			"How to run things locally": "manual/introduction/How-to-run-thing-locally",
+			"Drawing Lines": "manual/introduction/Drawing-lines",
+			"Creating Text": "manual/introduction/Creating-text",
+			"Migration Guide": "manual/introduction/Migration-guide",
+			"Code Style Guide": "manual/introduction/Code-style-guide",
+			"FAQ": "manual/introduction/FAQ",
+			"Useful links": "manual/introduction/Useful-links"
+		},
+
+		"Next Steps": {
+			"How to update things": "manual/introduction/How-to-update-things",
+			"Matrix transformations": "manual/introduction/Matrix-transformations",
+			"Animation System": "manual/introduction/Animation-system"
+		},
+
+		"Build Tools": {
+			"Testing with NPM": "manual/buildTools/Testing-with-NPM"
+		}
+
 	},
 
 	"Reference": {
 
-		"Animation": [
-			[ "AnimationAction", "api/animation/AnimationAction" ],
-			[ "AnimationClip", "api/animation/AnimationClip" ],
-			[ "AnimationMixer", "api/animation/AnimationMixer" ],
-			[ "AnimationObjectGroup", "api/animation/AnimationObjectGroup" ],
-			[ "AnimationUtils", "api/animation/AnimationUtils" ],
-			[ "KeyframeTrack", "api/animation/KeyframeTrack" ],
-			[ "PropertyBinding", "api/animation/PropertyBinding" ],
-			[ "PropertyMixer", "api/animation/PropertyMixer" ]
-		],
-
-		"Animation / Tracks": [
-		  [ "BooleanKeyframeTrack", "api/animation/tracks/BooleanKeyframeTrack" ],
-		  [ "ColorKeyframeTrack", "api/animation/tracks/ColorKeyframeTrack" ],
-		  [ "NumberKeyframeTrack", "api/animation/tracks/NumberKeyframeTrack" ],
-		  [ "QuaternionKeyframeTrack", "api/animation/tracks/QuaternionKeyframeTrack" ],
-		  [ "StringKeyframeTrack", "api/animation/tracks/StringKeyframeTrack" ],
-		  [ "VectorKeyframeTrack", "api/animation/tracks/VectorKeyframeTrack" ]
-		],
-
-		"Audio": [
-			[ "Audio", "api/audio/Audio" ],
-			[ "AudioAnalyser", "api/audio/AudioAnalyser" ],
-			[ "AudioContext", "api/audio/AudioContext" ],
-			[ "AudioListener", "api/audio/AudioListener" ],
-			[ "PositionalAudio", "api/audio/PositionalAudio" ]
-		],
-
-		"Cameras": [
-			[ "Camera", "api/cameras/Camera" ],
-			[ "CubeCamera", "api/cameras/CubeCamera" ],
-			[ "OrthographicCamera", "api/cameras/OrthographicCamera" ],
-			[ "PerspectiveCamera", "api/cameras/PerspectiveCamera" ],
-			[ "StereoCamera", "api/cameras/StereoCamera" ]
-		],
-
-		"Constants": [
-			[ "Animation", "api/constants/Animation" ],
-			[ "Core", "api/constants/Core" ],
-			[ "CustomBlendingEquation", "api/constants/CustomBlendingEquations" ],
-			[ "DrawModes", "api/constants/DrawModes" ],
-			[ "Materials", "api/constants/Materials" ],
-			[ "Renderer", "api/constants/Renderer" ],
-			[ "Textures", "api/constants/Textures" ]
-		],
-
-		"Core": [
-			[ "BufferAttribute", "api/core/BufferAttribute" ],
-			[ "BufferGeometry", "api/core/BufferGeometry" ],
-			[ "Clock", "api/core/Clock" ],
-			[ "DirectGeometry", "api/core/DirectGeometry" ],
-			[ "EventDispatcher", "api/core/EventDispatcher" ],
-			[ "Face3", "api/core/Face3" ],
-			[ "Geometry", "api/core/Geometry" ],
-			[ "InstancedBufferAttribute", "api/core/InstancedBufferAttribute" ],
-			[ "InstancedBufferGeometry", "api/core/InstancedBufferGeometry" ],
-			[ "InstancedInterleavedBuffer", "api/core/InstancedInterleavedBuffer" ],
-			[ "InterleavedBuffer", "api/core/InterleavedBuffer" ],
-			[ "InterleavedBufferAttribute", "api/core/InterleavedBufferAttribute" ],
-			[ "Layers", "api/core/Layers" ],
-			[ "Object3D", "api/core/Object3D" ],
-			[ "Raycaster", "api/core/Raycaster" ],
-			[ "Uniform", "api/core/Uniform" ]
-		],
-
-		"Core / BufferAttributes": [
-			[ "BufferAttribute Types", "api/core/bufferAttributeTypes/BufferAttributeTypes" ]
-		],
-
-		"Deprecated": [
-			[ "DeprecatedList", "api/deprecated/DeprecatedList" ]
-		],
-
-		"Extras": [
-			[ "CurveUtils", "api/extras/CurveUtils" ],
-			[ "SceneUtils", "api/extras/SceneUtils" ],
-			[ "ShapeUtils", "api/extras/ShapeUtils" ]
-		],
-
-		"Extras / Core": [
-			[ "Curve", "api/extras/core/Curve" ],
-			[ "CurvePath", "api/extras/core/CurvePath" ],
-			[ "Font", "api/extras/core/Font" ],
-			[ "Path", "api/extras/core/Path" ],
-			[ "Shape", "api/extras/core/Shape" ],
-			[ "ShapePath", "api/extras/core/ShapePath" ]
-		],
-
-		"Extras / Curves": [
-			[ "ArcCurve", "api/extras/curves/ArcCurve" ],
-			[ "CatmullRomCurve3", "api/extras/curves/CatmullRomCurve3" ],
-			[ "CubicBezierCurve", "api/extras/curves/CubicBezierCurve" ],
-			[ "CubicBezierCurve3", "api/extras/curves/CubicBezierCurve3" ],
-			[ "EllipseCurve", "api/extras/curves/EllipseCurve" ],
-			[ "LineCurve", "api/extras/curves/LineCurve" ],
-			[ "LineCurve3", "api/extras/curves/LineCurve3" ],
-			[ "QuadraticBezierCurve", "api/extras/curves/QuadraticBezierCurve" ],
-			[ "QuadraticBezierCurve3", "api/extras/curves/QuadraticBezierCurve3" ],
-			[ "SplineCurve", "api/extras/curves/SplineCurve" ]
-		],
-
-		"Extras / Objects": [
-			[ "ImmediateRenderObject", "api/extras/objects/ImmediateRenderObject" ],
-			[ "MorphBlendMesh", "api/extras/objects/MorphBlendMesh" ]
-		],
-
-		"Geometries": [
-			[ "BoxBufferGeometry", "api/geometries/BoxBufferGeometry" ],
-			[ "BoxGeometry", "api/geometries/BoxGeometry" ],
-			[ "CircleBufferGeometry", "api/geometries/CircleBufferGeometry" ],
-			[ "CircleGeometry", "api/geometries/CircleGeometry" ],
-			[ "ConeBufferGeometry", "api/geometries/ConeBufferGeometry" ],
-			[ "ConeGeometry", "api/geometries/ConeGeometry" ],
-			[ "CylinderBufferGeometry", "api/geometries/CylinderBufferGeometry" ],
-			[ "CylinderGeometry", "api/geometries/CylinderGeometry" ],
-			[ "DodecahedronBufferGeometry", "api/geometries/DodecahedronBufferGeometry" ],
-			[ "DodecahedronGeometry", "api/geometries/DodecahedronGeometry" ],
-			[ "EdgesGeometry", "api/geometries/EdgesGeometry" ],
-			[ "ExtrudeGeometry", "api/geometries/ExtrudeGeometry" ],
-			[ "ExtrudeBufferGeometry", "api/geometries/ExtrudeBufferGeometry" ],
-			[ "IcosahedronBufferGeometry", "api/geometries/IcosahedronBufferGeometry" ],
-			[ "IcosahedronGeometry", "api/geometries/IcosahedronGeometry" ],
-			[ "LatheBufferGeometry", "api/geometries/LatheBufferGeometry" ],
-			[ "LatheGeometry", "api/geometries/LatheGeometry" ],
-			[ "OctahedronBufferGeometry", "api/geometries/OctahedronBufferGeometry" ],
-			[ "OctahedronGeometry", "api/geometries/OctahedronGeometry" ],
-			[ "ParametricBufferGeometry", "api/geometries/ParametricBufferGeometry" ],
-			[ "ParametricGeometry", "api/geometries/ParametricGeometry" ],
-			[ "PlaneBufferGeometry", "api/geometries/PlaneBufferGeometry" ],
-			[ "PlaneGeometry", "api/geometries/PlaneGeometry" ],
-			[ "PolyhedronBufferGeometry", "api/geometries/PolyhedronBufferGeometry" ],
-			[ "PolyhedronGeometry", "api/geometries/PolyhedronGeometry" ],
-			[ "RingBufferGeometry", "api/geometries/RingBufferGeometry" ],
-			[ "RingGeometry", "api/geometries/RingGeometry" ],
-			[ "ShapeBufferGeometry", "api/geometries/ShapeBufferGeometry" ],
-			[ "ShapeGeometry", "api/geometries/ShapeGeometry" ],
-			[ "SphereBufferGeometry", "api/geometries/SphereBufferGeometry" ],
-			[ "SphereGeometry", "api/geometries/SphereGeometry" ],
-			[ "TetrahedronBufferGeometry", "api/geometries/TetrahedronBufferGeometry" ],
-			[ "TetrahedronGeometry", "api/geometries/TetrahedronGeometry" ],
-			[ "TextGeometry", "api/geometries/TextGeometry" ],
-			[ "TorusBufferGeometry", "api/geometries/TorusBufferGeometry" ],
-			[ "TorusGeometry", "api/geometries/TorusGeometry" ],
-			[ "TorusKnotBufferGeometry", "api/geometries/TorusKnotBufferGeometry" ],
-			[ "TorusKnotGeometry", "api/geometries/TorusKnotGeometry" ],
-			[ "TubeGeometry", "api/geometries/TubeGeometry" ],
-			[ "TubeBufferGeometry", "api/geometries/TubeBufferGeometry" ],
-			[ "WireframeGeometry", "api/geometries/WireframeGeometry" ]
-		],
-
-		"Helpers": [
-			[ "ArrowHelper", "api/helpers/ArrowHelper" ],
-			[ "AxisHelper", "api/helpers/AxisHelper" ],
-			[ "BoxHelper", "api/helpers/BoxHelper" ],
-			[ "CameraHelper", "api/helpers/CameraHelper" ],
-			[ "DirectionalLightHelper", "api/helpers/DirectionalLightHelper" ],
-			[ "FaceNormalsHelper", "api/helpers/FaceNormalsHelper" ],
-			[ "GridHelper", "api/helpers/GridHelper" ],
-			[ "PolarGridHelper", "api/helpers/PolarGridHelper" ],
-			[ "HemisphereLightHelper", "api/helpers/HemisphereLightHelper" ],
-			[ "PointLightHelper", "api/helpers/PointLightHelper" ],
-			[ "RectAreaLightHelper", "api/helpers/RectAreaLightHelper" ],
-			[ "SkeletonHelper", "api/helpers/SkeletonHelper" ],
-			[ "SpotLightHelper", "api/helpers/SpotLightHelper" ],
-			[ "VertexNormalsHelper", "api/helpers/VertexNormalsHelper" ]
-		],
-
-		"Lights": [
-			[ "AmbientLight", "api/lights/AmbientLight" ],
-			[ "DirectionalLight", "api/lights/DirectionalLight" ],
-			[ "HemisphereLight", "api/lights/HemisphereLight" ],
-			[ "Light", "api/lights/Light" ],
-			[ "PointLight", "api/lights/PointLight" ],
-			[ "RectAreaLight", "api/lights/RectAreaLight" ],
-			[ "SpotLight", "api/lights/SpotLight" ]
-		],
-
-		"Lights / Shadows": [
-			[ "DirectionalLightShadow", "api/lights/shadows/DirectionalLightShadow" ],
-			[ "LightShadow", "api/lights/shadows/LightShadow" ],
-			[ "RectAreaLightShadow", "api/lights/shadows/RectAreaLightShadow" ],
-			[ "SpotLightShadow", "api/lights/shadows/SpotLightShadow" ]
-		],
-
-		"Loaders": [
-			[ "AnimationLoader", "api/loaders/AnimationLoader" ],
-			[ "AudioLoader", "api/loaders/AudioLoader" ],
-			[ "BufferGeometryLoader", "api/loaders/BufferGeometryLoader" ],
-			[ "Cache", "api/loaders/Cache" ],
-			[ "CompressedTextureLoader", "api/loaders/CompressedTextureLoader" ],
-			[ "CubeTextureLoader", "api/loaders/CubeTextureLoader" ],
-			[ "DataTextureLoader", "api/loaders/DataTextureLoader" ],
-			[ "FileLoader", "api/loaders/FileLoader" ],
-			[ "FontLoader", "api/loaders/FontLoader" ],
-			[ "ImageLoader", "api/loaders/ImageLoader" ],
-			[ "JSONLoader", "api/loaders/JSONLoader" ],
-			[ "Loader", "api/loaders/Loader" ],
-			[ "MaterialLoader", "api/loaders/MaterialLoader" ],
-			[ "ObjectLoader", "api/loaders/ObjectLoader" ],
-			[ "TextureLoader", "api/loaders/TextureLoader" ]
-		],
-
-		"Loaders / Managers": [
-			[ "DefaultLoadingManager", "api/loaders/managers/DefaultLoadingManager" ],
-			[ "LoadingManager", "api/loaders/managers/LoadingManager" ]
-		],
-
-		"Materials": [
-			[ "LineBasicMaterial", "api/materials/LineBasicMaterial" ],
-			[ "LineDashedMaterial", "api/materials/LineDashedMaterial" ],
-			[ "Material", "api/materials/Material" ],
-			[ "MeshBasicMaterial", "api/materials/MeshBasicMaterial" ],
-			[ "MeshDepthMaterial", "api/materials/MeshDepthMaterial" ],
-			[ "MeshLambertMaterial", "api/materials/MeshLambertMaterial" ],
-			[ "MeshNormalMaterial", "api/materials/MeshNormalMaterial" ],
-			[ "MeshPhongMaterial", "api/materials/MeshPhongMaterial" ],
-			[ "MeshPhysicalMaterial", "api/materials/MeshPhysicalMaterial" ],
-			[ "MeshStandardMaterial", "api/materials/MeshStandardMaterial" ],
-			[ "MeshToonMaterial", "api/materials/MeshToonMaterial" ],
-			[ "PointsMaterial", "api/materials/PointsMaterial" ],
-			[ "RawShaderMaterial", "api/materials/RawShaderMaterial" ],
-			[ "ShaderMaterial", "api/materials/ShaderMaterial" ],
-			[ "ShadowMaterial", "api/materials/ShadowMaterial" ],
-			[ "SpriteMaterial", "api/materials/SpriteMaterial" ]
-		],
-
-		"Math": [
-			[ "Box2", "api/math/Box2" ],
-			[ "Box3", "api/math/Box3" ],
-			[ "Color", "api/math/Color" ],
-			[ "Cylindrical", "api/math/Cylindrical" ],
-			[ "Euler", "api/math/Euler" ],
-			[ "Frustum", "api/math/Frustum" ],
-			[ "Interpolant", "api/math/Interpolant" ],
-			[ "Line3", "api/math/Line3" ],
-			[ "Math", "api/math/Math" ],
-			[ "Matrix3", "api/math/Matrix3" ],
-			[ "Matrix4", "api/math/Matrix4" ],
-			[ "Plane", "api/math/Plane" ],
-			[ "Quaternion", "api/math/Quaternion" ],
-			[ "Ray", "api/math/Ray" ],
-			[ "Sphere", "api/math/Sphere" ],
-			[ "Spherical", "api/math/Spherical" ],
-			[ "Triangle", "api/math/Triangle" ],
-			[ "Vector2", "api/math/Vector2" ],
-			[ "Vector3", "api/math/Vector3" ],
-			[ "Vector4", "api/math/Vector4" ]
-		],
-
-		"Math / Interpolants": [
-			[ "CubicInterpolant", "api/math/interpolants/CubicInterpolant" ],
-			[ "DiscreteInterpolant", "api/math/interpolants/DiscreteInterpolant" ],
-			[ "LinearInterpolant", "api/math/interpolants/LinearInterpolant" ],
-			[ "QuaternionLinearInterpolant", "api/math/interpolants/QuaternionLinearInterpolant" ]
-		],
-
-		"Objects": [
-			[ "Bone", "api/objects/Bone" ],
-			[ "Group", "api/objects/Group" ],
-			[ "LensFlare", "api/objects/LensFlare" ],
-			[ "Line", "api/objects/Line" ],
-			[ "LineLoop", "api/objects/LineLoop" ],
-			[ "LineSegments", "api/objects/LineSegments" ],
-			[ "LOD", "api/objects/LOD" ],
-			[ "Mesh", "api/objects/Mesh" ],
-			[ "Points", "api/objects/Points" ],
-			[ "Skeleton", "api/objects/Skeleton" ],
-			[ "SkinnedMesh", "api/objects/SkinnedMesh" ],
-			[ "Sprite", "api/objects/Sprite" ]
-		],
-
-		"Renderers": [
-			[ "WebGLRenderer", "api/renderers/WebGLRenderer" ],
-			[ "WebGLRenderTarget", "api/renderers/WebGLRenderTarget" ],
-			[ "WebGLRenderTargetCube", "api/renderers/WebGLRenderTargetCube" ]
-		],
-
-		"Renderers / Shaders": [
-			[ "ShaderChunk", "api/renderers/shaders/ShaderChunk" ],
-			[ "ShaderLib", "api/renderers/shaders/ShaderLib" ],
-			[ "UniformsLib", "api/renderers/shaders/UniformsLib" ],
-			[ "UniformsUtils", "api/renderers/shaders/UniformsUtils" ]
-		],
-
-		"Scenes": [
-			[ "Fog", "api/scenes/Fog" ],
-			[ "FogExp2", "api/scenes/FogExp2" ],
-			[ "Scene", "api/scenes/Scene" ]
-		],
-
-		"Textures": [
-			[ "CanvasTexture", "api/textures/CanvasTexture" ],
-			[ "CompressedTexture", "api/textures/CompressedTexture" ],
-			[ "CubeTexture", "api/textures/CubeTexture" ],
-			[ "DataTexture", "api/textures/DataTexture" ],
-			[ "DepthTexture", "api/textures/DepthTexture" ],
-			[ "Texture", "api/textures/Texture" ],
-			[ "VideoTexture", "api/textures/VideoTexture" ]
-		]
+		"Animation": {
+			"AnimationAction": "api/animation/AnimationAction",
+			"AnimationClip": "api/animation/AnimationClip",
+			"AnimationMixer": "api/animation/AnimationMixer",
+			"AnimationObjectGroup": "api/animation/AnimationObjectGroup",
+			"AnimationUtils": "api/animation/AnimationUtils",
+			"KeyframeTrack": "api/animation/KeyframeTrack",
+			"PropertyBinding": "api/animation/PropertyBinding",
+			"PropertyMixer": "api/animation/PropertyMixer"
+		},
+
+		"Animation / Tracks": {
+			"BooleanKeyframeTrack": "api/animation/tracks/BooleanKeyframeTrack",
+			"ColorKeyframeTrack": "api/animation/tracks/ColorKeyframeTrack",
+			"NumberKeyframeTrack": "api/animation/tracks/NumberKeyframeTrack",
+			"QuaternionKeyframeTrack": "api/animation/tracks/QuaternionKeyframeTrack",
+			"StringKeyframeTrack": "api/animation/tracks/StringKeyframeTrack",
+			"VectorKeyframeTrack": "api/animation/tracks/VectorKeyframeTrack"
+		},
+
+		"Audio": {
+			"Audio": "api/audio/Audio",
+			"AudioAnalyser": "api/audio/AudioAnalyser",
+			"AudioContext": "api/audio/AudioContext",
+			"AudioListener": "api/audio/AudioListener",
+			"PositionalAudio": "api/audio/PositionalAudio"
+		},
+
+		"Cameras": {
+			"Camera": "api/cameras/Camera",
+			"CubeCamera": "api/cameras/CubeCamera",
+			"OrthographicCamera": "api/cameras/OrthographicCamera",
+			"PerspectiveCamera": "api/cameras/PerspectiveCamera",
+			"StereoCamera": "api/cameras/StereoCamera"
+		},
+
+		"Constants": {
+			"Animation": "api/constants/Animation",
+			"Core": "api/constants/Core",
+			"CustomBlendingEquation": "api/constants/CustomBlendingEquations",
+			"DrawModes": "api/constants/DrawModes",
+			"Materials": "api/constants/Materials",
+			"Renderer": "api/constants/Renderer",
+			"Textures": "api/constants/Textures"
+		},
+
+		"Core": {
+			"BufferAttribute": "api/core/BufferAttribute",
+			"BufferGeometry": "api/core/BufferGeometry",
+			"Clock": "api/core/Clock",
+			"DirectGeometry": "api/core/DirectGeometry",
+			"EventDispatcher": "api/core/EventDispatcher",
+			"Face3": "api/core/Face3",
+			"Geometry": "api/core/Geometry",
+			"InstancedBufferAttribute": "api/core/InstancedBufferAttribute",
+			"InstancedBufferGeometry": "api/core/InstancedBufferGeometry",
+			"InstancedInterleavedBuffer": "api/core/InstancedInterleavedBuffer",
+			"InterleavedBuffer": "api/core/InterleavedBuffer",
+			"InterleavedBufferAttribute": "api/core/InterleavedBufferAttribute",
+			"Layers": "api/core/Layers",
+			"Object3D": "api/core/Object3D",
+			"Raycaster": "api/core/Raycaster",
+			"Uniform": "api/core/Uniform"
+		},
+
+		"Core / BufferAttributes": {
+			"BufferAttribute Types": "api/core/bufferAttributeTypes/BufferAttributeTypes"
+		},
+
+		"Deprecated": {
+			"DeprecatedList": "api/deprecated/DeprecatedList"
+		},
+
+		"Extras": {
+			"CurveUtils": "api/extras/CurveUtils",
+			"SceneUtils": "api/extras/SceneUtils",
+			"ShapeUtils": "api/extras/ShapeUtils"
+		},
+
+		"Extras / Core": {
+			"Curve": "api/extras/core/Curve",
+			"CurvePath": "api/extras/core/CurvePath",
+			"Font": "api/extras/core/Font",
+			"Path": "api/extras/core/Path",
+			"Shape": "api/extras/core/Shape",
+			"ShapePath": "api/extras/core/ShapePath"
+		},
+
+		"Extras / Curves": {
+			"ArcCurve": "api/extras/curves/ArcCurve",
+			"CatmullRomCurve3": "api/extras/curves/CatmullRomCurve3",
+			"CubicBezierCurve": "api/extras/curves/CubicBezierCurve",
+			"CubicBezierCurve3": "api/extras/curves/CubicBezierCurve3",
+			"EllipseCurve": "api/extras/curves/EllipseCurve",
+			"LineCurve": "api/extras/curves/LineCurve",
+			"LineCurve3": "api/extras/curves/LineCurve3",
+			"QuadraticBezierCurve": "api/extras/curves/QuadraticBezierCurve",
+			"QuadraticBezierCurve3": "api/extras/curves/QuadraticBezierCurve3",
+			"SplineCurve": "api/extras/curves/SplineCurve"
+		},
+
+		"Extras / Objects": {
+			"ImmediateRenderObject": "api/extras/objects/ImmediateRenderObject",
+			"MorphBlendMesh": "api/extras/objects/MorphBlendMesh"
+		},
+
+		"Geometries": {
+			"BoxBufferGeometry": "api/geometries/BoxBufferGeometry",
+			"BoxGeometry": "api/geometries/BoxGeometry",
+			"CircleBufferGeometry": "api/geometries/CircleBufferGeometry",
+			"CircleGeometry": "api/geometries/CircleGeometry",
+			"ConeBufferGeometry": "api/geometries/ConeBufferGeometry",
+			"ConeGeometry": "api/geometries/ConeGeometry",
+			"CylinderBufferGeometry": "api/geometries/CylinderBufferGeometry",
+			"CylinderGeometry": "api/geometries/CylinderGeometry",
+			"DodecahedronBufferGeometry": "api/geometries/DodecahedronBufferGeometry",
+			"DodecahedronGeometry": "api/geometries/DodecahedronGeometry",
+			"EdgesGeometry": "api/geometries/EdgesGeometry",
+			"ExtrudeGeometry": "api/geometries/ExtrudeGeometry",
+			"ExtrudeBufferGeometry": "api/geometries/ExtrudeBufferGeometry",
+			"IcosahedronBufferGeometry": "api/geometries/IcosahedronBufferGeometry",
+			"IcosahedronGeometry": "api/geometries/IcosahedronGeometry",
+			"LatheBufferGeometry": "api/geometries/LatheBufferGeometry",
+			"LatheGeometry": "api/geometries/LatheGeometry",
+			"OctahedronBufferGeometry": "api/geometries/OctahedronBufferGeometry",
+			"OctahedronGeometry": "api/geometries/OctahedronGeometry",
+			"ParametricBufferGeometry": "api/geometries/ParametricBufferGeometry",
+			"ParametricGeometry": "api/geometries/ParametricGeometry",
+			"PlaneBufferGeometry": "api/geometries/PlaneBufferGeometry",
+			"PlaneGeometry": "api/geometries/PlaneGeometry",
+			"PolyhedronBufferGeometry": "api/geometries/PolyhedronBufferGeometry",
+			"PolyhedronGeometry": "api/geometries/PolyhedronGeometry",
+			"RingBufferGeometry": "api/geometries/RingBufferGeometry",
+			"RingGeometry": "api/geometries/RingGeometry",
+			"ShapeBufferGeometry": "api/geometries/ShapeBufferGeometry",
+			"ShapeGeometry": "api/geometries/ShapeGeometry",
+			"SphereBufferGeometry": "api/geometries/SphereBufferGeometry",
+			"SphereGeometry": "api/geometries/SphereGeometry",
+			"TetrahedronBufferGeometry": "api/geometries/TetrahedronBufferGeometry",
+			"TetrahedronGeometry": "api/geometries/TetrahedronGeometry",
+			"TextGeometry": "api/geometries/TextGeometry",
+			"TorusBufferGeometry": "api/geometries/TorusBufferGeometry",
+			"TorusGeometry": "api/geometries/TorusGeometry",
+			"TorusKnotBufferGeometry": "api/geometries/TorusKnotBufferGeometry",
+			"TorusKnotGeometry": "api/geometries/TorusKnotGeometry",
+			"TubeGeometry": "api/geometries/TubeGeometry",
+			"TubeBufferGeometry": "api/geometries/TubeBufferGeometry",
+			"WireframeGeometry": "api/geometries/WireframeGeometry"
+		},
+
+		"Helpers": {
+			"ArrowHelper": "api/helpers/ArrowHelper",
+			"AxisHelper": "api/helpers/AxisHelper",
+			"BoxHelper": "api/helpers/BoxHelper",
+			"CameraHelper": "api/helpers/CameraHelper",
+			"DirectionalLightHelper": "api/helpers/DirectionalLightHelper",
+			"FaceNormalsHelper": "api/helpers/FaceNormalsHelper",
+			"GridHelper": "api/helpers/GridHelper",
+			"PolarGridHelper": "api/helpers/PolarGridHelper",
+			"HemisphereLightHelper": "api/helpers/HemisphereLightHelper",
+			"PointLightHelper": "api/helpers/PointLightHelper",
+			"RectAreaLightHelper": "api/helpers/RectAreaLightHelper",
+			"SkeletonHelper": "api/helpers/SkeletonHelper",
+			"SpotLightHelper": "api/helpers/SpotLightHelper",
+			"VertexNormalsHelper": "api/helpers/VertexNormalsHelper"
+		},
+
+		"Lights": {
+			"AmbientLight": "api/lights/AmbientLight",
+			"DirectionalLight": "api/lights/DirectionalLight",
+			"HemisphereLight": "api/lights/HemisphereLight",
+			"Light": "api/lights/Light",
+			"PointLight": "api/lights/PointLight",
+			"RectAreaLight": "api/lights/RectAreaLight",
+			"SpotLight": "api/lights/SpotLight"
+		},
+
+		"Lights / Shadows": {
+			"DirectionalLightShadow": "api/lights/shadows/DirectionalLightShadow",
+			"LightShadow": "api/lights/shadows/LightShadow",
+			"RectAreaLightShadow": "api/lights/shadows/RectAreaLightShadow",
+			"SpotLightShadow": "api/lights/shadows/SpotLightShadow"
+		},
+
+		"Loaders": {
+			"AnimationLoader": "api/loaders/AnimationLoader",
+			"AudioLoader": "api/loaders/AudioLoader",
+			"BufferGeometryLoader": "api/loaders/BufferGeometryLoader",
+			"Cache": "api/loaders/Cache",
+			"CompressedTextureLoader": "api/loaders/CompressedTextureLoader",
+			"CubeTextureLoader": "api/loaders/CubeTextureLoader",
+			"DataTextureLoader": "api/loaders/DataTextureLoader",
+			"FileLoader": "api/loaders/FileLoader",
+			"FontLoader": "api/loaders/FontLoader",
+			"ImageLoader": "api/loaders/ImageLoader",
+			"JSONLoader": "api/loaders/JSONLoader",
+			"Loader": "api/loaders/Loader",
+			"MaterialLoader": "api/loaders/MaterialLoader",
+			"ObjectLoader": "api/loaders/ObjectLoader",
+			"TextureLoader": "api/loaders/TextureLoader"
+		},
+
+		"Loaders / Managers": {
+			"DefaultLoadingManager": "api/loaders/managers/DefaultLoadingManager",
+			"LoadingManager": "api/loaders/managers/LoadingManager"
+		},
+
+		"Materials": {
+			"LineBasicMaterial": "api/materials/LineBasicMaterial",
+			"LineDashedMaterial": "api/materials/LineDashedMaterial",
+			"Material": "api/materials/Material",
+			"MeshBasicMaterial": "api/materials/MeshBasicMaterial",
+			"MeshDepthMaterial": "api/materials/MeshDepthMaterial",
+			"MeshLambertMaterial": "api/materials/MeshLambertMaterial",
+			"MeshNormalMaterial": "api/materials/MeshNormalMaterial",
+			"MeshPhongMaterial": "api/materials/MeshPhongMaterial",
+			"MeshPhysicalMaterial": "api/materials/MeshPhysicalMaterial",
+			"MeshStandardMaterial": "api/materials/MeshStandardMaterial",
+			"MeshToonMaterial": "api/materials/MeshToonMaterial",
+			"PointsMaterial": "api/materials/PointsMaterial",
+			"RawShaderMaterial": "api/materials/RawShaderMaterial",
+			"ShaderMaterial": "api/materials/ShaderMaterial",
+			"ShadowMaterial": "api/materials/ShadowMaterial",
+			"SpriteMaterial": "api/materials/SpriteMaterial"
+		},
+
+		"Math": {
+			"Box2": "api/math/Box2",
+			"Box3": "api/math/Box3",
+			"Color": "api/math/Color",
+			"Cylindrical": "api/math/Cylindrical",
+			"Euler": "api/math/Euler",
+			"Frustum": "api/math/Frustum",
+			"Interpolant": "api/math/Interpolant",
+			"Line3": "api/math/Line3",
+			"Math": "api/math/Math",
+			"Matrix3": "api/math/Matrix3",
+			"Matrix4": "api/math/Matrix4",
+			"Plane": "api/math/Plane",
+			"Quaternion": "api/math/Quaternion",
+			"Ray": "api/math/Ray",
+			"Sphere": "api/math/Sphere",
+			"Spherical": "api/math/Spherical",
+			"Triangle": "api/math/Triangle",
+			"Vector2": "api/math/Vector2",
+			"Vector3": "api/math/Vector3",
+			"Vector4": "api/math/Vector4"
+		},
+
+		"Math / Interpolants": {
+			"CubicInterpolant": "api/math/interpolants/CubicInterpolant",
+			"DiscreteInterpolant": "api/math/interpolants/DiscreteInterpolant",
+			"LinearInterpolant": "api/math/interpolants/LinearInterpolant",
+			"QuaternionLinearInterpolant": "api/math/interpolants/QuaternionLinearInterpolant"
+		},
+
+		"Objects": {
+			"Bone": "api/objects/Bone",
+			"Group": "api/objects/Group",
+			"LensFlare": "api/objects/LensFlare",
+			"Line": "api/objects/Line",
+			"LineLoop": "api/objects/LineLoop",
+			"LineSegments": "api/objects/LineSegments",
+			"LOD": "api/objects/LOD",
+			"Mesh": "api/objects/Mesh",
+			"Points": "api/objects/Points",
+			"Skeleton": "api/objects/Skeleton",
+			"SkinnedMesh": "api/objects/SkinnedMesh",
+			"Sprite": "api/objects/Sprite"
+		},
+
+		"Renderers": {
+			"WebGLRenderer": "api/renderers/WebGLRenderer",
+			"WebGLRenderTarget": "api/renderers/WebGLRenderTarget",
+			"WebGLRenderTargetCube": "api/renderers/WebGLRenderTargetCube"
+		},
+
+		"Renderers / Shaders": {
+			"ShaderChunk": "api/renderers/shaders/ShaderChunk",
+			"ShaderLib": "api/renderers/shaders/ShaderLib",
+			"UniformsLib": "api/renderers/shaders/UniformsLib",
+			"UniformsUtils": "api/renderers/shaders/UniformsUtils"
+		},
+
+		"Scenes": {
+			"Fog": "api/scenes/Fog",
+			"FogExp2": "api/scenes/FogExp2",
+			"Scene": "api/scenes/Scene"
+		},
+
+		"Textures": {
+			"CanvasTexture": "api/textures/CanvasTexture",
+			"CompressedTexture": "api/textures/CompressedTexture",
+			"CubeTexture": "api/textures/CubeTexture",
+			"DataTexture": "api/textures/DataTexture",
+			"DepthTexture": "api/textures/DepthTexture",
+			"Texture": "api/textures/Texture",
+			"VideoTexture": "api/textures/VideoTexture"
+		}
 
 	},
 
 	"Examples": {
 
-		"Collada Animation": [
-			[ "ColladaAnimation", "examples/collada/Animation" ],
-			[ "AnimationHandler", "examples/collada/AnimationHandler" ],
-			[ "KeyFrameAnimation", "examples/collada/KeyFrameAnimation" ]
-		],
-
-		"Geometries": [
-			[ "ConvexBufferGeometry", "examples/geometries/ConvexBufferGeometry" ],
-			[ "ConvexGeometry", "examples/geometries/ConvexGeometry" ]
-		],
-
-		"Loaders": [
-			[ "BabylonLoader", "examples/loaders/BabylonLoader" ],
-			[ "ColladaLoader", "examples/loaders/ColladaLoader" ],
-			[ "GLTF2Loader", "examples/loaders/GLTF2Loader" ],
-			[ "MTLLoader", "examples/loaders/MTLLoader" ],
-			[ "OBJLoader", "examples/loaders/OBJLoader" ],
-			[ "PCDLoader", "examples/loaders/PCDLoader" ],
-			[ "PDBLoader", "examples/loaders/PDBLoader" ],
-			[ "SVGLoader", "examples/loaders/SVGLoader" ],
-			[ "TGALoader", "examples/loaders/TGALoader" ]
-		],
-
-		"Plugins": [
-			[ "CombinedCamera", "examples/cameras/CombinedCamera" ],
-			[ "LookupTable", "examples/Lut" ],
-			[ "SpriteCanvasMaterial", "examples/SpriteCanvasMaterial" ]
-		],
-
-		"QuickHull": [
-			[ "Face", "examples/quickhull/Face" ],
-			[ "HalfEdge", "examples/quickhull/HalfEdge" ],
-			[ "QuickHull", "examples/quickhull/QuickHull" ],
-			[ "VertexNode", "examples/quickhull/VertexNode" ],
-			[ "VertexList", "examples/quickhull/VertexList" ]
-		],
-
-		"Renderers": [
-			[ "CanvasRenderer", "examples/renderers/CanvasRenderer" ]
-		]
+		"Collada Animation": {
+			"ColladaAnimation": "examples/collada/Animation",
+			"AnimationHandler": "examples/collada/AnimationHandler",
+			"KeyFrameAnimation": "examples/collada/KeyFrameAnimation"
+		},
+
+		"Geometries": {
+			"ConvexBufferGeometry": "examples/geometries/ConvexBufferGeometry",
+			"ConvexGeometry": "examples/geometries/ConvexGeometry"
+		},
+
+		"Loaders": {
+			"BabylonLoader": "examples/loaders/BabylonLoader",
+			"ColladaLoader": "examples/loaders/ColladaLoader",
+			"GLTF2Loader": "examples/loaders/GLTF2Loader",
+			"MTLLoader": "examples/loaders/MTLLoader",
+			"OBJLoader": "examples/loaders/OBJLoader",
+			"PCDLoader": "examples/loaders/PCDLoader",
+			"PDBLoader": "examples/loaders/PDBLoader",
+			"SVGLoader": "examples/loaders/SVGLoader",
+			"TGALoader": "examples/loaders/TGALoader"
+		},
+
+		"Plugins": {
+			"CombinedCamera": "examples/cameras/CombinedCamera",
+			"LookupTable": "examples/Lut",
+			"SpriteCanvasMaterial": "examples/SpriteCanvasMaterial"
+		},
+
+		"QuickHull": {
+			"Face": "examples/quickhull/Face",
+			"HalfEdge": "examples/quickhull/HalfEdge",
+			"QuickHull": "examples/quickhull/QuickHull",
+			"VertexNode": "examples/quickhull/VertexNode",
+			"VertexList": "examples/quickhull/VertexList"
+		},
+
+		"Renderers": {
+			"CanvasRenderer": "examples/renderers/CanvasRenderer"
+		}
 
 	},
 
 	"Developer Reference": {
-		"Polyfills": [
-			[ "Polyfills", "api/Polyfills" ]
-		],
-
-		"WebGLRenderer": [
-			[ "WebGLProgram", "api/renderers/webgl/WebGLProgram" ],
-			[ "WebGLShader", "api/renderers/webgl/WebGLShader" ],
-			[ "WebGLState", "api/renderers/webgl/WebGLState" ]
-		],
-
-		"WebGLRenderer / Plugins": [
-			[ "LensFlarePlugin", "api/renderers/webgl/plugins/LensFlarePlugin" ],
-			[ "SpritePlugin", "api/renderers/webgl/plugins/SpritePlugin" ]
-		]
-
-	}
-
-};
-
-var pages = {};
-
-for ( var section in list ) {
-
-	pages[ section ] = {};
-
-	for ( var category in list[ section ] ) {
-
-		pages[ section ][ category ] = {};
 
-		for ( var i = 0; i < list[ section ][ category ].length; i ++ ) {
+		"Polyfills": {
+			"Polyfills": "api/Polyfills"
+		},
 
-			var page = list[ section ][ category ][ i ];
-			pages[ section ][ category ][ page[ 0 ] ] = page[ 1 ];
+		"WebGLRenderer": {
+			"WebGLProgram": "api/renderers/webgl/WebGLProgram",
+			"WebGLShader": "api/renderers/webgl/WebGLShader",
+			"WebGLState": "api/renderers/webgl/WebGLState"
+		},
 
+		"WebGLRenderer / Plugins": {
+			"LensFlarePlugin": "api/renderers/webgl/plugins/LensFlarePlugin",
+			"SpritePlugin": "api/renderers/webgl/plugins/SpritePlugin"
 		}
 
 	}

+ 8 - 4
docs/page.css

@@ -17,6 +17,8 @@ body {
 
 a {
 	color: #1184CE;
+	cursor: pointer;
+	text-decoration: underline;
 }
 
 h1 {
@@ -56,6 +58,7 @@ pre, code {
 	margin-top: 20px;
 	margin-bottom: 20px;
 }
+
 code {
 	display: block;
 	width: -webkit-calc( 100% - 40px );
@@ -77,6 +80,7 @@ th {
 	padding: 10px;
 	text-decoration: underline;
 }
+
 td {
 	text-align: center;
 }
@@ -102,10 +106,10 @@ strong {
 	opacity: 0.5;
 }
 
-	#button:hover {
-		cursor: pointer;
-		opacity: 1;
-	}
+#button:hover {
+	cursor: pointer;
+	opacity: 1;
+}
 
 a.permalink {
 	float: right;

+ 29 - 3
docs/page.js

@@ -1,3 +1,29 @@
+if ( !window.frameElement ) {
+
+	// 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).
+	// If this URL itself has a fragment, append it with a dot (since '#' in an URL fragment is not allowed).
+
+	var href = window.location.href;
+	var splitIndex = href.lastIndexOf( '/docs/' ) + 6;
+	var docsBaseURL = href.substr( 0, splitIndex );
+
+	var hash = window.location.hash;
+
+	if ( hash !== '' ) {
+
+		href = href.replace( hash, '' );
+		hash = hash.replace( '#', '.' );
+
+	}
+
+	var pathSnippet = href.slice( splitIndex, -5 );
+
+	window.location.replace( docsBaseURL + '#' + pathSnippet + hash );
+
+}
+
+
 var onDocumentLoad = function ( event ) {
 
 	var path;
@@ -30,11 +56,11 @@ var onDocumentLoad = function ( event ) {
 	text = text.replace( /\[path\]/gi, path );
 	text = text.replace( /\[page:([\w\.]+)\]/gi, "[page:$1 $1]" ); // [page:name] to [page:name title]
 	text = text.replace( /\[page:\.([\w\.]+) ([\w\.\s]+)\]/gi, "[page:" + name + ".$1 $2]" ); // [page:.member title] to [page:name.member title]
-	text = text.replace( /\[page:([\w\.]+) ([\w\.\s]+)\]/gi, "<a href=\"javascript:window.parent.goTo('$1')\" title=\"$1\">$2</a>" ); // [page:name title]
-	// text = text.replace( /\[member:.([\w]+) ([\w\.\s]+)\]/gi, "<a href=\"javascript:window.parent.goTo('" + name + ".$1')\" title=\"$1\">$2</a>" );
+	text = text.replace( /\[page:([\w\.]+) ([\w\.\s]+)\]/gi, "<a onclick=\"window.parent.setUrlFragment('$1')\" title=\"$1\">$2</a>" ); // [page:name title]
+	// text = text.replace( /\[member:.([\w]+) ([\w\.\s]+)\]/gi, "<a onclick=\"window.parent.setUrlFragment('" + name + ".$1')\" title=\"$1\">$2</a>" );
 
 	text = text.replace( /\[(?:member|property|method):([\w]+)\]/gi, "[member:$1 $1]" ); // [member:name] to [member:name title]
-	text = text.replace( /\[(?:member|property|method):([\w]+) ([\w\.\s]+)\]/gi, "<a href=\"javascript:window.parent.goTo('" + name + ".$2')\" target=\"_parent\" title=\"" + name + ".$2\" class=\"permalink\">#</a> .<a href=\"javascript:window.parent.goTo('$1')\" title=\"$1\" id=\"$2\">$2</a> " );
+	text = text.replace( /\[(?:member|property|method):([\w]+) ([\w\.\s]+)\]/gi, "<a onclick=\"window.parent.setUrlFragment('" + name + ".$2')\" target=\"_parent\" title=\"" + name + ".$2\" class=\"permalink\">#</a> .<a onclick=\"window.parent.setUrlFragment('$1')\" title=\"$1\" id=\"$2\">$2</a> " );
 
 	text = text.replace( /\[link:([\w|\:|\/|\.|\-|\_]+)\]/gi, "[link:$1 $1]" ); // [link:url] to [link:url title]
 	text = text.replace( /\[link:([\w|\:|\/|\.|\-|\_|\(|\)|\#]+) ([\w|\:|\/|\.|\-|\_|\s]+)\]/gi, "<a href=\"$1\"  target=\"_blank\">$2</a>" ); // [link:url title]