Browse Source

Add comments

Garrett Johnson 5 years ago
parent
commit
ca674f2b10
4 changed files with 3 additions and 27 deletions
  1. 0 26
      example/index.js
  2. 0 1
      src/three/DebugTilesRenderer.js
  3. 1 0
      src/three/TilesRenderer.js
  4. 2 0
      src/utilities/LRUCache.js

+ 0 - 26
example/index.js

@@ -185,32 +185,6 @@ function init() {
 
 		tiles.colorMode = parseFloat( v );
 
-		if ( this._lastController ) {
-
-			this._lastController.remove();
-
-		}
-
-		switch ( v ) {
-
-			// GEOMETRIC_ERROR
-			case 2:
-
-				break;
-
-			// DISTANCE
-			case 3:
-
-				break;
-
-			// DEPTH
-			case 2:
-
-				break;
-
-		}
-
-
 	} );
 	debug.open();
 

+ 0 - 1
src/three/DebugTilesRenderer.js

@@ -39,7 +39,6 @@ export class DebugTilesRenderer extends TilesRenderer {
 
 	initExtremes() {
 
-		// TODO: this should rerun if another nested tileset is loaded -- or kick off the tile set download?
 		let maxDepth = - 1;
 		this.traverse( tile => {
 

+ 1 - 0
src/three/TilesRenderer.js

@@ -523,6 +523,7 @@ export class TilesRenderer extends TilesRendererBase {
 
 		// TODO: we should use the more precise bounding volumes here if possible
 		// cache the root-space planes
+		// Use separating axis theorem for frustum and obb
 
 		const sphere = tile.cached.sphere;
 		if ( sphere ) {

+ 2 - 0
src/utilities/LRUCache.js

@@ -1,4 +1,6 @@
 // TODO: can we remove the use of `indexOf` here because it's potentially slow? Possibly use time and sort as needed?
+// Keep a used list that we can sort as needed when it's dirty, a map of item to last used time, and a binary search
+// of the array to find an item that needs to be removed
 class LRUCache {
 
 	constructor() {