Base class for plugins that fade tile geometry in and out as tile LODs change. Dispatches
fade-change, fade-start, and fade-end events on the TilesRenderer. Subclasses
implement the engine specific hooks below.
On this page
Properties
fadeDuration: number = 250
Time in milliseconds for a tile to fully fade in or out.
fadingTiles: number
Number of tiles currently fading.
Methods
new TilesFadePluginBase(
options?: {
// Time in milliseconds for a tile to fully fade in or out.
fadeDuration: number = 250,
// Maximum simultaneous fade-out tiles. If exceeded, tiles pop instead of fading.
maximumFadeOutTiles: number = 50,
// Whether root-level tiles fade in on their first appearance.
fadeRootTiles: boolean = false
}
)prepareTileScene(
// The tile's engine scene.
scene: Object,
// The tile the scene belongs to.
tile: Tile
): voidCalled when a tile model loads so its scene can be prepared for fading.
releaseTileScene(
// The tile's engine scene.
scene: Object,
// The tile the scene belongs to.
tile: Tile
): voidCalled when a tile model is disposed so any fade state can be released.
setFadeState(
// The tile being faded.
tile: Tile,
// Fade in progress from 0 to 1.
fadeIn: number,
// Fade out progress from 0 to 1.
fadeOut: number
): voidApplies the fade values to a fading tile each update.
resetFadeState(
// The tile that finished fading.
tile: Tile,
// Whether the tile is visible after the fade.
visible: boolean
): voidClears the fade values from a tile once its fade completes.
updateCameraState(
// Whether to evaluate the camera movement this update.
checkMovement: boolean
): booleanTracks the camera transforms and returns whether they moved quickly since the last update.