docsby gkjohnson
On this page

Events

{ type: 'needs-update' }
{
	type: 'load-tileset',
	// The loaded tileset object.
	tileset: Tileset,

	// The URL from which the tileset was loaded.
	url: string
}
{
	type: 'load-root-tileset',
	// The loaded root tileset object.
	tileset: Tileset,

	// The URL from which the tileset was loaded.
	url: string
}
{ type: 'tiles-load-start' }
{ type: 'tiles-load-end' }
{
	type: 'tile-download-start',
	// The tile being downloaded.
	tile: Tile,

	// The URL being fetched.
	url: string
}
{
	type: 'load-model',
	// The engine-specific scene object created for this tile.
	scene: Object,

	// The tile the scene belongs to.
	tile: Tile,

	// The URL the content was loaded from.
	url: string
}
{
	type: 'dispose-model',
	// The engine-specific scene object being disposed.
	scene: Object,

	// The tile the scene belonged to.
	tile: Tile
}
{
	type: 'tile-visibility-change',
	// The engine-specific scene object.
	scene: Object,

	// The tile whose visibility changed.
	tile: Tile,

	// Whether the tile is now visible.
	visible: boolean
}
{ type: 'update-before' }
{ type: 'update-after' }
{
	type: 'load-error',
	// The tile that failed, or null if a root tileset failed.
	tile: Tile | null,

	// The error that occurred.
	error: Error,

	// The URL that failed to load.
	url: string | URL
}

Properties

root: Tile | null

readonly

loadProgress: number

readonly

rootTileset: Tileset | null

readonly

fetchOptions: RequestInit = {}

visibleTiles: Set<Tile>

readonly

activeTiles: Set<Tile>

readonly

stats: Object

errorTarget: number = 16

errorFalloff: number = 0

errorFalloffDensity: number = 2e-4

displayActiveTiles: boolean = false

maxDepth: number = Infinity

loadSiblings: boolean = true

loadAncestors: boolean = true

maxTilesProcessed: number = 250

Methods

new TilesRendererBase(
	// URL of the root tileset JSON to load.
	url: string = null
)
registerPlugin( plugin: Object ): void
unregisterPlugin( plugin: Object | string ): boolean
getPluginByName( name: string ): Object | null
traverse(
	beforecb?: ( tile: Tile, parent: Tile | null, depth: number ) => boolean | null,
	aftercb?: ( tile: Tile, parent: Tile | null, depth: number ) => void | null
): void
getAttributions(
	target?: Array<{type: string, value: any}>
): Array<{type: string, value: any}>
update(): void
resetFailedTiles(): void
dispose(): void
dispatchEvent( e: Object ): void
addEventListener(
	name: string,
	callback: ( event: Object ) => void
): void
removeEventListener(
	name: string,
	callback: ( event: Object ) => void
): void