docsby gkjohnson
Showing tile bounds and coloring tiles by depth
Data courtesy of NASA/JPL-Caltech
On this page

Properties

getDebugColor: ( val: number, target: Color ) => void = ( value, target ) => target.setRGB( value, value, value )

Methods

new DebugTilesPlugin(
	options?: {
		// Show OBB bounding-box helpers.
		displayBoxBounds: boolean = false,

		// Show bounding-sphere helpers.
		displaySphereBounds: boolean = false,

		// Show bounding-region helpers.
		displayRegionBounds: boolean = false,

		// Also show ancestor bounding volumes for visible tiles.
		displayParentBounds: boolean = false,

		// Initial tile color mode.
		colorMode: number = ColorModes.NONE,

		// Color mode applied to bounding-volume helpers.
		boundsColorMode: number = ColorModes.NONE,

		// Maximum tree depth for depth-based coloring (`-1` = auto).
		maxDebugDepth: number = -1,

		// Maximum distance for distance-based coloring (`-1` = auto).
		maxDebugDistance: number = -1,

		// Maximum error for error-based coloring (`-1` = auto).
		maxDebugError: number = -1,

		// Callback invoked per-object when `colorMode` is `CUSTOM_COLOR`.
		customColorCallback: ( tile: Object, child: Object3D ) => void | null = null,

		// Replace tile materials with unlit `MeshBasicMaterial`.
		unlit: boolean = false,

		// Whether the plugin is active on init.
		enabled: boolean = true
	}
)
update(): void