flywave-3dtile-datasource.tilesrendererbase
Home > @flywave/flywave-3dtile-datasource > TilesRendererBase
TilesRendererBase class
Base class for 3D Tiles renderers with core functionality for loading, managing, and rendering tilesets.
This class provides the foundational infrastructure for 3D Tiles rendering, including: - Tile loading and management using LRU cache - Hierarchical tile traversal and refinement - Priority-based downloading and parsing queues - Memory management and resource disposal - Event dispatching for loading progress and errors
Signature:
export declare class TilesRendererBase
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Creates a new TilesRendererBase instance |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| Set<ITile> | Set of currently active tiles | |
boolean | Whether to display active tiles | ||
| PriorityQueue<ITile> | Priority queue for tile downloads | |
| string | undefined | ||
number | Error target for level-of-detail calculations | ||
number | Gets the error threshold (deprecated) | ||
| RequestInit | Fetch options for tile requests | |
number | Frame counter for tracking updates | ||
| number | Gets the current loading progress (0 to 1) | |
| LRUCache<ITile> | LRU cache for tile management | |
number | Maximum depth for tile traversal | ||
| PriorityQueue<ITile> | Priority queue for tile parsing | |
(url: string, parent?: ITile) => string | (Optional) Optional URL preprocessing function | ||
| PriorityQueue<ITile> | Priority queue for node processing | |
| ITile | null | Gets the root tile of the tileset | |
| TileSet | null | Root tileset object | |
Stats | Statistics object for tracking tile loading and rendering status | ||
| Set<ITile> | Set of currently used tiles | |
| Set<ITile> | Set of currently visible tiles |
Methods
Method | Modifiers | Description |
|---|---|---|
Calculates the screen space error for a tile | ||
Dispatches an event (to be overridden by subclasses) | ||
Disposes of all resources This function cleans up all tiles and resets statistics. | ||
Disposes of tile resources | ||
Ensures children tiles are preprocessed | ||
Fetches subtree data from a URL | ||
Fetches tile content from a URL | ||
Fetches tileset JSON data from a URL | ||
| Loads the root tileset | |
Marks a tile as used (preventing it from being unloaded) | ||
Parses tile content | ||
| Parses subtree tile content | |
Preprocesses a tile node This function initializes tile properties and prepares the tile for rendering. | ||
Queues a tile for download | ||
Resets tiles that failed to load This function resets the loading state of failed tiles and the root tileset so they can be retried. | ||
Sets a tile's active state | ||
Sets a tile's visibility state | ||
Traverses the tile hierarchy | ||
Main update function that should be called every frame This function performs the core tile loading and rendering logic: - Loads the root tileset if not already loaded - Updates tile states based on camera visibility - Loads queued tiles - Unloads unused tiles - Dispatches events for loading progress |