Constructor
new TileLoader(optionsopt)
Creates a tile loader with a maximum number of cached items and callbacks. The only required property is a renderer that will be used to visualize the tiles. The maxCachedItems property is the size of the cache in number of objects, mesh tile and tileset.json files. The mesh and point callbacks will be called for every incoming mesh or points.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | Optional configuration object.Properties
|
- Source
Methods
clear()
Invalidates all the unused cached tiles.
- Source
get(abortController, tileIdentifier, path, callback, distanceFunction, getSiblings, level, sceneZupToYup, meshZupToYup, geometricError)
Schedules a tile content to be downloaded
Parameters:
Name | Type | Description |
---|---|---|
abortController | AbortController | |
tileIdentifier | string | | |
path | string | |
callback | function | |
distanceFunction | function | |
getSiblings | function | |
level | Number | |
sceneZupToYup | Boolean | |
meshZupToYup | Boolean | |
geometricError | Number |
- Source
invalidate(path, tileIdentifier)
unregisters a tile content for a specific tile, removing it from the cache if no other tile is using the same content.
Parameters:
Name | Type | Description |
---|---|---|
path | string | the content path/url |
tileIdentifier | string | | the tile ID |
- Source
update()
To be called in the render loop or at regular intervals. launches tile downloading and loading in an orderly fashion.
- Source