Cesium3DTileset.fromUrl
.
Name | Type | Description |
---|---|---|
options |
Cesium3DTileset.ConstructorOptions | An object describing initialization options |
Throws:
-
DeveloperError : The tileset must be 3D Tiles version 0.0 or 1.0.
Examples:
try {
const tileset = await Cesium.Cesium3DTileset.fromUrl(
"http://localhost:8002/tilesets/Seattle/tileset.json"
);
scene.primitives.add(tileset);
} catch (error) {
console.error(`Error creating tileset: ${error}`);
}
// Turn on camera collisions with the tileset.
try {
const tileset = await Cesium.Cesium3DTileset.fromUrl(
"http://localhost:8002/tilesets/Seattle/tileset.json",
{ enableCollision: true }
);
scene.primitives.add(tileset);
} catch (error) {
console.error(`Error creating tileset: ${error}`);
}
// Common setting for the skipLevelOfDetail optimization
const tileset = await Cesium.Cesium3DTileset.fromUrl(
"http://localhost:8002/tilesets/Seattle/tileset.json", {
skipLevelOfDetail: true,
baseScreenSpaceError: 1024,
skipScreenSpaceErrorFactor: 16,
skipLevels: 1,
immediatelyLoadDesiredLevelOfDetail: false,
loadSiblings: false,
cullWithChildrenBounds: true
});
scene.primitives.add(tileset);
// Common settings for the dynamicScreenSpaceError optimization
const tileset = await Cesium.Cesium3DTileset.fromUrl(
"http://localhost:8002/tilesets/Seattle/tileset.json", {
dynamicScreenSpaceError: true,
dynamicScreenSpaceErrorDensity: 2.0e-4,
dynamicScreenSpaceErrorFactor: 24.0,
dynamicScreenSpaceErrorHeightFalloff: 0.25
});
scene.primitives.add(tileset);
See:
Members
allTilesLoaded : Event
This event is fired at the end of the frame after the scene is rendered.
-
Default Value:
new Event()
Example:
tileset.allTilesLoaded.addEventListener(function() {
console.log('All tiles are loaded');
});
See:
See the asset schema reference in the 3D Tiles spec for the full set of properties.
-
Default Value:
true
Deprecated: true
Only used when Cesium3DTileset#skipLevelOfDetail
is true
.
-
Default Value:
1024
readonly boundingSphere : BoundingSphere
Example:
const tileset = await Cesium.Cesium3DTileset.fromUrl("http://localhost:8002/tilesets/Seattle/tileset.json");
viewer.scene.primitives.add(tileset);
// Set the camera to view the newly added tileset
viewer.camera.viewBoundingSphere(tileset.boundingSphere, new Cesium.HeadingPitchRange(0, -0.5, 0));
Tiles not in view are unloaded to enforce this.
If decreasing this value results in unloading tiles, the tiles are unloaded the next frame.
If tiles sized more than cacheBytes
are needed to meet the
desired screen space error, determined by Cesium3DTileset#maximumScreenSpaceError
,
for the current view, then the memory usage of the tiles loaded will exceed
cacheBytes
by up to maximumCacheOverflowBytes
.
For example, if cacheBytes
is 500000, but 600000 bytes
of tiles are needed to meet the screen space error, then 600000 bytes of tiles
may be loaded (if maximumCacheOverflowBytes
is at least 100000).
When these tiles go out of view, they will be unloaded.
-
Default Value:
536870912
See:
readonly classificationType : ClassificationType
This option is only applied to tilesets containing batched 3D models, glTF content, geometry data, or vector data. Even when undefined, vector and geometry data must render as classifications and will default to rendering on both terrain and other 3D Tiles tilesets.
When enabled for batched 3D model and glTF tilesets, there are a few requirements/limitations on the glTF:
- The glTF cannot contain morph targets, skins, or animations.
- The glTF cannot contain the
EXT_mesh_gpu_instancing
extension. - Only meshes with TRIANGLES can be used to classify other assets.
- The meshes must be watertight.
- The
POSITION
semantic is required. - If
_BATCHID
s and an index buffer are both present, all indices with the same batch id must occupy contiguous sections of the index buffer. - If
_BATCHID
s are present with no index buffer, all positions with the same batch id must occupy contiguous sections of the position buffer.
Additionally, classification is not supported for points or instanced 3D models.
The 3D Tiles or terrain receiving the classification must be opaque.
-
Default Value:
undefined
Experimental
This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
clippingPlanes : ClippingPlaneCollection
ClippingPlaneCollection
used to selectively disable rendering the tileset.
clippingPolygons : ClippingPolygonCollection
ClippingPolygonCollection
used to selectively disable rendering the tileset.
Cesium3DTileset#colorBlendMode
is MIX
.
A value of 0.0 results in the source color while a value of 1.0 results in the feature color, with any value in-between
resulting in a mix of the source color and feature color.
-
Default Value:
0.5
colorBlendMode : Cesium3DTileColorBlendMode
-
Default Value:
Cesium3DTileColorBlendMode.HIGHLIGHT
-
Default Value:
true
-
Default Value:
60.0
customShader : CustomShader|undefined
Model
. Using custom shaders with a
Cesium3DTileStyle
may lead to undefined behavior.
-
Default Value:
undefined
Experimental
This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
When true, assigns a random color to each tile. This is useful for visualizing what features belong to what tiles, especially with additive refinement where features from parent tiles may be interleaved with features from child tiles.
-
Default Value:
false
Determines if only the tiles from last frame should be used for rendering. This effectively "freezes" the tileset to the previous frame so it is possible to zoom out and see what was rendered.
-
Default Value:
false
When true, renders the bounding volume for each visible tile. The bounding volume is white if the tile has a content bounding volume or is empty; otherwise, it is red. Tiles that don't meet the screen space error and are still refining to their descendants are yellow.
-
Default Value:
false
When true, renders the bounding volume for each visible tile's content. The bounding volume is blue if the tile has a content bounding volume; otherwise it is red.
-
Default Value:
false
When true, draws labels to indicate the geometric error of each tile.
-
Default Value:
false
When true, draws labels to indicate the geometry and texture memory usage of each tile.
-
Default Value:
false
When true, draws labels to indicate the number of commands, points, triangles and features of each tile.
-
Default Value:
false
When true, draws labels to indicate the url of each tile.
-
Default Value:
false
When true, renders the viewer request volume for each tile.
-
Default Value:
false
When true, renders each tile's content as a wireframe.
-
Default Value:
false
This optimization is strongest when the camera is close to the ground plane of the tileset and looking at the horizon. Furthermore, the results are more accurate for tightly fitting bounding volumes like box and region.
-
Default Value:
true
Fog#density
, this option controls the camera distance at which the Cesium3DTileset#dynamicScreenSpaceError
optimization applies. Larger values will cause tiles closer to the camera to be affected. This value must be
non-negative.
This optimization works by rolling off the tile screen space error (SSE) with camera distance like a bell curve.
This has the effect of selecting lower resolution tiles far from the camera. Near the camera, no adjustment is
made. For tiles further away, the SSE is reduced by up to Cesium3DTileset#dynamicScreenSpaceErrorFactor
(measured in pixels of error).
Increasing the density makes the bell curve narrower so tiles closer to the camera are affected. This is analagous to moving fog closer to the camera.
When the density is 0, the optimization will have no effect on the tileset.
-
Default Value:
2.0e-4
Cesium3DTileset#dynamicScreenSpaceError
optimization for
tiles on the horizon. Larger values cause lower resolution tiles to load, improving runtime performance at a slight
reduction of visual quality. The value must be non-negative.
More specifically, this parameter represents the maximum adjustment to screen space error (SSE) in pixels for tiles
far away from the camera. See Cesium3DTileset#dynamicScreenSpaceErrorDensity
for more details about how
this optimization works.
When the SSE factor is set to 0, the optimization will have no effect on the tileset.
-
Default Value:
24.0
Cesium3DTileset#dynamicScreenSpaceError
optimization. When the camera is below this height, the dynamic screen space error optimization will have the maximum
effect, and it will roll off above this value. Valid values are between 0.0 and 1.0.
-
Default Value:
0.25
readonly ellipsoid : Ellipsoid
true
, allows collisions for camera collisions or picking. While this is true
the camera will be prevented from going in or below the tileset surface if ScreenSpaceCameraController#enableCollisionDetection
is true. This can have performance implecations if the tileset contains tile with a larger number of vertices.
-
Default Value:
false
readonly environmentMapManager : DynamicEnvironmentMapManager
Example:
// Change the ground color used for a tileset's environment map to a forest green
const environmentMapManager = tileset.environmentMapManager;
environmentMapManager.groundColor = Cesium.Color.fromCssColorString("#203b34");
Experimental
This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
extras
property at the top-level of the tileset JSON, which contains application specific metadata.
Returns undefined
if extras
does not exist.
For EXT_mesh_features, this is the feature ID's label property, or "featureId_N" (where N is the index in the featureIds array) when not specified. EXT_feature_metadata did not have a label field, so such feature ID sets are always labeled "featureId_N" where N is the index in the list of all feature Ids, where feature ID attributes are listed before feature ID textures.
If featureIdLabel is set to an integer N, it is converted to the string "featureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
Experimental
This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
Cesium3DTileset#foveatedScreenSpaceError
is true to control the cone size that determines which tiles are deferred.
Tiles that are inside this cone are loaded immediately. Tiles outside the cone are potentially deferred based on how far outside the cone they are and Cesium3DTileset#foveatedInterpolationCallback
and Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation
.
Setting this to 0.0 means the cone will be the line formed by the camera position and its view direction. Setting this to 1.0 means the cone encompasses the entire field of view of the camera, essentially disabling the effect.
-
Default Value:
0.3
foveatedInterpolationCallback : Cesium3DTileset.foveatedInterpolationCallback
Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation
and Cesium3DTileset#maximumScreenSpaceError
.
Cesium3DTileset#foveatedScreenSpaceError
is true to control the starting screen space error relaxation for tiles outside the foveated cone.
The screen space error will be raised starting with this value up to Cesium3DTileset#maximumScreenSpaceError
based on the provided Cesium3DTileset#foveatedInterpolationCallback
.
-
Default Value:
0.0
Cesium3DTileset#foveatedConeSize
are loaded.
-
Default Value:
true
Cesium3DTileset#foveatedScreenSpaceError
is true to control
how long in seconds to wait after the camera stops moving before deferred tiles start loading in.
This time delay prevents requesting tiles around the edges of the screen when the camera is moving.
Setting this to 0.0 will immediately request all tiles in any given view.
-
Default Value:
0.2
imageBasedLighting : ImageBasedLighting
Only used when Cesium3DTileset#skipLevelOfDetail
is true
.
-
Default Value:
false
initialTilesLoaded : Event
This event is fired at the end of the frame after the scene is rendered.
-
Default Value:
new Event()
Example:
tileset.initialTilesLoaded.addEventListener(function() {
console.log('Initial tiles are loaded');
});
See:
If instanceFeatureIdLabel is set to an integer N, it is converted to the string "instanceFeatureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
Experimental
This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
lightColor : Cartesian3
undefined
the scene's light color is used instead.
For example, disabling additional light sources by setting
tileset.imageBasedLighting.imageBasedLightingFactor = new Cartesian2(0.0, 0.0)
will make the tileset much darker. Here, increasing the intensity of the light source will make the tileset brighter.
-
Default Value:
undefined
loadProgress : Event
The number of pending tile requests, numberOfPendingRequests
, and number of tiles
processing, numberOfTilesProcessing
are passed to the event listener.
This event is fired at the end of the frame after the scene is rendered.
-
Default Value:
new Event()
Example:
tileset.loadProgress.addEventListener(function(numberOfPendingRequests, numberOfTilesProcessing) {
if ((numberOfPendingRequests === 0) && (numberOfTilesProcessing === 0)) {
console.log('Stopped loading');
return;
}
console.log(`Loading: requests: ${numberOfPendingRequests}, processing: ${numberOfTilesProcessing}`);
});
Only used when Cesium3DTileset#skipLevelOfDetail
is true
.
-
Default Value:
false
If tiles sized more than cacheBytes
plus maximumCacheOverflowBytes
are needed to meet the desired screen space error, determined by
Cesium3DTileset#maximumScreenSpaceError
for the current view, then
Cesium3DTileset#memoryAdjustedScreenSpaceError
will be adjusted
until the tiles required to meet the adjusted screen space error use less
than cacheBytes
plus maximumCacheOverflowBytes
.
-
Default Value:
536870912
See:
A tile's screen space error is roughly equivalent to the number of pixels wide that would be drawn if a sphere with a
radius equal to the tile's geometric error were rendered at the tile's position. If this value exceeds
maximumScreenSpaceError
the tile refines to its descendants.
Depending on the tileset, maximumScreenSpaceError
may need to be tweaked to achieve the right balance.
Higher values provide better performance but lower visual quality.
-
Default Value:
16
modelMatrix : Matrix4
-
Default Value:
Matrix4.IDENTITY
Example:
// Adjust a tileset's height from the globe's surface.
const heightOffset = 20.0;
const boundingSphere = tileset.boundingSphere;
const cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center);
const surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
const offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, heightOffset);
const translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
outlineColor : Color
-
Default Value:
Color.BLACK
pointCloudShading : PointCloudShading
-
Default Value:
false
-
Default Value:
true
tileset.show
is false
. Loads tiles as if the tileset is visible but does not render them.
-
Default Value:
false
progressiveResolutionHeightFraction*screenHeight
will be prioritized first. This can help get a quick layer of tiles down while full resolution tiles continue to load.
-
Default Value:
0.3
See the properties schema reference in the 3D Tiles spec for the full set of properties.
Example:
console.log(`Maximum building height: ${tileset.properties.height.maximum}`);
console.log(`Minimum building height: ${tileset.properties.height.minimum}`);
See:
readonly resource : Resource
readonly root : Cesium3DTile
Enabling shadows has a performance impact. A tileset that casts shadows must be rendered twice, once from the camera and again from the light's point of view.
Shadows are rendered only when Viewer#shadows
is true
.
-
Default Value:
ShadowMode.ENABLED
-
Default Value:
true
-
Default Value:
false
-
Default Value:
true
The common strategy for replacement-refinement traversal is to store all levels of the tree in memory and require all children to be loaded before the parent can refine. With this optimization levels of the tree can be skipped entirely and children can be rendered alongside their parents. The tileset requires significantly less memory when using this optimization.
-
Default Value:
false
Only used when Cesium3DTileset#skipLevelOfDetail
is true
.
-
Default Value:
1
<= 100 / skipScreenSpaceErrorFactor
.
Only used when Cesium3DTileset#skipLevelOfDetail
is true
.
-
Default Value:
16
splitDirection : SplitDirection
SplitDirection
to apply to this tileset.
-
Default Value:
SplitDirection.NONE
style : Cesium3DTileStyle|undefined
Assign undefined
to remove the style, which will restore the visual
appearance of the tileset to its default when no style was applied.
The style is applied to a tile before the Cesium3DTileset#tileVisible
event is raised, so code in tileVisible
can manually set a feature's
properties (e.g. color and show) after the style is applied. When
a new style is assigned any manually set properties are overwritten.
Use an always "true" condition to specify the Color for all objects that are not overridden by pre-existing conditions. Otherwise, the default color Cesium.Color.White will be used. Similarly, use an always "true" condition to specify the show property for all objects that are not overridden by pre-existing conditions. Otherwise, the default show value true will be used.
-
Default Value:
undefined
Example:
tileset.style = new Cesium.Cesium3DTileStyle({
color : {
conditions : [
['${Height} >= 100', 'color("purple", 0.5)'],
['${Height} >= 50', 'color("red")'],
['true', 'color("blue")']
]
},
show : '${Height} > 0',
meta : {
description : '"Building id ${id} has height ${Height}."'
}
});
See:
tileFailed : Event
If there are no event listeners, error messages will be logged to the console.
The error object passed to the listener contains two properties:
url
: the url of the failed tile.message
: the error message.
If multiple contents are present, this event is raised once per inner content with errors.
-
Default Value:
new Event()
Example:
tileset.tileFailed.addEventListener(function(error) {
console.log(`An error occurred loading tile: ${error.url}`);
console.log(`Error: ${error.message}`);
});
tileLoad : Event
The loaded Cesium3DTile
is passed to the event listener.
This event is fired during the tileset traversal while the frame is being rendered so that updates to the tile take effect in the same frame. Do not create or modify Cesium entities or primitives during the event listener.
-
Default Value:
new Event()
Example:
tileset.tileLoad.addEventListener(function(tile) {
console.log('A tile was loaded.');
});
true
, all tiles that meet the screen space error this frame are loaded. The tileset is
completely loaded for this view.
-
Default Value:
false
See:
tileUnload : Event
The unloaded Cesium3DTile
is passed to the event listener.
This event is fired immediately before the tile's content is unloaded while the frame is being rendered so that the event listener has access to the tile's content. Do not create or modify Cesium entities or primitives during the event listener.
-
Default Value:
new Event()
Example:
tileset.tileUnload.addEventListener(function(tile) {
console.log('A tile was unloaded from the cache.');
});
See:
tileVisible : Event
The visible Cesium3DTile
is passed to the event listener.
This event is fired during the tileset traversal while the frame is being rendered so that updates to the tile take effect in the same frame. Do not create or modify Cesium entities or primitives during the event listener.
-
Default Value:
new Event()
Examples:
tileset.tileVisible.addEventListener(function(tile) {
if (tile.content instanceof Cesium.Model3DTileContent) {
console.log('A 3D model tile is visible.');
}
});
// Apply a red style and then manually set random colors for every other feature when the tile becomes visible.
tileset.style = new Cesium.Cesium3DTileStyle({
color : 'color("red")'
});
tileset.tileVisible.addEventListener(function(tile) {
const content = tile.content;
const featuresLength = content.featuresLength;
for (let i = 0; i < featuresLength; i+=2) {
content.getFeature(i).color = Cesium.Color.fromRandom();
}
});
-
Default Value:
false
Experimental
This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
Cesium3DTileFeature.getPolylinePositions
.
-
Default Value:
false
Experimental
This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
Methods
static Cesium.Cesium3DTileset.fromIonAssetId(assetId, options) → Promise.<Cesium3DTileset>
Name | Type | Description |
---|---|---|
assetId |
number | The Cesium ion asset id. |
options |
Cesium3DTileset.ConstructorOptions | optional An object describing initialization options |
Returns:
Throws:
-
RuntimeError : When the tileset asset version is not 0.0, 1.0, or 1.1, or when the tileset contains a required extension that is not supported.
- Cesium3DTileset#fromUrl
Example:
// Load a Cesium3DTileset with a Cesium ion asset ID of 124624234
try {
const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(124624234);
scene.primitives.add(tileset);
} catch (error) {
console.error(`Error creating tileset: ${error}`);
}
See:
static Cesium.Cesium3DTileset.fromUrl(url, options) → Promise.<Cesium3DTileset>
Name | Type | Description |
---|---|---|
url |
Resource | string | The url to a tileset JSON file. |
options |
Cesium3DTileset.ConstructorOptions | optional An object describing initialization options |
Returns:
Throws:
-
RuntimeError : When the tileset asset version is not 0.0, 1.0, or 1.1, or when the tileset contains a required extension that is not supported.
- Cesium3DTileset#fromIonAssetId
Examples:
try {
const tileset = await Cesium.Cesium3DTileset.fromUrl(
"http://localhost:8002/tilesets/Seattle/tileset.json"
);
scene.primitives.add(tileset);
} catch (error) {
console.error(`Error creating tileset: ${error}`);
}
// Common setting for the skipLevelOfDetail optimization
const tileset = await Cesium.Cesium3DTileset.fromUrl(
"http://localhost:8002/tilesets/Seattle/tileset.json", {
skipLevelOfDetail: true,
baseScreenSpaceError: 1024,
skipScreenSpaceErrorFactor: 16,
skipLevels: 1,
immediatelyLoadDesiredLevelOfDetail: false,
loadSiblings: false,
cullWithChildrenBounds: true
});
scene.primitives.add(tileset);
// Common settings for the dynamicScreenSpaceError optimization
const tileset = await Cesium.Cesium3DTileset.fromUrl(
"http://localhost:8002/tilesets/Seattle/tileset.json", {
dynamicScreenSpaceError: true,
dynamicScreenSpaceErrorDensity: 2.0e-4,
dynamicScreenSpaceErrorFactor: 24.0,
dynamicScreenSpaceErrorHeightFalloff: 0.25
});
scene.primitives.add(tileset);
See:
Name | Type | Description |
---|---|---|
tilesetUrl |
Resource | string | The url of the json file to be fetched |
Returns:
Once an object is destroyed, it should not be used; calling any function other than
isDestroyed
will result in a DeveloperError
exception. Therefore,
assign the return value (undefined
) to the object as done in the example.
Throws:
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
Example:
tileset = tileset && tileset.destroy();
See:
Name | Type | Description |
---|---|---|
cartographic |
Cartographic | The cartographic for which to find the height. |
scene |
Scene | The scene where visualization is taking place. |
Returns:
Example:
const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(124624234);
scene.primitives.add(tileset);
const height = tileset.getHeight(scene.camera.positionCartographic, scene);
true
if the tileset JSON file lists the extension in extensionsUsed; otherwise, false
.
Name | Type | Description |
---|---|---|
extensionName |
string | The name of the extension to check. |
Returns:
true
if the tileset JSON file lists the extension in extensionsUsed; otherwise, false
.
If this object was destroyed, it should not be used; calling any function other than
isDestroyed
will result in a DeveloperError
exception.
Returns:
true
if this object was destroyed; otherwise, false
.
Cesium3DTileset#style
as dirty, which forces all
features to re-evaluate the style in the next frame each is visible.
Cesium3DTileset#cacheBytes
.
Tile unloads occur at the next frame to keep all the WebGL delete calls within the render loop.
Type Definitions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
show |
boolean |
<optional> |
true | Determines if the tileset will be shown. |
modelMatrix |
Matrix4 |
<optional> |
Matrix4.IDENTITY | A 4x4 transformation matrix that transforms the tileset's root tile. |
modelUpAxis |
Axis |
<optional> |
Axis.Y | Which axis is considered up when loading models for tile contents. |
modelForwardAxis |
Axis |
<optional> |
Axis.X | Which axis is considered forward when loading models for tile contents. |
shadows |
ShadowMode |
<optional> |
ShadowMode.ENABLED | Determines whether the tileset casts or receives shadows from light sources. |
maximumScreenSpaceError |
number |
<optional> |
16 | The maximum screen space error used to drive level of detail refinement. |
cacheBytes |
number |
<optional> |
536870912 | The size (in bytes) to which the tile cache will be trimmed, if the cache contains tiles not needed for the current view. |
maximumCacheOverflowBytes |
number |
<optional> |
536870912 | The maximum additional memory (in bytes) to allow for cache headroom, if more than Cesium3DTileset#cacheBytes are needed for the current view. |
cullWithChildrenBounds |
boolean |
<optional> |
true | Optimization option. Whether to cull tiles using the union of their children bounding volumes. |
cullRequestsWhileMoving |
boolean |
<optional> |
true | Optimization option. Don't request tiles that will likely be unused when they come back because of the camera's movement. This optimization only applies to stationary tilesets. |
cullRequestsWhileMovingMultiplier |
number |
<optional> |
60.0 | Optimization option. Multiplier used in culling requests while moving. Larger is more aggressive culling, smaller less aggressive culling. |
preloadWhenHidden |
boolean |
<optional> |
false | Preload tiles when tileset.show is false . Loads tiles as if the tileset is visible but does not render them. |
preloadFlightDestinations |
boolean |
<optional> |
true | Optimization option. Preload tiles at the camera's flight destination while the camera is in flight. |
preferLeaves |
boolean |
<optional> |
false | Optimization option. Prefer loading of leaves first. |
dynamicScreenSpaceError |
boolean |
<optional> |
true | Optimization option. For street-level horizon views, use lower resolution tiles far from the camera. This reduces the amount of data loaded and improves tileset loading time with a slight drop in visual quality in the distance. |
dynamicScreenSpaceErrorDensity |
number |
<optional> |
2.0e-4 | Similar to Fog#density , this option controls the camera distance at which the Cesium3DTileset#dynamicScreenSpaceError optimization applies. Larger values will cause tiles closer to the camera to be affected. |
dynamicScreenSpaceErrorFactor |
number |
<optional> |
24.0 | A parameter that controls the intensity of the Cesium3DTileset#dynamicScreenSpaceError optimization for tiles on the horizon. Larger values cause lower resolution tiles to load, improving runtime performance at a slight reduction of visual quality. |
dynamicScreenSpaceErrorHeightFalloff |
number |
<optional> |
0.25 | A ratio of the tileset's height that determines where "street level" camera views occur. When the camera is below this height, the Cesium3DTileset#dynamicScreenSpaceError optimization will have the maximum effect, and it will roll off above this value. |
progressiveResolutionHeightFraction |
number |
<optional> |
0.3 | Optimization option. If between (0.0, 0.5], tiles at or above the screen space error for the reduced screen resolution of progressiveResolutionHeightFraction*screenHeight will be prioritized first. This can help get a quick layer of tiles down while full resolution tiles continue to load. |
foveatedScreenSpaceError |
boolean |
<optional> |
true | Optimization option. Prioritize loading tiles in the center of the screen by temporarily raising the screen space error for tiles around the edge of the screen. Screen space error returns to normal once all the tiles in the center of the screen as determined by the Cesium3DTileset#foveatedConeSize are loaded. |
foveatedConeSize |
number |
<optional> |
0.1 | Optimization option. Used when Cesium3DTileset#foveatedScreenSpaceError is true to control the cone size that determines which tiles are deferred. Tiles that are inside this cone are loaded immediately. Tiles outside the cone are potentially deferred based on how far outside the cone they are and their screen space error. This is controlled by Cesium3DTileset#foveatedInterpolationCallback and Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation . Setting this to 0.0 means the cone will be the line formed by the camera position and its view direction. Setting this to 1.0 means the cone encompasses the entire field of view of the camera, disabling the effect. |
foveatedMinimumScreenSpaceErrorRelaxation |
number |
<optional> |
0.0 | Optimization option. Used when Cesium3DTileset#foveatedScreenSpaceError is true to control the starting screen space error relaxation for tiles outside the foveated cone. The screen space error will be raised starting with tileset value up to Cesium3DTileset#maximumScreenSpaceError based on the provided Cesium3DTileset#foveatedInterpolationCallback . |
foveatedInterpolationCallback |
Cesium3DTileset.foveatedInterpolationCallback |
<optional> |
Math.lerp | Optimization option. Used when Cesium3DTileset#foveatedScreenSpaceError is true to control how much to raise the screen space error for tiles outside the foveated cone, interpolating between Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation and Cesium3DTileset#maximumScreenSpaceError |
foveatedTimeDelay |
number |
<optional> |
0.2 | Optimization option. Used when Cesium3DTileset#foveatedScreenSpaceError is true to control how long in seconds to wait after the camera stops moving before deferred tiles start loading in. This time delay prevents requesting tiles around the edges of the screen when the camera is moving. Setting this to 0.0 will immediately request all tiles in any given view. |
skipLevelOfDetail |
boolean |
<optional> |
false | Optimization option. Determines if level of detail skipping should be applied during the traversal. |
baseScreenSpaceError |
number |
<optional> |
1024 | When skipLevelOfDetail is true , the screen space error that must be reached before skipping levels of detail. |
skipScreenSpaceErrorFactor |
number |
<optional> |
16 | When skipLevelOfDetail is true , a multiplier defining the minimum screen space error to skip. Used in conjunction with skipLevels to determine which tiles to load. |
skipLevels |
number |
<optional> |
1 | When skipLevelOfDetail is true , a constant defining the minimum number of levels to skip when loading tiles. When it is 0, no levels are skipped. Used in conjunction with skipScreenSpaceErrorFactor to determine which tiles to load. |
immediatelyLoadDesiredLevelOfDetail |
boolean |
<optional> |
false | When skipLevelOfDetail is true , only tiles that meet the maximum screen space error will ever be downloaded. Skipping factors are ignored and just the desired tiles are loaded. |
loadSiblings |
boolean |
<optional> |
false | When skipLevelOfDetail is true , determines whether siblings of visible tiles are always downloaded during traversal. |
clippingPlanes |
ClippingPlaneCollection |
<optional> |
The ClippingPlaneCollection used to selectively disable rendering the tileset. |
|
clippingPolygons |
ClippingPolygonCollection |
<optional> |
The ClippingPolygonCollection used to selectively disable rendering the tileset. |
|
classificationType |
ClassificationType |
<optional> |
Determines whether terrain, 3D Tiles or both will be classified by this tileset. See Cesium3DTileset#classificationType for details about restrictions and limitations. |
|
ellipsoid |
Ellipsoid |
<optional> |
Ellipsoid.WGS84 | The ellipsoid determining the size and shape of the globe. |
pointCloudShading |
object |
<optional> |
Options for constructing a PointCloudShading object to control point attenuation based on geometric error and lighting. |
|
lightColor |
Cartesian3 |
<optional> |
The light color when shading models. When undefined the scene's light color is used instead. |
|
imageBasedLighting |
ImageBasedLighting |
<optional> |
The properties for managing image-based lighting for this tileset. | |
backFaceCulling |
boolean |
<optional> |
true | Whether to cull back-facing geometry. When true, back face culling is determined by the glTF material's doubleSided property; when false, back face culling is disabled. |
enableShowOutline |
boolean |
<optional> |
true | Whether to enable outlines for models using the CESIUM_primitive_outline extension. This can be set to false to avoid the additional processing of geometry at load time. When false, the showOutlines and outlineColor options are ignored. |
showOutline |
boolean |
<optional> |
true | Whether to display the outline for models using the CESIUM_primitive_outline extension. When true, outlines are displayed. When false, outlines are not displayed. |
outlineColor |
Color |
<optional> |
Color.BLACK | The color to use when rendering outlines. |
vectorClassificationOnly |
boolean |
<optional> |
false | Indicates that only the tileset's vector tiles should be used for classification. |
vectorKeepDecodedPositions |
boolean |
<optional> |
false | Whether vector tiles should keep decoded positions in memory. This is used with Cesium3DTileFeature.getPolylinePositions . |
featureIdLabel |
string | number |
<optional> |
"featureId_0" | Label of the feature ID set to use for picking and styling. For EXT_mesh_features, this is the feature ID's label property, or "featureId_N" (where N is the index in the featureIds array) when not specified. EXT_feature_metadata did not have a label field, so such feature ID sets are always labeled "featureId_N" where N is the index in the list of all feature Ids, where feature ID attributes are listed before feature ID textures. If featureIdLabel is an integer N, it is converted to the string "featureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority. |
instanceFeatureIdLabel |
string | number |
<optional> |
"instanceFeatureId_0" | Label of the instance feature ID set used for picking and styling. If instanceFeatureIdLabel is set to an integer N, it is converted to the string "instanceFeatureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority. |
showCreditsOnScreen |
boolean |
<optional> |
false | Whether to display the credits of this tileset on screen. |
splitDirection |
SplitDirection |
<optional> |
SplitDirection.NONE | The SplitDirection split to apply to this tileset. |
enableCollision |
boolean |
<optional> |
false | When true , enables collisions for camera or CPU picking. While this is true the camera will be prevented from going below the tileset surface if ScreenSpaceCameraController#enableCollisionDetection is true. |
projectTo2D |
boolean |
<optional> |
false | Whether to accurately project the tileset to 2D. If this is true, the tileset will be projected accurately to 2D, but it will use more memory to do so. If this is false, the tileset will use less memory and will still render in 2D / CV mode, but its projected positions may be inaccurate. This cannot be set after the tileset has been created. |
enablePick |
boolean |
<optional> |
false | Whether to allow collision and CPU picking with pick when using WebGL 1. If using WebGL 2 or above, this option will be ignored. If using WebGL 1 and this is true, the pick operation will work correctly, but it will use more memory to do so. If running with WebGL 1 and this is false, the model will use less memory, but pick will always return undefined . This cannot be set after the tileset has loaded. |
debugHeatmapTilePropertyName |
string |
<optional> |
The tile variable to colorize as a heatmap. All rendered tiles will be colorized relative to each other's specified variable value. | |
debugFreezeFrame |
boolean |
<optional> |
false | For debugging only. Determines if only the tiles from last frame should be used for rendering. |
debugColorizeTiles |
boolean |
<optional> |
false | For debugging only. When true, assigns a random color to each tile. |
enableDebugWireframe |
boolean |
<optional> |
false | For debugging only. This must be true for debugWireframe to work in WebGL1. This cannot be set after the tileset has been created. |
debugWireframe |
boolean |
<optional> |
false | For debugging only. When true, render's each tile's content as a wireframe. |
debugShowBoundingVolume |
boolean |
<optional> |
false | For debugging only. When true, renders the bounding volume for each tile. |
debugShowContentBoundingVolume |
boolean |
<optional> |
false | For debugging only. When true, renders the bounding volume for each tile's content. |
debugShowViewerRequestVolume |
boolean |
<optional> |
false | For debugging only. When true, renders the viewer request volume for each tile. |
debugShowGeometricError |
boolean |
<optional> |
false | For debugging only. When true, draws labels to indicate the geometric error of each tile. |
debugShowRenderingStatistics |
boolean |
<optional> |
false | For debugging only. When true, draws labels to indicate the number of commands, points, triangles and features for each tile. |
debugShowMemoryUsage |
boolean |
<optional> |
false | For debugging only. When true, draws labels to indicate the texture and geometry memory in megabytes used by each tile. |
debugShowUrl |
boolean |
<optional> |
false | For debugging only. When true, draws labels to indicate the url of each tile. |
Cesium3DTileset#foveatedScreenSpaceError
is true to control how much to raise the screen space error for tiles outside the foveated cone,
interpolating between Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation
and Cesium3DTileset#maximumScreenSpaceError
.
Name | Type | Description |
---|---|---|
p |
number | The start value to interpolate. |
q |
number | The end value to interpolate. |
time |
number |
The time of interpolation generally in the range [0.0, 1.0] . |
Returns:
-
Default Value:
Math.lerp