OGC3DTile

class representing a tiled and multileveled mesh or point-cloud according to the OGC3DTiles 1.1 spec

Constructor

new OGC3DTile(propertiesopt)

Parameters:
NameTypeAttributesDescription
propertiesObject<optional>
the properties for this tileset
Properties
NameTypeAttributesDescription
urlString<optional>
the url to the parent tileset.json
queryParamsObject<optional>
optional, path params to add to individual tile urls
geometricErrorMultiplierNumber<optional>
the geometric error of the parent. 1.0 by default corresponds to a maxScreenSpaceError of 16
loadOutsideViewBoolean<optional>
if truthy, tiles otside the camera frustum will be loaded with the least possible amount of detail
tileLoaderTileLoader<optional>
A tile loader that can be shared among tilesets in order to share a common cache.
meshCallbackfunction<optional>
A callback function that will be called on every mesh
pointsCallbackfunction<optional>
A callback function that will be called on every points
onLoadCallbackfunction<optional>
A callback function that will be called when the root tile has been loaded
occlusionCullingServiceOcclusionCullingService<optional>
A service that handles occlusion culling
centerModelBoolean<optional>
If true, the tileset will be centered on 0,0,0 and in the case of georeferenced tilesets that use the "region" bounding volume, it will also be rotated so that the up axis matched the world y axis.
staticBoolean<optional>
If true, the tileset is considered static which improves performance but the matrices aren't automatically updated
rootPathString<optional>
optional the root path for fetching children
jsonString<optional>
optional json object representing the tileset sub-tree
parentGeometricErrorNumber<optional>
optional geometric error of the parent
parentBoundingVolumeObject<optional>
optional bounding volume of the parent
parentRefineString<optional>
optional refine strategy of the parent of the parent
cameraOnLoadTHREE.Camera<optional>
optional the camera used when loading this particular sub-tile
parentTileOGC3DTile<optional>
optional the OGC3DTile object that loaded this tile as a child
proxyString<optional>
optional the url to a proxy service. Instead of fetching tiles via a GET request, a POST will be sent to the proxy url with the real tile address in the body of the request.
displayErrorsBoolean<optional>
optional value indicating that errors should be shown on screen.
rendererTHREE.Renderer<optional>
optional the renderer used to display the tileset. Used to infer render resolution at runtime and to instantiate a ktx2loader on the fly if not provided.
domWidthNumber<optional>
optional the canvas width (used to calculate geometric error). If a renderer is provided, it'll be used instead, else a default value is used.
domHeightNumber<optional>
optional the canvas height (used to calculate geometric error). If a renderer is provided, it'll be used instead, else a default value is used.
dracoLoaderDracoLoader<optional>
optional a draco loader (three/addons).
ktx2LoaderKTX2Loader<optional>
optional a ktx2 loader (three/addons).
distanceBiasNumber<optional>
optional a bias that allows loading more or less detail closer to the camera relative to far away. The value should be a positive number. A value below 1 loads less detail near the camera and a value above 1 loads more detail near the camera. This needs to be compensated by the geometricErrorMultiplier in order to load a reasonable number of tiles.
loadingStrategyString<optional>
optional a strategy for loading tiles "INCREMENTAL" loads intermediate LODs while "IMMEDIATE" skips intermediate LODs.
drawBoundingVolumeString<optional>
optional draws the bounding volume (may cause flickering)

Extends

  • THREE.Object3D

Methods

_isReady()

Node is ready if it is outside frustum, if it was drawn at least once or if all it's children are ready
Returns:
true if ready

dispose()

Disposes of all the resources used by the tileset.

setCanvasSize(width, height)

Call this to specify the canvas width/height when it changes (used to compute tiles geometric error that controls tile refinement). It's unnecessary to call this when the OGC3DTile is instantiated with the renderer.
Parameters:
NameTypeDescription
widthNumber
heightNumber

setDistanceBias(distanceBias)

Set the Distance Bias for the tileset. the {@param distanceBias} can be a number between 0 and infinity. A {@param distanceBias} is applied as an exponent to camera-to-tile distance. the geometricErrorMultiplier should be used to balance out the amount of detail loaded
Parameters:
NameTypeDescription
distanceBiasNumberset the distance bias for the entire tileset

setGeometricErrorMultiplier(geometricErrorMultiplier)

Set the Geometric Error Multiplier for the tileset. the {@param geometricErrorMultiplier} can be a number between 1 and infinity. A {@param geometricErrorMultiplier} of 1 (default) corresponds to a max ScreenSpace error (MSE) of 16. A lower {@param geometricErrorMultiplier} loads less detail (higher MSE) and a higher {@param geometricErrorMultiplier} loads more detail (lower MSE)
Parameters:
NameTypeDescription
geometricErrorMultiplierNumberset the LOD multiplier for the entire tileset

update(camera) → {Object}

To be called in the render loop.
Parameters:
NameTypeDescription
cameraTHREE.Cameraa camera that the tileset will be rendered with.
Returns:
An object containing describing the current state of the loaded tileset.
Type: 
Object

updateMatrices()

Manually updates all the matrices of the tileset. To be called after transforming a tileset instantiated with the "static" option