English中文

Cesium3DTileset

new Cesium.Cesium3DTileset(options)

A 3D Tiles tileset,用于流式传输海量异构 3D 地理空间数据集。 , used for streaming massive heterogeneous 3D geospatial datasets.
该对象通常不直接实例化,使用 This object is normally not instantiated directly, use Cesium3DTileset.fromUrl.
名称 Name 类型 Type 说明 Description
options Cesium3DTileset.ConstructorOptions 描述初始化选项的对象 An object describing initialization options
抛出: Throws:
示例: 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);
实验性 Experimental

支持使用 glTF 扩展草案加载通过 SPZ 压缩编码的高斯 splats 内容 Support for loading Gaussian splats content encoded with SPZ compression using the draft glTF extensions KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 是实验性的,如果没有Cesium的标准弃用政策,可能会发生变化。 is experimental and is subject change without Cesium's standard deprecation policy.

另见: See:

成员 Members

触发该事件以指示加载此帧满足屏幕空间错误的所有图块。该视图的图块集已完全加载。 The event fired to indicate that all tiles that meet the screen space error this frame are loaded. The tileset is completely loaded for this view.

该事件在场景渲染后的帧末尾触发。 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:
获取图块集的资产对象属性,其中包含有关图块集的元数据。 Gets the tileset's asset object property, which contains metadata about the tileset.

请参阅 See the asset schema reference 在 3D Tiles 规范中查看完整的属性集。 in the 3D Tiles spec for the full set of properties.

backFaceCulling : boolean

是否剔除背面几何体。当为 true 时,背面剔除由 glTF 材质的 doubleSided 属性决定;当为 false 时,背面剔除被禁用。 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.
默认值: Default Value: true

readonly deprecated basePath : string

tileset JSON 文件中的非绝对路径相对于的基本路径。 The base path that non-absolute paths in tileset JSON file are relative to.

已弃用: Deprecated: true

baseScreenSpaceError : number

在跳过详细级别之前必须达到的屏幕空间错误。 The screen space error that must be reached before skipping levels of detail.

仅在以下情况下使用 Only used when Cesium3DTileset#skipLevelOfDetail is true.

默认值: Default Value: 1024
图块集的边界球体。 The tileset's bounding sphere.
示例: 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));
用于缓存切片的 GPU 内存量(以字节为单位)。此内存使用量是根据加载图块的几何形状、纹理和批处理表纹理来估计的。对于点云,该值还包括每点元数据。 The amount of GPU memory (in bytes) used to cache tiles. This memory usage is estimated from geometry, textures, and batch table textures of loaded tiles. For point clouds, this value also includes per-point metadata.

不在视图中的图块将被卸载以强制执行此操作。 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 是 500000,但是需要 600000 字节的图块才能满足屏幕空间误差,则可以加载 600000 字节的图块(如果 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 至少为 100000)。当这些图块消失在视野之外时,它们将被卸载。 is at least 100000). When these tiles go out of view, they will be unloaded.

默认值: Default Value: 536870912
另见: See:
确定地形、3D 图块或两者是否将由此图块集进行分类。 Determines whether terrain, 3D Tiles, or both will be classified by this tileset.

此选项仅适用于包含批处理 3D 模型、glTF 内容、几何数据或矢量数据的图块集。即使未定义,矢量和几何数据也必须渲染为分类,并且默认在地形和其他 3D Tiles 图块集上渲染。 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.

当启用批量 3D 模型和 glTF 图块集时,glTF 有一些要求/限制: When enabled for batched 3D model and glTF tilesets, there are a few requirements/limitations on the glTF:

  • glTF 不能包含变形目标、皮肤或动画。 The glTF cannot contain morph targets, skins, or animations.
  • glTF 不能包含 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 _BATCHIDs 和索引缓冲区都存在,具有相同批次 id 的所有索引必须占用索引缓冲区的连续部分。 s and an index buffer are both present, all indices with the same batch id must occupy contiguous sections of the index buffer.
  • If _BATCHIDs 没有索引缓冲区,具有相同批次 id 的所有位置必须占用位置缓冲区的连续部分。 s are present with no index buffer, all positions with the same batch id must occupy contiguous sections of the position buffer.

此外,点或实例 3D 模型不支持分类。 Additionally, classification is not supported for points or instanced 3D models.

接受分类的 3D 图块或地形必须是不透明的。 The 3D Tiles or terrain receiving the classification must be opaque.

默认值: Default Value: undefined
实验性 Experimental

此功能使用的是 3D Tiles 规范的一部分,该规范不是最终版本,并且可能会在没有 Cesium 的标准弃用政策的情况下进行更改。 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.

The ClippingPlaneCollection 用于有选择地禁用渲染图块集。 used to selectively disable rendering the tileset.
The ClippingPolygonCollection 用于有选择地禁用渲染图块集。 used to selectively disable rendering the tileset.

colorBlendAmount : number

定义用于在源颜色和特征颜色之间进行线性插值的值。 Defines the value used to linearly interpolate between the source color and feature color when the Cesium3DTileset#colorBlendMode is MIX。值 0.0 会产生源颜色,而值 1.0 会产生特征颜色,中间的任何值都会产生源颜色和特征颜色的混合。 . 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
定义从 Cesium API 或声明式样式设置的每个功能颜色如何与原始功能的源颜色混合,例如glTF 材质或图块中的每点颜色。 Defines how per-feature colors set from the Cesium API or declarative styling blend with the source colors from the original feature, e.g. glTF material or per-point color in the tile.
默认值: Default Value: Cesium3DTileColorBlendMode.HIGHLIGHT

cullRequestsWhileMoving : boolean

优化选项。不要请求由于相机移动而返回时可能不会使用的图块。此优化仅适用于固定图块集。 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.
默认值: Default Value: true

cullRequestsWhileMovingMultiplier : number

优化选项。移动时用于剔除请求的乘数。较大的是更积极的剔除,较小的是较不积极的剔除。 Optimization option. Multiplier used in culling requests while moving. Larger is more aggressive culling, smaller less aggressive culling.
默认值: Default Value: 60.0
应用于图块集中所有图块的自定义着色器。仅用于使用的内容 A custom shader to apply to all tiles in the tileset. Only used for contents that use Model。使用自定义着色器 . Using custom shaders with a Cesium3DTileStyle 可能会导致未定义的行为。 may lead to undefined behavior.
默认值: Default Value: undefined
实验性 Experimental

此功能使用的是 3D Tiles 规范的一部分,该规范不是最终版本,并且可能会在没有 Cesium 的标准弃用政策的情况下进行更改。 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.

debugColorizeTiles : boolean

该属性仅用于调试;它没有针对生产用途进行优化。 This property is for debugging only; it is not optimized for production use.

如果为 true,则为每个图块分配随机颜色。这对于可视化哪些特征属于哪些图块非常有用,尤其是在附加细化的情况下,来自父图块的特征可能与来自子图块的特征交错。 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

debugFreezeFrame : boolean

该属性仅用于调试;它没有针对生产用途进行优化。 This property is for debugging only; it is not optimized for production use.

确定是否仅使用最后一帧的图块进行渲染。这有效地将图块集“冻结”到前一帧,因此可以缩小并查看渲染的内容。 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

debugShowBoundingVolume : boolean

该属性仅用于调试;它没有针对生产用途进行优化。 This property is for debugging only; it is not optimized for production use.

如果为 true,则渲染每个可见图块的边界体积。如果图块具有内容包围体或者为空,则包围体为白色;否则,它是红色的。不满足屏幕空间错误且仍在对其后代进行细化的图块为黄色。 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

debugShowContentBoundingVolume : boolean

该属性仅用于调试;它没有针对生产用途进行优化。 This property is for debugging only; it is not optimized for production use.

如果为 true,则渲染每个可见图块内容的边界体积。如果图块具有内容包围体,则包围体为蓝色;否则它是红色的。 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

debugShowGeometricError : boolean

该属性仅用于调试;它没有针对生产用途进行优化。 This property is for debugging only; it is not optimized for production use.

如果为 true,则绘制标签以指示每个图块的几何误差。 When true, draws labels to indicate the geometric error of each tile.

默认值: Default Value: false

debugShowMemoryUsage : boolean

该属性仅用于调试;它没有针对生产用途进行优化。 This property is for debugging only; it is not optimized for production use.

如果为 true,则绘制标签以指示每个图块的几何形状和纹理内存使用情况。 When true, draws labels to indicate the geometry and texture memory usage of each tile.

默认值: Default Value: false

debugShowRenderingStatistics : boolean

该属性仅用于调试;它没有针对生产用途进行优化。 This property is for debugging only; it is not optimized for production use.

如果为 true,则绘制标签来指示每个图块的命令、点、三角形和特征的数量。 When true, draws labels to indicate the number of commands, points, triangles and features of each tile.

默认值: Default Value: false
该属性仅用于调试;它没有针对生产用途进行优化。 This property is for debugging only; it is not optimized for production use.

如果为 true,则绘制标签来指示每个图块的 url。 When true, draws labels to indicate the url of each tile.

默认值: Default Value: false

debugShowViewerRequestVolume : boolean

该属性仅用于调试;它没有针对生产用途进行优化。 This property is for debugging only; it is not optimized for production use.

如果为 true,则呈现每个图块的查看器请求量。 When true, renders the viewer request volume for each tile.

默认值: Default Value: false
该属性仅用于调试;它没有针对生产用途进行优化。 This property is for debugging only; it is not optimized for production use.

如果为 true,则将每个图块的内容呈现为线框。 When true, renders each tile's content as a wireframe.

默认值: Default Value: false

dynamicScreenSpaceError : boolean

优化选项。对于街道水平视图,请使用远离相机的较低分辨率图块。这减少了加载的数据量并缩短了图块集加载时间,但远处的视觉质量略有下降。 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.

当相机靠近图块集的地平面并看着地平线时,这种优化效果最强。此外,对于紧密拟合的边界体积(例如盒子和区域),结果更加准确。 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

dynamicScreenSpaceErrorDensity : number

类似于 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. This value must be non-negative.

这种优化的工作原理是通过像钟形曲线一样随相机距离滚动平铺屏幕空间误差 (SSE)。这会产生选择远离相机的较低分辨率图块的效果。靠近相机,不进行任何调整。对于更远的瓷砖,SSE 减少最多 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.

当密度为 0 时,优化对图块集没有影响。 When the density is 0, the optimization will have no effect on the tileset.

默认值: Default Value: 2.0e-4

dynamicScreenSpaceErrorFactor : number

控制强度的参数 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. The value must be non-negative.

更具体地说,此参数表示对远离相机的图块的屏幕空间误差 (SSE)(以像素为单位)的最大调整。参见 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.

当SSE因子设置为0时,优化将不会对tileset产生影响。 When the SSE factor is set to 0, the optimization will have no effect on the tileset.

默认值: Default Value: 24.0

dynamicScreenSpaceErrorHeightFalloff : number

决定“街道高度”的图块集高度的比率 A ratio of the tileset's height that determines "street level" for the Cesium3DTileset#dynamicScreenSpaceError 优化。当相机低于此高度时,动态屏幕空间误差优化将发挥最大效果,高于此值时会衰减。有效值介于 0.0 和 1.0 之间。 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
获取描述地球形状的椭球体。 Gets an ellipsoid describing the shape of the globe.

enableCollision : boolean

If 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
用于管理动态环境的属性映射在此模型上。影响照明。 The properties for managing dynamic environment maps on this model. Affects lighting.
示例: 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");

examineVectorLinesFunction : function

用于在流式传输时检查矢量线的功能。 Function for examining vector lines as they are being streamed.
实验性 Experimental

此功能使用的是 3D Tiles 规范的一部分,该规范不是最终版本,并且可能会在没有 Cesium 的标准弃用政策的情况下进行更改。 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.

readonly extensions : object

获取图块集的扩展对象属性。 Gets the tileset's extensions object property.
返回 Returns the extras 位于tileset JSON 顶层的属性,其中包含应用程序特定的元数据。退货 property at the top-level of the tileset JSON, which contains application specific metadata. Returns undefined if extras 不存在。 does not exist.
另见: See:
用于拾取和设计样式的要素 ID 集的标签。 Label of the feature ID set to use for picking and styling.

对于 EXT_mesh_features,这是要素 ID 的标签属性,如果未指定,则为“featureId_N”(其中 N 是 featureIds 数组中的索引)。 EXT_feature_metadata 没有标签字段,因此此类要素 ID 集始终标记为“featureId_N”,其中 N 是所有要素 Id 列表中的索引,其中要素 ID 属性列在要素 ID 纹理之前。 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.

如果featureIdLabel设置为整数N,则会自动转换为字符串“featureId_N”。如果每个基元和每个实例的功能 ID 均存在,则实例功能 ID 优先。 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

此功能使用的是 3D Tiles 规范的一部分,该规范不是最终版本,并且可能会在没有 Cesium 的标准弃用政策的情况下进行更改。 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.

优化选项。使用时 Optimization option. Used when Cesium3DTileset#foveatedScreenSpaceError 为 true 来控制确定延迟哪些图块的锥体大小。位于该锥体内的图块会立即加载。圆锥体外部的图块可能会根据它们在圆锥体外部的距离而延迟,并且 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。将其设置为 0.0 意味着圆锥体将是由摄像机位置及其视图方向形成的线。将其设置为 1.0 意味着圆锥体包含相机的整个视野​​,从本质上禁用该效果。 . 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
获取或设置一个回调,以控制对凹锥体外部的图块提高屏幕空间误差的程度,并在两者之间进行插值 Gets or sets a callback to control how much to raise the screen space error for tiles outside the foveated cone, interpolating between Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation and Cesium3DTileset#maximumScreenSpaceError.

foveatedMinimumScreenSpaceErrorRelaxation : number

优化选项。使用时 Optimization option. Used when Cesium3DTileset#foveatedScreenSpaceError 为 true 来控制凹锥体外部图块的起始屏幕空间误差松弛。屏幕空间错误将从该值开始直至 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

foveatedScreenSpaceError : boolean

优化选项。通过暂时提高屏幕边缘周围图块的屏幕空间误差,优先加载屏幕中心的图块。一旦所有图块都位于屏幕中心,屏幕空间误差将恢复正常 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.
默认值: Default Value: true

foveatedTimeDelay : number

优化选项。使用时 Optimization option. Used when Cesium3DTileset#foveatedScreenSpaceError true 控制相机停止移动后延迟图块开始加载之前等待的时间(以秒为单位)。此时间延迟可防止在相机移动时请求屏幕边缘周围的图块。将其设置为 0.0 将立即请求任何给定视图中的所有图块。 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

readonly heightReference : HeightReference|undefined

指定高度是否相对于地形、3D 切片或两者。 Specifies if the height is relative to terrain, 3D Tiles, or both.

此选项仅适用于包含矢量数据的切片集中的点要素。此选项需要通过 options.scene 传入查看器场景。 This option is only applied to point features in tilesets containing vector data. This option requires the Viewer's scene to be passed in through options.scene.

默认值: Default Value: undefined
实验性 Experimental

此功能使用的是 3D Tiles 规范的一部分,该规范不是最终版本,并且可能会在没有 Cesium 的标准弃用政策的情况下进行更改。 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.

用于管理此图块集上基于图像的照明的属性。 The properties for managing image-based lighting on this tileset.
的集合 The collection of ImageryLayer 提供将在图块集上渲染的 2D 地理参考图像数据的对象。图像将覆盖在 glTF、B3DM、PNTS 或 GeoJSON 切片内容上。 objects providing 2D georeferenced image data that will be rendered over the tileset. The imagery will be draped over glTF, B3DM, PNTS, or GeoJSON tile content.
示例: Example:
// Drape Bing Maps Aerial imagery over the tileset
const imageryProvider = await Cesium.createWorldImageryAsync({
  style: Cesium.IonWorldImageryStyle.AERIAL,
});
const imageryLayer = new ImageryLayer(imageryProvider);
tileset.imageryLayers.add(imageryLayer);
实验性 Experimental

此功能不是最终版本,可能会在没有 Cesium 标准弃用政策的情况下进行更改。 This feature is not final and is subject to change without Cesium's standard deprecation policy.

另见: See:

immediatelyLoadDesiredLevelOfDetail : boolean

如果为 true,则只会下载满足最大屏幕空间错误的图块。忽略跳过因素,仅加载所需的图块。 When 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.

仅在以下情况下使用 Only used when Cesium3DTileset#skipLevelOfDetail is true.

默认值: Default Value: false
触发该事件以指示加载此帧满足屏幕空间错误的所有图块。当加载初始视图中的所有图块时,会触发此事件一次。 The event fired to indicate that all tiles that meet the screen space error this frame are loaded. This event is fired once when all tiles in the initial view are loaded.

该事件在场景渲染后的帧末尾触发。 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:

instanceFeatureIdLabel : string

用于拾取和样式化的实例功能 ID 集的标签。 Label of the instance feature ID set used for picking and styling.

如果instanceFeatureIdLabel设置为整数N,则会自动转换为字符串“instanceFeatureId_N”。如果每个基元和每个实例的功能 ID 均存在,则实例功能 ID 优先。 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

此功能使用的是 3D Tiles 规范的一部分,该规范不是最终版本,并且可能会在没有 Cesium 的标准弃用政策的情况下进行更改。 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.

为模型着色时的浅色。当 The light color when shading models. When 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
触发该事件以指示加载新图块的进度。当请求新图块、请求的图块下载完成以及下载的图块已被处理并准备好渲染时,会触发此事件。 The event fired to indicate progress of loading new tiles. This event is fired when a new tile is requested, when a requested tile is finished downloading, and when a downloaded tile has been processed and is ready to render.

待处理的图块请求数, 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}`);
});
确定在遍历过程中是否始终下载可见图块的同级图块。这对于确保当观看者左转/右转时图块已经可用可能很有用。 Determines whether siblings of visible tiles are always downloaded during traversal. This may be useful for ensuring that tiles are already available when the viewer turns left/right.

仅在以下情况下使用 Only used when Cesium3DTileset#skipLevelOfDetail is true.

默认值: Default Value: false

maximumCacheOverflowBytes : number

用于缓存切片的最大附加 GPU 内存量(以字节为单位)。 The maximum additional amount of GPU memory (in bytes) that will be used to cache tiles.

如果瓷砖尺寸大于 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:

maximumScreenSpaceError : number

用于驱动细节细化级别的最大屏幕空间误差。该值有助于确定图块何时细化为其后代,因此在平衡性能与视觉质量方面发挥着重要作用。 The maximum screen space error used to drive level of detail refinement. This value helps determine when a tile refines to its descendants, and therefore plays a major role in balancing performance with visual quality.

如果半径等于图块的半径的球体,图块的屏幕空间误差大致等于将绘制的像素宽度。 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
一个 4x4 变换矩阵,用于变换整个图块集。 A 4x4 transformation matrix that transforms the entire tileset.
默认值: 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);
渲染轮廓时使用的颜色。 The color to use when rendering outlines.
默认值: Default Value: Color.BLACK
用于根据几何误差和眼罩照明控制点大小的选项。 Options for controlling point size based on geometric error and eye dome lighting.
优化选项。优先装载叶子。 Optimization option. Prefer loading of leaves first.
默认值: Default Value: false

preloadFlightDestinations : boolean

优化选项。当相机在飞行中时,在相机的飞行目的地获取图块。 Optimization option. Fetch tiles at the camera's flight destination while the camera is in flight.
默认值: Default Value: true

preloadWhenHidden : boolean

预加载瓷砖时 Preload tiles when tileset.show is false。加载图块,就像图块集可见一样,但不渲染它们。 . Loads tiles as if the tileset is visible but does not render them.
默认值: Default Value: false

progressiveResolutionHeightFraction : number

优化选项。如果在 (0.0, 0.5] 之间,则在屏幕空间误差处或上方平铺,以降低屏幕分辨率 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.
默认值: Default Value: 0.3

readonly properties : object

获取图块集的属性字典对象,其中包含有关每个要素属性的元数据。 Gets the tileset's properties dictionary object, which contains metadata about per-feature properties.

请参阅 See the properties schema reference 在 3D Tiles 规范中查看完整的属性集。 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:
用于获取tileset JSON文件的资源 The resource used to fetch the tileset JSON file
根瓦。 The root tile.
确定图块集是否投射或接收来自光源的阴影。 Determines whether the tileset casts or receives shadows from light sources.

启用阴影会对性能产生影响。投射阴影的图块集必须渲染两次,一次从相机渲染,另一次从灯光的角度渲染。 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
确定是否显示图块集。 Determines if the tileset will be shown.
默认值: Default Value: true

showCreditsOnScreen : boolean

确定是否在屏幕上显示图块集的制作人员名单 Determines whether the credits of the tileset will be displayed on the screen
默认值: Default Value: false
是否显示模型的轮廓 Whether to display the outline for models using the CESIUM_primitive_outline 扩展。如果为 true,则显示轮廓。如果为 false,则不显示轮廓。 extension. When true, outlines are displayed. When false, outlines are not displayed.
默认值: Default Value: true

skipLevelOfDetail : boolean

优化选项。确定在遍历期间是否应应用跳过细节级别。 Optimization option. Determines if level of detail skipping should be applied during the traversal.

替换细化遍历的常见策略是将树的所有级别存储在内存中,并要求在父级细化之前加载所有子级。通过这种优化,可以完全跳过树的级别,并且可以将子级与父级一起渲染。使用此优化时,图块集需要的内存显着减少。 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
定义加载图块时要跳过的最小级别数的常量。当它为 0 时,不跳过任何级别。例如,如果图块的级别为 1,则不会加载图块,除非它们的级别大于 2。 Constant defining the minimum number of levels to skip when loading tiles. When it is 0, no levels are skipped. For example, if a tile is level 1, no tiles will be loaded unless they are at level greater than 2.

仅在以下情况下使用 Only used when Cesium3DTileset#skipLevelOfDetail is true.

默认值: Default Value: 1

skipScreenSpaceErrorFactor : number

定义要跳过的最小屏幕空间错误的乘数。例如,如果图块的屏幕空间错误为 100,则不会加载图块,除非它们是叶子或存在屏幕空间错误 Multiplier defining the minimum screen space error to skip. For example, if a tile has screen space error of 100, no tiles will be loaded unless they are leaves or have a screen space error <= 100 / skipScreenSpaceErrorFactor.

Only used when Cesium3DTileset#skipLevelOfDetail is true.

Default Value: 16
The SplitDirection to apply to this tileset.
Default Value: SplitDirection.NONE
The style, defined using the 3D Tiles Styling language, applied to each feature in the tileset.

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:
The event fired to indicate that a tile's content failed to load.

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}`);
});
The event fired to indicate that a tile's content was loaded.

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.');
});

readonly tilesLoaded : boolean

When 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:
The event fired to indicate that a tile's content was unloaded.

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:
This event fires once for each visible tile in a frame. This can be used to manually style a tileset.

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();
    }
});

readonly timeSinceLoad : number

Returns the time, in milliseconds, since the tileset was loaded and first updated.

readonly totalMemoryUsageInBytes : number

The total amount of GPU memory in bytes used by the tileset. This value is estimated from geometry, texture, batch table textures, and binary metadata of loaded tiles.
See:

vectorClassificationOnly : boolean

Indicates that only the tileset's vector tiles should be used for classification.
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.

vectorKeepDecodedPositions : boolean

Whether vector tiles should keep decoded positions in memory. This is used with 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>

Creates a 3D Tiles tileset, used for streaming massive heterogeneous 3D geospatial datasets, from a Cesium ion asset ID.
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.
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:
  • Cesium3DTileset#fromUrl

static Cesium.Cesium3DTileset.fromUrl(url, options)Promise.<Cesium3DTileset>

Creates a 3D Tiles tileset, used for streaming massive heterogeneous 3D geospatial datasets.
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.
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:
  • Cesium3DTileset#fromIonAssetId

static Cesium.Cesium3DTileset.loadJson(tilesetUrl)Promise.<object>

Provides a hook to override the method used to request the tileset json useful when fetching tilesets from remote servers
Name Type Description
tilesetUrl Resource | string The url of the json file to be fetched
Returns:
A promise that resolves with the fetched json data
Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object.

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:

getHeight(cartographic, scene)number|undefined

Get the height of the loaded surface at a given cartographic. This function will only take into account meshes for loaded tiles, not neccisarily the most detailed tiles available for a tileset. This function will always return undefined when sampling a point cloud.
Name Type Description
cartographic Cartographic The cartographic for which to find the height.
scene Scene The scene where visualization is taking place.
Returns:
The height of the cartographic or undefined if it could not be found.
Example:
const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(124624234);
scene.primitives.add(tileset);

const height = tileset.getHeight(scene.camera.positionCartographic, scene);

hasExtension(extensionName)boolean

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.
Returns true if this object was destroyed; 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.
See:
Marks the tileset's Cesium3DTileset#style as dirty, which forces all features to re-evaluate the style in the next frame each is visible.
Unloads all tiles that weren't selected the previous frame. This can be used to explicitly manage the tile cache and reduce the total number of tiles loaded below Cesium3DTileset#cacheBytes.

Tile unloads occur at the next frame to keep all the WebGL delete calls within the render loop.

Type Definitions

Cesium.Cesium3DTileset.ConstructorOptions

Initialization options for the Cesium3DTileset constructor
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.
heightReference HeightReference <optional>
Sets the HeightReference for point features in vector tilesets.
scene Scene <optional>
The CesiumWidget#scene that the tileset will be rendered in, required for tilesets that specify a heightReference value for clamping 3D Tiles vector data content- like points, lines, and labels- to terrain or 3D tiles.
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.
environmentMapOptions DynamicEnvironmentMapManager.ConstructorOptions <optional>
The properties for managing dynamic environment maps on 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. This also affects the behavior of HeightReference.CLAMP_TO_GROUND when clamping to 3D Tiles surfaces. If enableCollision is false, entities may not be correctly clamped to the tileset geometry.
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.
asynchronouslyLoadImagery boolean <optional>
false Whether loading imagery that is draped over the tileset should be done asynchronously. If this is true, then tile content will be displayed with its original texture until the imagery texture is loaded. If this is false, then the tile content will not be displayed until the imagery is ready.
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.

Cesium.Cesium3DTileset.foveatedInterpolationCallback(p, q, time)number

Optimization option. Used as a callback 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.
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:
The interpolated value.
Default Value: Math.lerp
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.