Browse Source

Add "DebugTilesRenderer.getDebugColor" function

Garrett Johnson 4 years ago
parent
commit
a33a87f3c7
2 changed files with 10 additions and 5 deletions
  1. 8 0
      README.md
  2. 2 5
      src/three/DebugTilesRenderer.d.ts

+ 8 - 0
README.md

@@ -574,6 +574,14 @@ maxDebugDistance = - 1 : Number
 
 The distance value that represents white when rendering with `DISTANCE` [colorMode](#colorMode). If `maxDebugDistance` is `-1` then the radius of the tile set is used.
 
+### .getDebugColor
+
+```js
+getDebugColor : ( val : Number, target : Color ) => void
+```
+
+The function used to map a [0, 1] value to a color for debug visualizations. By default the color is mapped from black to white.
+
 ## PriorityQueue
 
 Piority-sorted queue to prioritize file downloads and parsing.

+ 2 - 5
src/three/DebugTilesRenderer.d.ts

@@ -16,14 +16,11 @@ export class DebugTilesRenderer extends TilesRenderer {
 	displayBoxBounds : Boolean;
 	displaySphereBounds : Boolean;
 	colorMode : ColorMode;
-	
-	/** Debug color min value, default 'black' */
-	minDebugColor : Color;
-	/** Debug color max value, default 'white' */
-	maxDebugColor : Color;
 
 	maxDebugDepth : Number;
 	maxDebugDistance : Number;
 	maxDebugError : Number;
 
+	getDebugColor : ( val: Number, target: Color ) => void;
+
 }