{"id":13678631,"url":"https://github.com/NASA-AMMOS/3DTilesRendererJS","last_synced_at":"2025-04-29T15:32:22.566Z","repository":{"id":37699677,"uuid":"237272544","full_name":"NASA-AMMOS/3DTilesRendererJS","owner":"NASA-AMMOS","description":"Renderer for 3D Tiles in Javascript using three.js","archived":false,"fork":false,"pushed_at":"2025-04-25T06:39:51.000Z","size":56461,"stargazers_count":1837,"open_issues_count":106,"forks_count":326,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-04-25T17:57:42.462Z","etag":null,"topics":["3d-tiles","3dtiles","b3dm","cesium","geometry","gis","gltf","graphics","rendering","terrain","threejs","tile-set","tileset"],"latest_commit_sha":null,"homepage":"https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/mars.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NASA-AMMOS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-30T17:59:39.000Z","updated_at":"2025-04-25T08:47:51.000Z","dependencies_parsed_at":"2023-11-07T04:58:16.148Z","dependency_job_id":"5d8c263e-315f-4e81-bf5f-ce2763793768","html_url":"https://github.com/NASA-AMMOS/3DTilesRendererJS","commit_stats":{"total_commits":1487,"total_committers":46,"mean_commits":32.32608695652174,"dds":"0.14929388029589774","last_synced_commit":"067e52b92fae0b23e34f672c1e447045c5360295"},"previous_names":[],"tags_count":76,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-AMMOS%2F3DTilesRendererJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-AMMOS%2F3DTilesRendererJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-AMMOS%2F3DTilesRendererJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-AMMOS%2F3DTilesRendererJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NASA-AMMOS","download_url":"https://codeload.github.com/NASA-AMMOS/3DTilesRendererJS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251529566,"owners_count":21603979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-tiles","3dtiles","b3dm","cesium","geometry","gis","gltf","graphics","rendering","terrain","threejs","tile-set","tileset"],"created_at":"2024-08-02T13:00:56.329Z","updated_at":"2025-04-29T15:32:22.558Z","avatar_url":"https://github.com/NASA-AMMOS.png","language":"JavaScript","readme":"# 3d-tiles-renderer\n\n[![npm version](https://img.shields.io/npm/v/3d-tiles-renderer.svg?style=flat-square)](https://www.npmjs.com/package/3d-tiles-renderer)\n[![build](https://img.shields.io/github/actions/workflow/status/NASA-AMMOS/3DTilesRendererJS/node.js.yml?style=flat-square\u0026label=build\u0026branch=master)](https://github.com/NASA-AMMOS/3DTilesRendererJS/actions)\n\n![](./images/header-mars.png)\n\nThree.js renderer implementation for the [3D Tiles format](https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/specification/). The renderer supports most of the 3D Tiles spec features with a few exceptions. For a list of available data sets and generation tools see the [3d Tiles resources](https://github.com/CesiumGS/3d-tiles/blob/main/RESOURCES.md) list.\n\nIf a tile set or geometry does not load or render properly please make an issue! Example data is needed for adding and testing features. See the [Feature Complete Milestone](https://github.com/NASA-AMMOS/3DTilesRendererJS/milestone/1) for information on which features are not yet implemented.\n\n**Examples**\n\n[Dingo Gap Mars dataset with multiple tile sets](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/mars.html)\n\n[Kitchen sink example with all options here](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/index.html)\n\n[Rendering in VR example here](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/vr.html)\n\n**External Tiles Providers**\n\n_Personal [Google Tiles API Key](https://developers.google.com/maps/documentation/tile/3d-tiles) or [Cesium Ion API Key](https://cesium.com/platform/cesium-ion/) required_\n\n[Cesium Ion 3D Tiles](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/ionExample.html)\n\n[Cesium Ion Lunar Tiles](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/ionLunar.html)\n\n[Google Photorealistic Tiles](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/googleMapsAerial.html)\n\n[Google Globe Tiles](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/googleMapsExample.html)\n\n**Customization**\n\n[Custom material example](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/customMaterial.html)\n\n[Rendering shadows from offscreen tiles example](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/offscreenShadows.html)\n\n[Alterate texture overlays](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/landformSiteOverlay.html)\n\n**Plugins**\n\n[Tile Metadata](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/metadata.html)\n\n[Tile LoD Fade Transition](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/fadingTiles.html)\n\n[Deep Zoom Image Format Support](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/deepZoom.html)\n\n[TMS, XYZ Map Tiles Support](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/mapTiles.html)\n\n[Loading Tiles in Region Volumes](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/loadRegion.html)\n\n**React Three Fiber**\n\nSee the [dedicated documentation](./src/r3f/README.md) for information on using the project with `@react-three/fiber`.\n\n# Use\n\n## Installation\n\n```\nnpm install 3d-tiles-renderer --save\n```\n\n## Basic TilesRenderer\n\nSetting up a basic application with a 3D Tile Set.\n\n```js\nimport { TilesRenderer } from '3d-tiles-renderer';\n\n// ... initialize three scene ...\n\nconst tilesRenderer = new TilesRenderer( './path/to/tileset.json' );\ntilesRenderer.setCamera( camera );\ntilesRenderer.setResolutionFromRenderer( camera, renderer );\ntilesRenderer.addEventListener( 'load-tile-set', () =\u003e {\n\n\t// optionally center the tile set in case it's far off center\n\tconst sphere = new Sphere();\n\ttilesRenderer.getBoundingSphere( sphere );\n\ttilesRenderer.group.position.copy( sphere.center ).multiplyScalar( - 1 );\n\n} );\n\nscene.add( tilesRenderer.group );\n\nrenderLoop();\n\nfunction renderLoop() {\n\n\trequestAnimationFrame( renderLoop );\n\n\t// The camera matrix is expected to be up to date\n\t// before calling tilesRenderer.update\n\tcamera.updateMatrixWorld();\n\ttilesRenderer.update();\n\trenderer.render( scene, camera );\n\n}\n```\n\n## Custom Material\n\nSetting up a 3D Tile Set using a custom material.\n\n```js\nconst tilesRenderer = new TilesRenderer( './path/to/tileset.json' );\ntilesRenderer.setCamera( camera );\ntilesRenderer.setResolutionFromRenderer( camera, renderer );\ntilesRenderer.addEventListener( 'load-model', ( { scene } ) =\u003e {\n\n\t// create a custom material for the tile\n\tscene.traverse( c =\u003e {\n\n\t\tif ( c.material ) {\n\n\t\t\tc.originalMaterial = c.material;\n\t\t\tc.material = new MeshBasicMaterial();\n\n\t\t}\n\n\t} );\n\n};\n\ntilesRenderer.addEventListener( 'dispose-model', ( { scene } ) =\u003e {\n\n\t// dispose of any manually created materials\n\tscene.traverse( c =\u003e {\n\n\t\tif ( c.material ) {\n\n\t\t\tc.material.dispose();\n\n\t\t}\n\n\t} );\n\n};\nscene.add( tilesRenderer.group );\n```\n\n## Multiple TilesRenderers with Shared Caches and Queues\n\nUsing multiple tiles renderers that share LRUCache and PriorityQueue instances to cut down on memory and correctly prioritize downloads.\n\n```js\n// create multiple tiles renderers\nconst tilesRenderer = new TilesRenderer( './path/to/tileset.json' );\ntilesRenderer.setCamera( camera );\ntilesRenderer.setResolutionFromRenderer( camera, renderer );\n\nconst tilesRenderer2 = new TilesRenderer( './path/to/tileset2.json' );\ntilesRenderer2.setCamera( camera );\ntilesRenderer2.setResolutionFromRenderer( camera, renderer );\n\n// set the second renderer to share the cache and queues from the first\ntilesRenderer2.lruCache = tilesRenderer.lruCache;\ntilesRenderer2.downloadQueue = tilesRenderer.downloadQueue;\ntilesRenderer2.parseQueue = tilesRenderer.parseQueue;\ntilesRenderer2.processNodeQueue = tilesRenderer.processNodeQueue;\n\n// add them to the scene\nscene.add( tilesRenderer.group );\nscene.add( tilesRenderer2.group );\n```\n\n## Adding DRACO Decompression Support\n\nAdding support for DRACO decompression within the GLTF files that are transported in B3DM and I3DM formats. The same approach can be used to add support for KTX2 and DDS textures. Alternatively the [GLTFExtensionsPlugin](./src/plugins/README.md#gltfextensionsplugin) can be used to simplify the setup.\n\n```js\n\n// Note the DRACO compression files need to be supplied via an explicit source.\n// We use unpkg here but in practice should be provided by the application.\n// Decompressing GLTF requires the GLTF branch of the draco decoder\nconst tilesRenderer = new TilesRenderer( './path/to/tileset.json' );\n\nconst dracoLoader = new DRACOLoader();\ndracoLoader.setDecoderPath( 'https://unpkg.com/three@0.123.0/examples/js/libs/draco/gltf/' );\n\nconst loader = new GLTFLoader( tilesRenderer.manager );\nloader.setDRACOLoader( dracoLoader );\n\ntilesRenderer.manager.addHandler( /\\.(gltf|glb)$/g, loader );\n```\n\nAdding support for DRACO decompression within the PNTS files requires a different draco decoder. See more info [here](https://github.com/mrdoob/three.js/tree/dev/examples/jsm/libs/draco).\n\n```js\n\n// Note the DRACO compression files need to be supplied via an explicit source.\n// We use unpkg here but in practice should be provided by the application.\n// Decompressing point clouds should use the master branch of the draco decoder in place of the GLTF branch\nconst dracoLoader = new DRACOLoader();\ndracoLoader.setDecoderPath( 'https://unpkg.com/three@0.123.0/examples/js/libs/draco/' );\n\nconst tilesRenderer = new TilesRenderer( './path/to/tileset.json' );\ntilesRenderer.manager.addHandler( /\\.drc$/g, dracoLoader );\n```\n\n\n## Loading from Cesium Ion\n\nLoading from Cesium Ion requires some extra fetching of the ion url endpoint, as well as a temporary bearer access token. A full example is found in the ionExample.js file in the examples folder.\n\nSet the desired assetId as well as your Ion AccessToken. [More reading is provided by the Cesium REST API documentation](https://cesium.com/docs/rest-api/).\n\n```js\n// fetch a temporary token for the Cesium Ion asset\nconst url = new URL( `https://api.cesium.com/v1/assets/${ assetId }/endpoint` );\nurl.searchParams.append( 'access_token', accessToken );\n\nfetch( url, { mode: 'cors' } )\n\t.then( res =\u003e res.json() )\n\t.then( json =\u003e {\n\n\t\turl = new URL( json.url );\n\n\t\tconst version = url.searchParams.get( 'v' );\n\t\ttiles = new TilesRenderer( url );\n\t\ttiles.fetchOptions.headers = {};\n\t\ttiles.fetchOptions.headers.Authorization = `Bearer ${json.accessToken}`;\n\n\t\t// Prefilter each model fetch by setting the cesium Ion version to the search\n\t\t// parameters of the url.\n\t\ttiles.preprocessURL = uri =\u003e {\n\n\t\t\turi = new URL( uri );\n\t\t\turi.searchParams.append( 'v', version );\n\t\t\treturn uri.toString();\n\n\t\t};\n\n\t} );\n```\n\n## Render On Change\n\nThe tile set and model load callbacks can be used to detect when the data has changed and a new render is necessary.\n\n```js\nlet needsRerender = true;\nconst tilesRenderer = new TilesRenderer( './path/to/tileset.json' );\ntilesRenderer.addEventListener( 'load-tile-set', () =\u003e needsRerender = true );\ntilesRenderer.addEventListener( 'load-model', () =\u003e needsRerender = true );\n\nfunction renderLoop() {\n\n\trequestAnimationFrame( renderLoop );\n\tif ( needsRerender ) {\n\n\t\tneedsRerender = false;\n\t\tcamera.updateMatrixWorld();\n\t\ttilesRenderer.update();\n\t\trenderer.render( scene, camera );\n\n\t}\n\n}\nrenderLoop();\n```\n\n## Read Batch Id and Batch Table Data\n\nHow to find the batch id and batch table associated with a mesh and read the data.\n\n```js\nconst tilesRenderer = new TilesRenderer( './path/to/tileset.json' );\n\n// ...checking intersections...\n\nconst intersects = raycaster.intersectObject( scene, true );\nif ( intersects.length ) {\n\n\tconst { face, object } = intersects[ 0 ];\n\tconst batchidAttr = object.geometry.getAttribute( '_batchid' );\n\n\tif ( batchidAttr ) {\n\n\t\t// Traverse the parents to find the batch table.\n\t\tlet batchTableObject = object;\n\t\twhile ( ! batchTableObject.batchTable ) {\n\n\t\t\tbatchTableObject = batchTableObject.parent;\n\n\t\t}\n\n\t\t// Log the batch data\n\t\tconst batchTable = batchTableObject.batchTable;\n\t\tconst hoveredBatchid = batchidAttr.getX( face.a );\n\t\tconst batchData = batchTable.getDataFromId( hoveredBatchid );\n\t\tconsole.log( batchData );\n\n\t}\n\n}\n```\n\n# API\n\nSee the [plugins documentation](./PLUGINS.md) for GLTFLoader extension plugins, TilesRenderer plugins, and extra classes.\n\n## TilesRenderer\n\n_extends `THREE.EventDispatcher` \u0026 [TilesRendererBase](https://github.com/NASA-AMMOS/3DTilesRendererJS/blob/master/src/base/TilesRendererBase.js), which can be used to implement a 3d tiles renderer in other engines_\n\n### events\n\n```js\n// fired when a new root or child tile set is loaded\n{ type: 'load-tile-set', tileSet: Object, url: String }\n\n// fired when a tile model is loaded\n{ type: 'load-model', scene: THREE.Group, tile: Object }\n\n// fired when a tile model is disposed\n{ type: 'dispose-model', scene: THREE.Group, tile: Object }\n\n// fired when a tiles visibility changes\n{ type: 'tile-visibility-change', scene: THREE.Group, tile: Object }\n\n// fired when tiles start loading\n{ type: 'tiles-load-start' }\n\n// fired when all tiles finish loading\n{ type: 'tiles-load-end' }\n\n// fired when a tile content or the root tile set fails to load\n{ type: 'load-error', tile: Object | null, error: Error, url: string | URL }\n```\n\n### .fetchOptions\n\n```js\nfetchOptions = {} : Object\n```\n\nOptions passed to `fetch` when loading tile set and model data.\n\n### .errorTarget\n\n```js\nerrorTarget = 6 : Number\n```\n\nThe target screenspace error in pixels to target when updating the geometry. Tiles will not render if they have below this level of screenspace error. See the [\"geometric error\" section in the 3d tiles specification](https://github.com/CesiumGS/3d-tiles/tree/master/specification#geometric-error) for more information.\n\n### .maxDepth\n\n```js\nmaxDepth = Infinity : Number\n```\n\nThe max depth to which tiles will be loaded and rendered. Setting it to `1` will only render the root tile. If the tile at depth `maxDepth` is an empty tile then the next set of visible children will be rendered.\n\n### .displayActiveTiles\n\n```js\ndisplayActiveTiles = false : Boolean\n```\n\n\"Active tiles\" are those that are loaded and available but not necessarily visible. If [loadSiblings](#loadSiblings) is true then the tiles loaded up to the extents of the tile set will be considered active even outside the camera view. These tiles are useful for raycasting off camera or for casting shadows.\n\nActive tiles not currently visible in a camera frustum are removed from the scene as an optimization. Setting `displayActiveTiles` to true will keep them in the scene to be rendered from an outside camera view not accounted for by the tiles renderer.\n\n### .autoDisableRendererCulling\n\n```js\nautoDisableRendererCulling = true : Boolean\n```\n\nIf true then all tile meshes automatically have their [frustumCulled](https://threejs.org/docs/index.html#api/en/core/Object3D.frustumCulled) field set to false. This is useful particularly when using one camera because the tiles renderer automatically performs it's own frustum culling on visible tiles. If [displayActiveTiles](#displayActiveTiles) is true or multiple cameras are being used then you may consider setting this to false.\n\n### .lruCache\n\n```js\nlruCache = new LRUCache() : LRUCache\n```\n\n_NOTE: This cannot be set once [update](#update) is called for the first time._\n\n### .downloadQueue\n\n```js\ndownloadQueue = new PriorityQueue : PriorityQueue\n```\n\n_NOTE: This cannot be set once [update](#update) is called for the first time._\n\nQueue for downloading tile content. Max jobs defaults to `10`.\n\n### .parseQueue\n\n```js\nparseQueue = new PriorityQueue : PriorityQueue\n```\n\n_NOTE: This cannot be modified once [update](#update) is called for the first time._\n\nQueue for parsing downloaded tile content. Max jobs defaults to `1`.\n\n### .processNodeQueue\n\n```js\nprocessNodeQueue = new PriorityQueue : PriorityQueue\n```\n\n_NOTE: This cannot be set once [update](#update) is called for the first time._\n\nQueue for expanding and initializing tiles for traversal. Max jobs defaults to `25`.\n\n### .group\n\n```js\ngroup : Group\n```\n\nThe container group for the 3d tiles. Add this to the three.js scene in order to render it. The group includes an additional `matrixWorldInverse` field for transforming objects into the local tile set frame.\n\n### .manager\n\n```js\nmanager : LoadingManager\n```\n\nThe manager used when loading tile geometry.\n\n### .loadProgress\n\n```js\nreadOnly loadProgress : Number\n```\n\nReturns the total load progress between `[0, 1]`. Progress is measured since the last set of loading tiles completed.\n\n### .ellipsoid\n\n```js\nreadonly ellipsoid : Ellipsoid\n```\n\nA definition on the ellipsoid used for the tile set. Defaults to the WGS84 ellipsoid and is modified if the `3DTILES_ELLIPSOID` plugin is present. Specified in the local frame of [TilesRenderer.group](#group).\n\n### .constructor\n\n```js\nconstructor( url = null : String | null )\n```\n\nTakes the url of the `tileset.json` for the tile set to be rendered.\n\n### .update\n\n```js\nupdate() : void\n```\n\nUpdates the tiles to render and kicks off loads for the appropriate tiles in the 3d tile set.\n\nBoth `group.matrixWorld` and all cameras world matrices are expected to be up to date before this is called.\n\n### .resetFailedTiles\n\n```js\nresetFailedTiles() : void\n```\n\nIf any tiles failed to load due to server or network issues then they will not be retried by automatically. This function clears all failed tile states so unloaded tiles can be retried again.\n\n### .getBoundingBox\n\n```js\ngetBoundingBox( box : Box3 ) : boolean\n```\n\nSets `box` to the axis aligned root bounding box of the tile set in the [group](#group) frame. Returns `false` if the tile root is not loaded and the bounding box cannot be set.\n\n### .getOrientedBoundingBox\n\n```js\ngetOrientedBoundingBox( box : Box3, boxTransform : Matrix4 ) : boolean;\n```\n\nSets `box` and `boxTransform` to the bounds and matrix that describe the oriented bounding box that encapsulates the root of the tile set. Returns `false` if the tile root is not loaded and the bounding box cannot be set.\n\n### .getBoundingSphere\n\n```js\ngetBoundingSphere( sphere : Sphere ) : boolean;\n```\n\nSets `sphere` to the bounding sphere that encapsulates the root of the tile set. Returns `false` if the tile root is not loaded and the bounding sphere cannot be set.\n\n### .hasCamera\n\n```js\nhasCamera( camera : Camera ) : boolean\n```\n\nReturns `true` if the camera has already been set on the renderer.\n\n### .setCamera\n\n```js\nsetCamera( camera : Camera ) : boolean\n```\n\nAdds the camera to the camera to be accounted for when traversing the tile set. Returns `false` if the camera is already being tracked. Returns `true` otherwise.\n\n### .deleteCamera\n\n```js\ndeleteCamera( camera : Camera ) : boolean\n```\n\nRemoves the given camera from being accounted for when traversing the tile set. Returns `false` if the camera was not tracked.\n\n### .setResolution\n\n```js\nsetResolution( camera : Camera, resolution : Vector2 ) : boolean\nsetResolution( camera : Camera, x : number, y : number ) : boolean\n```\n\nSets the resolution being rendered to for the given camera. Returns `false` if the camera is not being tracked.\n\n### .setResolutionFromRenderer\n\n```js\nsetResolutionFromRenderer( camera : Camera, renderer : WebGLRenderer ) : boolean\n```\n\nSets the resolution being rendered to for the given camera via renderer which accounts for canvas size and current pixel ratio. Returns `false` if the camera is not being tracked.\n\n### .forEachLoadedModel\n\n```js\nforEachLoadedModel( callback : ( scene : Object3D, tile : object ) =\u003e void ) : void\n```\n\nFires the callback for every loaded scene in the hierarchy with the associatd tile as the second argument. This can be used to update the materials of all loaded meshes in the tile set.\n\n### .registerPlugin\n\n```js\nregisterPlugin( plugin : TilesPlugin ) : void\n```\n\nRegister a plugin to the TilesRenderer. See the [plugins documentation](./PLUGINS.md) for more information.\n\n### .unregisterPlugin\n\n```js\nunregisterPlugin( plugin : TilesPlugin | String ) : Boolean\n```\n\nRemoves a plugin from the tiles renderer. Returns `true` if the plugin was in the renderer and was removed. Returns `false` otherwise.\n\n### .getPluginByName\n\n```js\ngetPluginByName( name : string ) : TilesPlugin\n```\n\nReturns the plugin with the given name if it has been registered. Returns the first one if multiple have been registered.\n\n### .getAttributions\n\n```js\ngetAttributions( target = [] : Array ) : Array\u003c{\n\ttype: string,\n\tvalue: any,\n}\u003e\n```\n\nReturns a list of attributions for the data in the tile set. The list can change when tile visibility changes.\n\nThe \"type\" can be a \"string\", \"html\", or \"image\" depending on the type of attribution. Google Photorealistic Tiles, for example, returns a list of sources as a string.\n\n### .dispose\n\n```js\ndispose() : void\n```\n\nDisposes of all the tiles in the renderer. Calls dispose on all materials, textures, and geometries that were loaded by the renderer and subsequently calls [onDisposeModel](#onDisposeModel) for any loaded tile model.\n\n## PriorityQueue\n\nPiority-sorted queue to prioritize file downloads and parsing.\n\n### .maxJobs\n\n```js\nmaxJobs = 6 : number\n```\n\nThe maximum number of jobs to be processing at once.\n\n### .priorityCallback\n\n```js\npriorityCallback = null : ( itemA, itemB ) =\u003e Number\n```\n\nFunction to derive the job priority of the given item. Higher priority values get processed first (ie return 1 to have itemA processed first).\n\n### .schedulingCallback\n\n```js\nschedulingCallback = requestAnimationFrame : ( cb : Function ) =\u003e void\n```\n\nA function used for scheduling when to run jobs next so more work doesn't happen in a single frame than there is time for -- defaults to the next frame. This should be overriden in scenarios where requestAnimationFrame is not reliable, such as when running in WebXR. See the VR demo for one example on how to handle this with WebXR.\n\n## LRUCache\n\nUtility class for the TilesRenderer to keep track of currently used items so rendered items will not be unloaded.\n\n### .maxSize\n\n```js\nmaxSize = 800 : number\n```\n\nThe maximum cached size in number of items. If that current amount of cached items is equal to this value then no more items can be cached.\n\n### .minSize\n\n```js\nminSize = 600 : number\n```\n\nThe minimum cache size in number of items. Above this cached data will be unloaded if it's unused.\n\n### .maxBytesSize\n\n```js\nmaxByteSize = 0.3 * 2**30 : Number\n```\n\nThe maximum cached size in bytes. If that current amount of cached bytes is equal to this value then no more items can be cached.\n\n_NOTE: Only works with three \u003e= 0.166.0._\n\n### .minBytesSize\n\n```js\nminByteSize = 0.2 * 2**30 : Number\n```\n\nThe minimum cache size in number of bytes. Above this cached data will be unloaded if it's unused.\n\n_NOTE: Only works with three \u003e= 0.166.0._\n\n### .unloadPercent\n\n```js\nunloadPercent = 0.05 : number\n```\n\nThe maximum percentage of [minSize](#minSize) to unload during a given frame.\n\n### .unloadPriorityCallback\n\n```js\nunloadPriorityCallback = null : ( itemA, itemB ) =\u003e Number\n```\n\nFunction to derive the unload priority of the given item. Higher priority values get unloaded first (ie return 1 to have itemA removed first).\n\n## BatchTable\n\n### .getKeys\n\n```js\ngetKeys() : Array\u003cString\u003e\n```\n\nReturns the keys of all the data in the batch table.\n\n### .getDataFromId\n\n```js\ngetDataFromId( id: Number, target?: Object ) : Object;\n```\n\nReturns an object definition for all properties of the batch table and its extensions for a given `id`.\nA `target` object can be specified to store the result. Throws an error if the id is out of the batch table bounds.\n\n### .getPropertyArray\n\n```js\ngetPropertyArray( key : String ) : Array | TypedArray | null\n```\n\nReturns an array of data associated with the `key` passed into the function. Returns null if the key is not in the table.\n\n# LICENSE\n\nThe software is available under the [Apache V2.0 license](../LICENSE.txt).\n\nCopyright © 2020 California Institute of Technology. ALL RIGHTS\nRESERVED. United States Government Sponsorship Acknowledged.\nNeither the name of Caltech nor its operating division, the\nJet Propulsion Laboratory, nor the names of its contributors may be\nused to endorse or promote products derived from this software\nwithout specific prior written permission.\n","funding_links":[],"categories":["Viewers","Libraries \u0026 Plugins"],"sub_categories":["Data Visualization"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNASA-AMMOS%2F3DTilesRendererJS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNASA-AMMOS%2F3DTilesRendererJS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNASA-AMMOS%2F3DTilesRendererJS/lists"}