Members
ArcGisBaseMapType 枚举默认支持的 ArcGIS 图像切片图层。
Properties:
Name |
Type |
Description |
SATELLITE |
number
|
|
OCEANS |
number
|
|
HILLSHADE |
number
|
|
See:
ArcType定义了连接顶点的路径。
Properties:
Name |
Type |
Description |
NONE |
number
|
不符合椭球表面的直线。 |
GEODESIC |
number
|
遵循测地线路径。 |
RHUMB |
number
|
沿着弯道或斜路走。 |
包含图块集中可用图块的细节级别数。
描述 x、y 和 z 轴以及帮助程序转换函数的枚举。
Properties:
Name |
Type |
Description |
X |
number
|
表示 x 轴。 |
Y |
number
|
表示 y 轴。 |
Z |
number
|
表示 z 轴。 |
必应地图提供的图像类型。
Properties:
Name |
Type |
Description |
AERIAL |
string
|
航拍图像。 |
AERIAL_WITH_LABELS |
string
|
带有道路叠加层的航拍图像。 |
AERIAL_WITH_LABELS_ON_DEMAND |
string
|
带有道路叠加层的航拍图像。 |
ROAD |
string
|
没有额外图像的道路。 |
ROAD_ON_DEMAND |
string
|
没有额外图像的道路。 |
CANVAS_DARK |
string
|
路线图的黑暗版本。 |
CANVAS_LIGHT |
string
|
路线图的轻量级版本。 |
CANVAS_GRAY |
string
|
路线图的灰度版本。 |
ORDNANCE_SURVEY |
string
|
地形测量局图像。此影像仅在英国伦敦地区可见。 |
COLLINS_BART |
string
|
柯林斯·巴特图像。 |
See:
确定如何组合两个像素的值。
Properties:
Name |
Type |
Description |
ADD |
number
|
像素值按组件添加。 这用于半透明的加法混合。 |
SUBTRACT |
number
|
像素值按组件(源 - 目标)减去。 这用于半透明的 Alpha 混合。 |
REVERSE_SUBTRACT |
number
|
按组件减去像素值(目标 - 源)。 |
MIN |
number
|
像素值为最小函数 (min(source, destination)) 提供。
此方程式对每个像素颜色分量起作用。 |
MAX |
number
|
像素值为最大函数 (max(source, destination)) 提供。
此方程式对每个像素颜色分量起作用。 |
确定如何计算混合因子。
Properties:
Name |
Type |
Description |
ZERO |
number
|
混合因子为零。 |
ONE |
number
|
混合因子为 1。 |
SOURCE_COLOR |
number
|
The blend factor is 源颜色。 |
ONE_MINUS_SOURCE_COLOR |
number
|
The blend factor is one minus 源颜色。 |
DESTINATION_COLOR |
number
|
混合因子是目标颜色。 |
ONE_MINUS_DESTINATION_COLOR |
number
|
混合系数为 1 减去目标颜色。 |
SOURCE_ALPHA |
number
|
混合因子是源 Alpha。 |
ONE_MINUS_SOURCE_ALPHA |
number
|
混合系数为 1 减去源 Alpha。 |
DESTINATION_ALPHA |
number
|
混合因子是目标 Alpha。 |
ONE_MINUS_DESTINATION_ALPHA |
number
|
混合因子是 1 减去目标 Alpha。 |
CONSTANT_COLOR |
number
|
混合因子是恒定颜色。 |
ONE_MINUS_CONSTANT_COLOR |
number
|
混合因子为 1 减去常数颜色。 |
CONSTANT_ALPHA |
number
|
混合因子是常数 alpha。 |
ONE_MINUS_CONSTANT_ALPHA |
number
|
混合因子是 1 减去常数 alpha。 |
SOURCE_ALPHA_SATURATE |
number
|
混合因子是饱和的源 Alpha。 |
确定公告牌、点和标签的不透明和半透明部分如何与场景混合。
Properties:
Name |
Type |
Description |
OPAQUE |
number
|
集合中的广告牌、点或标签是完全不透明的。 |
TRANSLUCENT |
number
|
集合中的广告牌、点或标签是完全透明的。 |
OPAQUE_AND_TRANSLUCENT |
number
|
集合中的广告牌、点或标签既不透明又半透明。 |
列举用于与摄像机交互的可用输入。
Properties:
Name |
Type |
Description |
LEFT_DRAG |
number
|
按下鼠标左键,然后移动鼠标并释放按钮。 |
RIGHT_DRAG |
number
|
按下鼠标右键,然后移动鼠标并释放按钮。 |
MIDDLE_DRAG |
number
|
按下鼠标中键,然后移动鼠标并释放按钮。 |
WHEEL |
number
|
滚动鼠标中键。 |
PINCH |
number
|
双指触摸表面。 |
定义从 Cesium API 或声明式样式设置的每个特征颜色如何与
原始特征,例如 glTF 材质或瓦片中的每点颜色。
当使用 REPLACE
或 MIX
且源颜色是 glTF 材质时,该技术必须为
_3DTILESDIFFUSE
diffuse color 参数的语义。否则,仅支持 HIGHLIGHT
。
颜色计算结果为白色 (1.0, 1.0, 1.0) 的特征始终在渲染时不进行颜色混合,而不管
图块集的颜色混合模式。
"techniques": {
"technique0": {
"parameters": {
"diffuse": {
"semantic": "_3DTILESDIFFUSE",
"type": 35666
}
}
}
}
Properties:
Name |
Type |
Description |
HIGHLIGHT |
number
|
将源颜色乘以特征颜色。 |
REPLACE |
number
|
将源颜色替换为特征颜色。 |
MIX |
number
|
将源颜色和特征颜色混合在一起。 |
包含用于检查提供的参数是否为指定类型的函数
或满足指定条件
分类是否影响地形、3D 瓦片或两者。
Properties:
Name |
Type |
Description |
TERRAIN |
number
|
仅对地形进行分类。 |
CESIUM_3D_TILE |
number
|
仅对 3D 图块进行分类。 |
BOTH |
number
|
地形和 3D 瓦片都将被分类。 |
元数据类的名称
由此描述的 'MetadataClassProperty'
结构,从 'MetadataSchema' 获取
Properties:
See:
Properties:
See:
Properties:
Name |
Type |
Description |
CUMULUS |
number
|
积云。 |
定义目标颜色和基元的源颜色之间的混合模式。
HIGHLIGHT 将源颜色乘以目标颜色
REPLACE 将源颜色替换为目标颜色
MIX 将源颜色和目标颜色混合在一起
Properties:
Name |
Type |
Description |
HIGHLIGHT |
number
|
|
REPLACE |
number
|
|
MIX |
number
|
|
See:
WebGL 组件数据类型。 组件是 intrinsic,
哪些形式属性,哪些形式顶点。
Properties:
Name |
Type |
Description |
BYTE |
number
|
对应的8位带符号字节 gl.BYTE 还有类型
元素的 Int8Array . |
UNSIGNED_BYTE |
number
|
8-bit unsigned byte对应 UNSIGNED_BYTE 和类型
元素的 Uint8Array . |
SHORT |
number
|
16-bit signed short 对应SHORT 和类型
元素的 Int16Array . |
UNSIGNED_SHORT |
number
|
16-bit unsigned short 对应 UNSIGNED_SHORT 和类型
元素的 Uint16Array . |
INT |
number
|
32-bit signed int 对应 INT 和类型
元素的 Int32Array . |
UNSIGNED_INT |
number
|
32-bit unsigned int 对应 UNSIGNED_INT 和类型
元素的 Uint32Array . |
FLOAT |
number
|
32-bit 浮点型 对应 FLOAT 和类型
元素的 Float32Array . |
DOUBLE |
number
|
64 位浮点对应 gl.DOUBLE (在桌面 OpenGL 中;
这在 WebGL 中不受支持,在 Cesium 中通过 GeometryPipeline.encodeAttribute 进行模拟)
和类型 元素的 Float64Array . |
角的样式选项。
Properties:
Name |
Type |
Description |
ROUNDED |
number
|
边角具有光滑的边缘。 |
MITERED |
number
|
拐角点是相邻边的交集。 |
BEVELED |
number
|
边角被剪断。 |
Demo:
确定剔除哪些三角形(如果有)。
Properties:
Name |
Type |
Description |
FRONT |
number
|
正面三角形被剔除。 |
BACK |
number
|
背面三角形被剔除。 |
FRONT_AND_BACK |
number
|
正面和背面三角形都被剔除。 |
Properties:
Name |
Type |
Description |
MODIFY_MATERIAL |
string
|
自定义着色器将用于修改材质阶段的结果
在应用照明之前。 |
REPLACE_MATERIAL |
string
|
将使用自定义着色器而不是材质阶段。这是一个提示
优化材质处理代码。 |
Experimental
此功能使用的是 3D Tiles 规范的一部分,该规范并非最终版本,并且可能会在没有 Cesium 标准弃用政策的情况下进行更改。
Properties:
Name |
Type |
Description |
INHERIT |
number
|
从基本体的材质继承半透明设置。如果原语使用了
Translucent 材质,则自定义着色器也将被视为 Translucent。如果 primitive
使用了不透明材质,则自定义着色器将被视为不透明。 |
OPAQUE |
number
|
强制基元将基元渲染为不透明,忽略任何材质设置。 |
TRANSLUCENT |
number
|
强制基元将基元渲染为半透明,忽略任何材质设置。 |
Experimental
此功能使用的是 3D Tiles 规范的一部分,该规范并非最终版本,并且可能会在没有 Cesium 标准弃用政策的情况下进行更改。
确定用于比较深度测试的两个深度的函数。
Properties:
Name |
Type |
Description |
NEVER |
number
|
深度测试永远不会通过。 |
LESS |
number
|
如果输入深度小于存储的深度,则深度测试通过。 |
EQUAL |
number
|
如果输入深度等于存储的深度,则深度测试通过。 |
LESS_OR_EQUAL |
number
|
如果输入深度小于或等于存储的深度,则深度测试通过。 |
GREATER |
number
|
如果输入深度大于存储深度,则深度测试通过。 |
NOT_EQUAL |
number
|
如果输入深度不等于存储的深度,则深度测试通过。 |
GREATER_OR_EQUAL |
number
|
如果输入深度大于或等于存储深度,则深度测试通过。 |
ALWAYS |
number
|
深度测试总是通过的。 |
已计算 BoundingSphere。
氛围灯光效果(天空氛围、地面氛围、雾)可以
使用来自太阳或其他光源的动态照明进一步修改
随时间变化。此枚举确定要使用的光源。
Properties:
Name |
Type |
Description |
NONE |
number
|
请勿使用动态氛围照明。氛围灯效将
从正上方照亮,而不是使用场景的光源。 |
SCENE_LIGHT |
number
|
将场景的当前光源用于动态氛围照明。 |
SUNLIGHT |
number
|
强制动态氛围照明始终使用阳光方向,
即使场景使用不同的光源。 |
已知 EPSG 代码不包括反向轴顺序,并且在 4000-5000 之间。
用于确定如何外推内插值的常量
当查询超出可用数据的边界时。
Properties:
Name |
Type |
Description |
NONE |
number
|
不发生外推。 |
HOLD |
number
|
当超出样本数据范围时,将使用第一个或最后一个值。 |
EXTRAPOLATE |
number
|
该值是外推的。 |
See:
BoundingSphere 不存在。
Properties:
Name |
Type |
Description |
SEARCH |
number
|
在输入被视为完成的地方执行搜索。 |
AUTOCOMPLETE |
number
|
使用部分输入执行自动完成,通常
保留用于在用户键入时提供可能的结果。 |
See:
用于高度贴图的编码
Properties:
Name |
Type |
Description |
NONE |
number
|
无编码 |
LERC |
number
|
LERC 编码 |
表示相对于地形的位置。
Properties:
Name |
Type |
Description |
NONE |
number
|
立场是绝对的。 |
CLAMP_TO_GROUND |
number
|
位置与地形和 3D 瓦片固定。 |
RELATIVE_TO_GROUND |
number
|
位置高度是 terrain 和 3D 瓦片上方的高度。 |
CLAMP_TO_TERRAIN |
number
|
位置被夹紧到 terain。 |
RELATIVE_TO_TERRAIN |
number
|
位置高度是 terrain 以上的高度。 |
CLAMP_TO_3D_TILE |
number
|
位置被钳制到 3D 瓦片。 |
RELATIVE_TO_3D_TILE |
number
|
位置高度是 3D 瓦片上方的高度。 |
原点相对于对象的水平位置,例如
Billboard
或
Label
的 例如,将水平原点设置为
LEFT
或
RIGHT
将在左侧或右侧显示广告牌(在屏幕空间中)
的锚点位置。
Properties:
Name |
Type |
Description |
CENTER |
number
|
原点位于对象的水平中心。 |
LEFT |
number
|
原点位于对象的左侧。 |
RIGHT |
number
|
原点位于对象的右侧。 |
See:
已知 EPSG 代码包含反向轴顺序,但不在 4000-5000 之间。
Properties:
Name |
Type |
Description |
UNSIGNED_BYTE |
number
|
8-bit unsigned 字节对应于 UNSIGNED_BYTE 和 类型
的元素 Uint8Array . |
UNSIGNED_SHORT |
number
|
16-bit unsigned short 对应于 UNSIGNED_SHORT 和 类型
的元素Uint16Array . |
UNSIGNED_INT |
number
|
32-bit unsigned int 对应于 UNSIGNED_INT 和类型
的元素Uint32Array . |
此枚举类型用于确定相对于 frustum 的
对象。对象可以完全包含在视锥体 (INSIDE) 中,
部分在视锥体内部,部分在外侧(相交),或完全在某个地方
在视锥体的 6 个平面之外 (OUTSIDE)。
Properties:
Name |
Type |
Description |
OUTSIDE |
number
|
表示对象不包含在视锥体中。 |
INTERSECTING |
number
|
表示对象与视锥体的某个平面相交。 |
INSIDE |
number
|
表示对象完全位于视锥体内。 |
Underlying geocoding services that can be used via Cesium ion.
Properties:
Name |
Type |
Description |
GOOGLE |
string
|
Google geocoder, for use with Google data. |
BING |
string
|
Bing geocoder, for use with Bing data. |
DEFAULT |
string
|
Use the default geocoder as set on the server. Used when neither Bing or
Google data is used. |
由 createWorldImagery
提供的图像类型。
Properties:
Name |
Type |
Description |
AERIAL |
number
|
航拍图像。 |
AERIAL_WITH_LABELS |
number
|
带有道路叠加层的航拍图像。 |
ROAD |
number
|
没有额外图像的道路。 |
此枚举类型用于表示键盘修饰符。这些是键
以及其他事件类型一起被按住。
Properties:
Name |
Type |
Description |
SHIFT |
number
|
表示按住 Shift 键。 |
CTRL |
number
|
表示按住 control 键。 |
ALT |
number
|
表示按住的 alt 键。 |
介绍如何绘制标签。
Properties:
Name |
Type |
Description |
FILL |
number
|
填写标签的文本,但不添加轮廓。 |
OUTLINE |
number
|
勾勒出标签的文本轮廓,但不要填充。 |
FILL_AND_OUTLINE |
number
|
填写并勾勒出标签的文本轮廓。 |
See:
Properties:
Name |
Type |
Description |
UNLIT |
number
|
使用无光照着色,即跳过光照计算。模型的
直接使用漫射颜色(假设为线性 RGB,而不是 sRGB)
计算 out_FragColor 时。Alpha 模式仍然是
应用的。 |
PBR |
number
|
使用基于物理的渲染照明计算。这包括
PBR 金属粗糙度和 PBR 镜面反射光泽度。基于图像
如果可能,也会应用照明。 |
Experimental
此功能使用的是 3D Tiles 规范的一部分,该规范并非最终版本,并且可能会在没有 Cesium 标准弃用政策的情况下进行更改。
描述地图在 2D 模式下的操作方式。
Properties:
Name |
Type |
Description |
ROTATE |
number
|
2D 地图可以绕 z 轴旋转。 |
INFINITE_SCROLL |
number
|
2D 地图可以在水平方向上无限滚动。 |
The metadata for this voxel content.
The metadata is an array of typed arrays, one for each field.
The data for one field is a flattened 3D array ordered by X, then Y, then Z.
元数据组件类型的枚举。
Properties:
Name |
Type |
Description |
INT8 |
string
|
一个 8 位有符号整数 |
UINT8 |
string
|
一个 8 位无符号整数 |
INT16 |
string
|
一个 16 位有符号整数 |
UINT16 |
string
|
一个 16 位无符号整数 |
INT32 |
string
|
一个 32 位有符号整数 |
UINT32 |
string
|
一个 32 位无符号整数 |
INT64 |
string
|
一个 64 位有符号整数。此类型需要 BigInt 支持。 |
UINT64 |
string
|
一个 64 位有符号整数。此类型需要 BigInt 支持 |
FLOAT32 |
string
|
一个 32 位(单精度)浮点数 |
FLOAT64 |
string
|
一个 64 位(双精度)浮点数 |
Experimental
此功能使用的是 3D Tiles 规范的一部分,该规范并非最终版本,并且可能会在没有 Cesium 标准弃用政策的情况下进行更改。
'PropertyTextureProperty' 或 'PropertyAttributeProperty'
由此结构描述,如从 texture 属性
或与
类名和属性名。
Properties:
Name |
Type |
Description |
SCALAR |
string
|
单个组件 |
VEC2 |
string
|
具有两个分量的向量 |
VEC3 |
string
|
具有三个分量的向量 |
VEC4 |
string
|
具有四个分量的向量 |
MAT2 |
string
|
一个 2x2 矩阵,以列优先格式存储。 |
MAT3 |
string
|
一个 3x3 矩阵,以列优先格式存储。 |
MAT4 |
string
|
一个 4x4 矩阵,以列优先格式存储。 |
BOOLEAN |
string
|
布尔值 (true/false) |
STRING |
string
|
UTF-8 编码的字符串值 |
ENUM |
string
|
枚举值。此类型与 MetadataEnum 结合使用来描述有效值。 |
Experimental
此功能使用的是 3D Tiles 规范的一部分,该规范并非最终版本,并且可能会在没有 Cesium 标准弃用政策的情况下进行更改。
确定是否以及如何循环 glTF 动画。
Properties:
Name |
Type |
Description |
NONE |
number
|
播放一次动画;不要循环它。 |
REPEAT |
number
|
在动画停止后立即从头开始循环播放动画。 |
MIRRORED_REPEAT |
number
|
循环播放动画。 首先,向前播放,然后反向播放,然后向前播放,依此类推。 |
See:
BoundingSphere 仍在计算中。
像素的数据类型。
Properties:
Name |
Type |
Description |
UNSIGNED_BYTE |
number
|
|
UNSIGNED_SHORT |
number
|
|
UNSIGNED_INT |
number
|
|
FLOAT |
number
|
|
HALF_FLOAT |
number
|
|
UNSIGNED_INT_24_8 |
number
|
|
UNSIGNED_SHORT_4_4_4_4 |
number
|
|
UNSIGNED_SHORT_5_5_5_1 |
number
|
|
UNSIGNED_SHORT_5_6_5 |
number
|
|
See:
像素的格式,即它所具有的组件数量及其所代表的内容。
Properties:
Name |
Type |
Description |
DEPTH_COMPONENT |
number
|
包含深度值的像素格式。 |
DEPTH_STENCIL |
number
|
一种包含深度和模板值的像素格式,最常与 PixelDatatype.UNSIGNED_INT_24_8 一起使用。 |
ALPHA |
number
|
包含 Alpha 通道的像素格式。 |
RED |
number
|
包含红色通道的像素格式 |
RG |
number
|
包含红色和绿色通道的像素格式。 |
RGB |
number
|
包含红色、绿色和蓝色通道的像素格式。 |
RGBA |
number
|
包含红色、绿色、蓝色和 Alpha 通道的像素格式。 |
LUMINANCE |
number
|
包含明亮度(强度)通道的像素格式。 |
LUMINANCE_ALPHA |
number
|
包含明亮度(强度)和 Alpha 通道的像素格式。 |
RGB_DXT1 |
number
|
一种包含红色、绿色和蓝色通道的像素格式,经过 DXT1 压缩。 |
RGBA_DXT1 |
number
|
一种包含红色、绿色、蓝色和 Alpha 通道的像素格式,经过 DXT1 压缩。 |
RGBA_DXT3 |
number
|
一种包含红色、绿色、蓝色和 Alpha 通道的像素格式,经过 DXT3 压缩。 |
RGBA_DXT5 |
number
|
一种像素格式,包含经过 DXT5 压缩的红色、绿色、蓝色和 Alpha 通道。 |
RGB_PVRTC_4BPPV1 |
number
|
一种包含红色、绿色和蓝色通道的像素格式,经过 PVR 4bpp 压缩。 |
RGB_PVRTC_2BPPV1 |
number
|
一种包含红色、绿色和蓝色通道的像素格式,经过 PVR 2bpp 压缩。 |
RGBA_PVRTC_4BPPV1 |
number
|
一种包含红色、绿色、蓝色和 Alpha 通道的像素格式,经过 PVR 4bpp 压缩。 |
RGBA_PVRTC_2BPPV1 |
number
|
一种像素格式,包含红色、绿色、蓝色和 Alpha 通道,经过 PVR 2bpp 压缩。 |
RGBA_ASTC |
number
|
一种包含 ASTC 压缩的红色、绿色、蓝色和 Alpha 通道的像素格式。 |
RGB_ETC1 |
number
|
包含红色、绿色和蓝色通道的像素格式,经过 ETC1 压缩。 |
RGB8_ETC2 |
number
|
一种包含红色、绿色和蓝色通道的像素格式,经过 ETC2 压缩。 |
RGBA8_ETC2_EAC |
number
|
一种包含红色、绿色、蓝色和 Alpha 通道的像素格式,经过 ETC2 压缩。 |
RGBA_BC7 |
number
|
一种包含红色、绿色、蓝色和 Alpha 通道的像素格式,经过 BC7 压缩。 |
Properties:
Name |
Type |
Description |
NEAREST |
number
|
通过返回最近的纹素对纹理进行采样。 |
LINEAR |
number
|
通过对四个最近的纹素进行双线性插值对纹理进行采样。 |
几何基元的类型,即点、线和三角形。
Properties:
Name |
Type |
Description |
POINTS |
number
|
每个顶点(或索引)都是单独点的基元点。 |
LINES |
number
|
线基元,其中每两个顶点(或索引)是一个线段。 线段不一定相连。 |
LINE_LOOP |
number
|
Line loop 基元,其中第一个顶点(或索引)之后的每个顶点(或索引)将一条线连接到
前一个顶点,最后一个顶点隐式连接到第一个顶点。 |
LINE_STRIP |
number
|
线带基元,其中第一个顶点(或索引)之后的每个顶点(或索引)将一条线连接到前一个顶点。 |
TRIANGLES |
number
|
三角形基元,其中每三个顶点(或索引)是一个三角形。 三角形不一定共享边缘。 |
TRIANGLE_STRIP |
number
|
三角形条带基元,其中前两个顶点(或索引)之后的每个顶点(或索引)都连接到其中
前两个顶点形成一个三角形。 例如,这可用于对墙进行建模。 |
TRIANGLE_FAN |
number
|
三角形扇形基元,其中前两个顶点(或索引)之后的每个顶点(或索引)都连接到其中
前一个顶点和第一个顶点形成一个三角形。 例如,this can be used
对圆锥体或圆进行建模。 |
metadata 属性的名称
用于识别已知参考系的常量。
Properties:
Name |
Type |
Description |
FIXED |
number
|
固定框架。 |
INERTIAL |
number
|
惯性系。 |
请求的状态。
Properties:
Name |
Type |
Description |
UNISSUED |
number
|
初始未颁发状态。 |
ISSUED |
number
|
已发布但尚未激活。当空位可用时,将变为激活状态。 |
ACTIVE |
number
|
实际的 http 请求已发送。 |
RECEIVED |
number
|
请求已成功完成。 |
CANCELLED |
number
|
由于优先级低,请求已显式或自动取消。 |
FAILED |
number
|
请求失败。 |
标识请求类型的枚举。用于更精细的日志记录和优先级排序。
Properties:
Name |
Type |
Description |
TERRAIN |
number
|
地形请求。 |
IMAGERY |
number
|
图像请求。 |
TILES3D |
number
|
3D 图块请求。 |
OTHER |
number
|
其他请求。 |
指示场景是以 3D、2D 还是 2.5D 哥伦布视图查看。
Properties:
Name |
Type |
Description |
MORPHING |
number
|
在模式之间变形,例如,从 3D 到 2D。 |
COLUMBUS_VIEW |
number
|
哥伦布视图模式。 地图布局的 2.5D 透视图
平面和高度不为零的对象将绘制在其上方。 |
SCENE2D |
number
|
2D 模式。 地图使用正交投影自上而下查看。 |
SCENE3D |
number
|
3D 模式。 地球的传统 3D 透视图。 |
See:
元数据架构的可选 ID
此枚举类型用于对鼠标事件进行分类:按下、向上、单击、双击、移动和按住按钮时的移动。
Properties:
Name |
Type |
Description |
LEFT_DOWN |
number
|
表示鼠标左键按下事件。 |
LEFT_UP |
number
|
表示鼠标左键松开事件。 |
LEFT_CLICK |
number
|
表示鼠标左键单击事件。 |
LEFT_DOUBLE_CLICK |
number
|
表示鼠标左键双击事件。 |
RIGHT_DOWN |
number
|
表示鼠标左键按下事件。 |
RIGHT_UP |
number
|
表示鼠标右键松开事件。 |
RIGHT_CLICK |
number
|
表示鼠标右键单击事件。 |
MIDDLE_DOWN |
number
|
表示鼠标中键按下事件。 |
MIDDLE_UP |
number
|
表示鼠标中键向上事件。 |
MIDDLE_CLICK |
number
|
表示鼠标中键单击事件。 |
MOUSE_MOVE |
number
|
表示鼠标移动事件。 |
WHEEL |
number
|
表示鼠标滚轮事件。 |
PINCH_START |
number
|
表示触摸表面上双指事件的开始。 |
PINCH_END |
number
|
表示触摸表面上的双指事件的结束。 |
PINCH_MOVE |
number
|
表示触摸表面上的双指事件更改。 |
用于指示要显示传感器体积的哪一部分的常量。
Properties:
Name |
Type |
Description |
COMPLETE |
Number
|
0x0000. Display the complete sensor volume. |
BELOW_ELLIPSOID_HORIZON |
Number
|
0x0001. 显示传感器体积中位于椭球体真实水平线以下的部分。 |
ABOVE_ELLIPSOID_HORIZON |
Number
|
0x0002. 显示位于椭球体真实水平上方的传感器体积部分。 |
指定在以下情况下,对象是投射还是接收来自光源的阴影
启用阴影。
Properties:
Name |
Type |
Description |
DISABLED |
number
|
对象不投射或接收阴影。 |
ENABLED |
number
|
对象投射和接收阴影。 |
CAST_ONLY |
number
|
对象仅投射阴影。 |
RECEIVE_ONLY |
number
|
对象仅接收阴影。 |
Properties:
See:
确定用于比较模板测试的模板值的函数。
Properties:
Name |
Type |
Description |
NEVER |
number
|
模板测试永远不会通过。 |
LESS |
number
|
当掩码参考值小于掩码的模板值时,模板测试通过。 |
EQUAL |
number
|
当掩码参考值等于掩码的模板值时,模板测试通过。 |
LESS_OR_EQUAL |
number
|
当被遮罩的参考值小于或等于被遮罩的模板值时,模板测试通过。 |
GREATER |
number
|
当掩码参考值大于掩码模板值时,模板测试通过。 |
NOT_EQUAL |
number
|
当掩码的参考值不等于掩码的模板值时,模板测试通过。 |
GREATER_OR_EQUAL |
number
|
当掩码参考值大于或等于掩码的模板值时,模板测试通过。 |
ALWAYS |
number
|
模板测试始终通过。 |
根据模板测试的结果确定所采取的操作。
Properties:
Name |
Type |
Description |
ZERO |
number
|
将模板缓冲区值设置为零。 |
KEEP |
number
|
不更改模板缓冲区。 |
REPLACE |
number
|
将模板缓冲区值替换为参考值。 |
INCREMENT |
number
|
递增模板缓冲区值,钳制到无符号字节。 |
DECREMENT |
number
|
递减模板缓冲区值,钳制为零。 |
INVERT |
number
|
按位反转现有模板缓冲区值。 |
INCREMENT_WRAP |
number
|
递增模板缓冲区值,当超出无符号字节范围时换行为零。 |
DECREMENT_WRAP |
number
|
递减模具缓冲区值,换行到最大无符号字节,而不是低于零。 |
Properties:
Name |
Type |
Description |
Direct |
string
|
存储锚点的完整误差协方差,以包含交叉协方差项 |
Indirect |
string
|
为每个锚点存储一个完整的协方差矩阵。但是,在这种情况下,
交叉协方差项不直接存储,但可以通过一组空间
存储在元数据中的相关函数参数。 |
Experimental
此功能不是最终的,在没有 Cesium 的标准弃用政策的情况下可能会发生变化。
Properties:
Name |
Type |
Description |
HORIZONTAL |
number
|
水平方向。 |
VERTICAL |
number
|
垂直方向。 |
列举放大 WebGL 纹理时使用的所有可能的过滤器。
Properties:
Name |
Type |
Description |
NEAREST |
number
|
通过返回最近的像素对纹理进行采样。 |
LINEAR |
number
|
通过对 4 个最接近的像素进行双线性插值对纹理进行采样。这会产生比 NEAREST 筛选更平滑的结果。 |
See:
列举缩小 WebGL 纹理时使用的所有可能的过滤器。
Properties:
Name |
Type |
Description |
NEAREST |
number
|
通过返回最近的像素对纹理进行采样。 |
LINEAR |
number
|
通过对 4 个最接近的像素进行双线性插值对纹理进行采样。这会产生比 NEAREST 筛选更平滑的结果。 |
NEAREST_MIPMAP_NEAREST |
number
|
选择最近的 mip 级别,并在该级别内应用最近的采样。
要求纹理具有 mipmap。mip 级别由纹理的视角和屏幕空间大小选择。
|
LINEAR_MIPMAP_NEAREST |
number
|
选择最近的 mip 级别,并在该级别内应用线性采样。
要求纹理具有 mipmap。mip 级别由纹理的视角和屏幕空间大小选择。
|
NEAREST_MIPMAP_LINEAR |
number
|
从两个相邻的 mip 级别使用最近的采样读取纹理值,并线性插值结果。
从 mipmapped 纹理采样时,此选项可在视觉质量和速度之间实现良好的平衡。
要求纹理具有 mipmap。mip 级别由纹理的视角和屏幕空间大小选择。
|
LINEAR_MIPMAP_LINEAR |
number
|
使用线性采样从两个相邻的 mip 级别读取纹理值,并线性插值结果。
从 mipmapped 纹理采样时,此选项可在视觉质量和速度之间实现良好的平衡。
要求纹理具有 mipmap。mip 级别由纹理的视角和屏幕空间大小选择。
|
See:
- TextureMagnificationFilter (贴图放大过滤器)
Creates a spatial hash key for the given longitude, latitude, and tile level.
The precision is adjusted based on the tile level and extent to achieve finer precision at higher levels.
This function calculates the spatial hash key by first determining the precision at the given tile for the current maximum screenspace error (MAX_ERROR_PX),
and then rounding the longitude and latitude to that precision for consistency.
The steps for computing the level precision are as follows:
1. Compute the resolution (meters per pixel) at the given level:
level_resolution_m = (2 * PI * RADIUS) / (2^level * TILE_SIZE)
2. Compute the target precision in meters:
level_precision_m = level_resolution_m * MAX_ERROR_PX
3. Compute the target precision to radians:
level_precision_rad = level_precision_m / BODY_RADIUS
This simplifies to:
level_precision_rad = (2 * PI * MAX_ERROR_PX) / (2^level * TILE_SIZE)
which can also be written as:
level_precision_rad = (PI * MAX_ERROR_PX) / (2^(level-1) * TILE_SIZE)
The computed level_precision_rad is then used to round the input longitude and latitude,
ensuring that positions that fall within the same spatial bin produce the same hash key.
The constants below are computed once since they are fixed for the given configuration.
提供 JulianDate 可以用作 input 的时间标准类型。
Properties:
Name |
Type |
Description |
UTC |
number
|
表示协调世界时 (UTC) 时间标准。
UTC 与 TAI 的关系根据关系
UTC = TAI - deltaT ,其中 deltaT 是跳跃数
秒数,这些秒数已引入 TAI 中。 |
TAI |
number
|
表示国际原子时 (TAI) 时间标准。
TAI 是与其他时间标准相关的主要时间标准。 |
See:
使用高动态范围渲染时的色调映射算法。
Properties:
Name |
Type |
Description |
REINHARD |
string
|
使用 Reinhard 色调映射。 |
MODIFIED_REINHARD |
string
|
使用修改后的 Reinhard 色调映射。 |
FILMIC |
string
|
使用 Filmic 色调映射。 |
ACES |
string
|
使用 ACES 色调映射。 |
PBR_NEUTRAL |
string
|
使用 PBR 中性色调映射 from Khronos。 |
用于识别已知跟踪参考帧的常量。
Properties:
Name |
Type |
Description |
AUTODETECT |
number
|
自动检测算法。用于跟踪 Entity 的参考帧将
根据其轨迹自动选择:near-surface slow moving
对象将在实体的本地 east-north-up 引用中进行跟踪
帧,而卫星等速度较快的物体将使用 VVLH(车辆速度、
本地水平)。 |
ENU |
number
|
实体的本地 East-North-Up 参考系。 |
INERTIAL |
number
|
实体的惯性参考系。如果实体没有定义方向
属性,它会回退到自动检测算法。 |
VELOCITY |
number
|
实体的惯性参考系,其方向固定到其
VelocityOrientationProperty ,忽略其自身的方向。 |
Properties:
Name |
Type |
Description |
FLOAT |
string
|
单个浮点值。 |
VEC2 |
string
|
2 个浮点值的向量。 |
VEC3 |
string
|
3 个浮点值的向量。 |
VEC4 |
string
|
4 个浮点值的向量。 |
INT |
string
|
单个整数值 |
INT_VEC2 |
string
|
一个 2 个整数值的向量。 |
INT_VEC3 |
string
|
3 个整数值的向量。 |
INT_VEC4 |
string
|
4 个整数值的向量。 |
BOOL |
string
|
单个布尔值。 |
BOOL_VEC2 |
string
|
包含 2 个布尔值的向量。 |
BOOL_VEC3 |
string
|
包含 3 个布尔值的向量。 |
BOOL_VEC4 |
string
|
4 个布尔值的向量。 |
MAT2 |
string
|
浮点值的 2x2 矩阵。 |
MAT3 |
string
|
浮点值的 3x3 矩阵。 |
MAT4 |
string
|
浮点值的 3x3 矩阵。 |
SAMPLER_2D |
string
|
2D 采样纹理。 |
SAMPLER_CUBE |
string
|
|
Experimental
此功能使用的是 3D Tiles 规范的一部分,该规范并非最终版本,并且可能会在没有 Cesium 标准弃用政策的情况下进行更改。
Properties:
Name |
Type |
Description |
FLOAT |
string
|
单个浮点值。 |
VEC2 |
string
|
2 个浮点值的向量。 |
VEC3 |
string
|
3 个浮点值的向量。 |
VEC4 |
string
|
4 个浮点值的向量。 |
MAT2 |
string
|
浮点值的 2x2 矩阵。 |
MAT3 |
string
|
浮点值的 3x3 矩阵。 |
MAT4 |
string
|
浮点值的 4x4 矩阵。 |
Experimental
此功能使用的是 3D Tiles 规范的一部分,该规范并非最终版本,并且可能会在没有 Cesium 标准弃用政策的情况下进行更改。
原点相对于对象的垂直位置,例如
Billboard
或
label
的 例如,将垂直原点设置为
TOP
或
BOTTOM
将在上方或下方显示广告牌(在屏幕空间中)
锚点位置。
Properties:
Name |
Type |
Description |
CENTER |
number
|
原点位于 BASELINE 和 TOP 之间的垂直中心。 |
BOTTOM |
number
|
原点位于对象的底部。 |
BASELINE |
number
|
如果对象包含文本,则原点位于文本的基线处,否则原点位于对象的底部。 |
TOP |
number
|
原点位于对象的顶部。 |
See:
此枚举类型用于确定对象 occludee、
在水平面剔除期间可见。遮挡物可能会完全阻塞被遮挡物,在这种情况下
它没有可见性,可能会部分阻挡被遮挡对象的视野,或者可能根本不阻挡它,
实现完全可见性。
Properties:
Name |
Type |
Description |
NONE |
number
|
表示对象的任何部分都不可见。 |
PARTIAL |
number
|
表示对象的部分(但不是全部)可见 |
FULL |
number
|
表示对象在其整体上是可见的。 |
体素形状的枚举。形状控制体素网格映射到 3D 空间的方式。
Properties:
Name |
Type |
Description |
BOX |
string
|
一个盒子形状。 |
ELLIPSOID |
string
|
椭球体形状。 |
CYLINDER |
string
|
圆柱体形状。 |
Experimental
此功能不是最终功能,在没有 Cesium 的标准弃用政策的情况下可能会发生变化。
Properties:
Name |
Type |
Description |
DEPTH_BUFFER_BIT |
number
|
|
STENCIL_BUFFER_BIT |
number
|
|
COLOR_BUFFER_BIT |
number
|
|
POINTS |
number
|
|
LINES |
number
|
|
LINE_LOOP |
number
|
|
LINE_STRIP |
number
|
|
TRIANGLES |
number
|
|
TRIANGLE_STRIP |
number
|
|
TRIANGLE_FAN |
number
|
|
ZERO |
number
|
|
ONE |
number
|
|
SRC_COLOR |
number
|
|
ONE_MINUS_SRC_COLOR |
number
|
|
SRC_ALPHA |
number
|
|
ONE_MINUS_SRC_ALPHA |
number
|
|
DST_ALPHA |
number
|
|
ONE_MINUS_DST_ALPHA |
number
|
|
DST_COLOR |
number
|
|
ONE_MINUS_DST_COLOR |
number
|
|
SRC_ALPHA_SATURATE |
number
|
|
FUNC_ADD |
number
|
|
BLEND_EQUATION |
number
|
|
BLEND_EQUATION_RGB |
number
|
|
BLEND_EQUATION_ALPHA |
number
|
|
FUNC_SUBTRACT |
number
|
|
FUNC_REVERSE_SUBTRACT |
number
|
|
BLEND_DST_RGB |
number
|
|
BLEND_SRC_RGB |
number
|
|
BLEND_DST_ALPHA |
number
|
|
BLEND_SRC_ALPHA |
number
|
|
CONSTANT_COLOR |
number
|
|
ONE_MINUS_CONSTANT_COLOR |
number
|
|
CONSTANT_ALPHA |
number
|
|
ONE_MINUS_CONSTANT_ALPHA |
number
|
|
BLEND_COLOR |
number
|
|
ARRAY_BUFFER |
number
|
|
ELEMENT_ARRAY_BUFFER |
number
|
|
ARRAY_BUFFER_BINDING |
number
|
|
ELEMENT_ARRAY_BUFFER_BINDING |
number
|
|
STREAM_DRAW |
number
|
|
STATIC_DRAW |
number
|
|
DYNAMIC_DRAW |
number
|
|
BUFFER_SIZE |
number
|
|
BUFFER_USAGE |
number
|
|
CURRENT_VERTEX_ATTRIB |
number
|
|
FRONT |
number
|
|
BACK |
number
|
|
FRONT_AND_BACK |
number
|
|
CULL_FACE |
number
|
|
BLEND |
number
|
|
DITHER |
number
|
|
STENCIL_TEST |
number
|
|
DEPTH_TEST |
number
|
|
SCISSOR_TEST |
number
|
|
POLYGON_OFFSET_FILL |
number
|
|
SAMPLE_ALPHA_TO_COVERAGE |
number
|
|
SAMPLE_COVERAGE |
number
|
|
NO_ERROR |
number
|
|
INVALID_ENUM |
number
|
|
INVALID_VALUE |
number
|
|
INVALID_OPERATION |
number
|
|
OUT_OF_MEMORY |
number
|
|
CW |
number
|
|
CCW |
number
|
|
LINE_WIDTH |
number
|
|
ALIASED_POINT_SIZE_RANGE |
number
|
|
ALIASED_LINE_WIDTH_RANGE |
number
|
|
CULL_FACE_MODE |
number
|
|
FRONT_FACE |
number
|
|
DEPTH_RANGE |
number
|
|
DEPTH_WRITEMASK |
number
|
|
DEPTH_CLEAR_VALUE |
number
|
|
DEPTH_FUNC |
number
|
|
STENCIL_CLEAR_VALUE |
number
|
|
STENCIL_FUNC |
number
|
|
STENCIL_FAIL |
number
|
|
STENCIL_PASS_DEPTH_FAIL |
number
|
|
STENCIL_PASS_DEPTH_PASS |
number
|
|
STENCIL_REF |
number
|
|
STENCIL_VALUE_MASK |
number
|
|
STENCIL_WRITEMASK |
number
|
|
STENCIL_BACK_FUNC |
number
|
|
STENCIL_BACK_FAIL |
number
|
|
STENCIL_BACK_PASS_DEPTH_FAIL |
number
|
|
STENCIL_BACK_PASS_DEPTH_PASS |
number
|
|
STENCIL_BACK_REF |
number
|
|
STENCIL_BACK_VALUE_MASK |
number
|
|
STENCIL_BACK_WRITEMASK |
number
|
|
VIEWPORT |
number
|
|
SCISSOR_BOX |
number
|
|
COLOR_CLEAR_VALUE |
number
|
|
COLOR_WRITEMASK |
number
|
|
UNPACK_ALIGNMENT |
number
|
|
PACK_ALIGNMENT |
number
|
|
MAX_TEXTURE_SIZE |
number
|
|
MAX_VIEWPORT_DIMS |
number
|
|
SUBPIXEL_BITS |
number
|
|
RED_BITS |
number
|
|
GREEN_BITS |
number
|
|
BLUE_BITS |
number
|
|
ALPHA_BITS |
number
|
|
DEPTH_BITS |
number
|
|
STENCIL_BITS |
number
|
|
POLYGON_OFFSET_UNITS |
number
|
|
POLYGON_OFFSET_FACTOR |
number
|
|
TEXTURE_BINDING_2D |
number
|
|
SAMPLE_BUFFERS |
number
|
|
SAMPLES |
number
|
|
SAMPLE_COVERAGE_VALUE |
number
|
|
SAMPLE_COVERAGE_INVERT |
number
|
|
COMPRESSED_TEXTURE_FORMATS |
number
|
|
DONT_CARE |
number
|
|
FASTEST |
number
|
|
NICEST |
number
|
|
GENERATE_MIPMAP_HINT |
number
|
|
BYTE |
number
|
|
UNSIGNED_BYTE |
number
|
|
SHORT |
number
|
|
UNSIGNED_SHORT |
number
|
|
INT |
number
|
|
UNSIGNED_INT |
number
|
|
FLOAT |
number
|
|
DEPTH_COMPONENT |
number
|
|
ALPHA |
number
|
|
RGB |
number
|
|
RGBA |
number
|
|
LUMINANCE |
number
|
|
LUMINANCE_ALPHA |
number
|
|
UNSIGNED_SHORT_4_4_4_4 |
number
|
|
UNSIGNED_SHORT_5_5_5_1 |
number
|
|
UNSIGNED_SHORT_5_6_5 |
number
|
|
FRAGMENT_SHADER |
number
|
|
VERTEX_SHADER |
number
|
|
MAX_VERTEX_ATTRIBS |
number
|
|
MAX_VERTEX_UNIFORM_VECTORS |
number
|
|
MAX_VARYING_VECTORS |
number
|
|
MAX_COMBINED_TEXTURE_IMAGE_UNITS |
number
|
|
MAX_VERTEX_TEXTURE_IMAGE_UNITS |
number
|
|
MAX_TEXTURE_IMAGE_UNITS |
number
|
|
MAX_FRAGMENT_UNIFORM_VECTORS |
number
|
|
SHADER_TYPE |
number
|
|
DELETE_STATUS |
number
|
|
LINK_STATUS |
number
|
|
VALIDATE_STATUS |
number
|
|
ATTACHED_SHADERS |
number
|
|
ACTIVE_UNIFORMS |
number
|
|
ACTIVE_ATTRIBUTES |
number
|
|
SHADING_LANGUAGE_VERSION |
number
|
|
CURRENT_PROGRAM |
number
|
|
NEVER |
number
|
|
LESS |
number
|
|
EQUAL |
number
|
|
LEQUAL |
number
|
|
GREATER |
number
|
|
NOTEQUAL |
number
|
|
GEQUAL |
number
|
|
ALWAYS |
number
|
|
KEEP |
number
|
|
REPLACE |
number
|
|
INCR |
number
|
|
DECR |
number
|
|
INVERT |
number
|
|
INCR_WRAP |
number
|
|
DECR_WRAP |
number
|
|
VENDOR |
number
|
|
RENDERER |
number
|
|
VERSION |
number
|
|
NEAREST |
number
|
|
LINEAR |
number
|
|
NEAREST_MIPMAP_NEAREST |
number
|
|
LINEAR_MIPMAP_NEAREST |
number
|
|
NEAREST_MIPMAP_LINEAR |
number
|
|
LINEAR_MIPMAP_LINEAR |
number
|
|
TEXTURE_MAG_FILTER |
number
|
|
TEXTURE_MIN_FILTER |
number
|
|
TEXTURE_WRAP_S |
number
|
|
TEXTURE_WRAP_T |
number
|
|
TEXTURE_2D |
number
|
|
TEXTURE |
number
|
|
TEXTURE_CUBE_MAP |
number
|
|
TEXTURE_BINDING_CUBE_MAP |
number
|
|
TEXTURE_CUBE_MAP_POSITIVE_X |
number
|
|
TEXTURE_CUBE_MAP_NEGATIVE_X |
number
|
|
TEXTURE_CUBE_MAP_POSITIVE_Y |
number
|
|
TEXTURE_CUBE_MAP_NEGATIVE_Y |
number
|
|
TEXTURE_CUBE_MAP_POSITIVE_Z |
number
|
|
TEXTURE_CUBE_MAP_NEGATIVE_Z |
number
|
|
MAX_CUBE_MAP_TEXTURE_SIZE |
number
|
|
TEXTURE0 |
number
|
|
TEXTURE1 |
number
|
|
TEXTURE2 |
number
|
|
TEXTURE3 |
number
|
|
TEXTURE4 |
number
|
|
TEXTURE5 |
number
|
|
TEXTURE6 |
number
|
|
TEXTURE7 |
number
|
|
TEXTURE8 |
number
|
|
TEXTURE9 |
number
|
|
TEXTURE10 |
number
|
|
TEXTURE11 |
number
|
|
TEXTURE12 |
number
|
|
TEXTURE13 |
number
|
|
TEXTURE14 |
number
|
|
TEXTURE15 |
number
|
|
TEXTURE16 |
number
|
|
TEXTURE17 |
number
|
|
TEXTURE18 |
number
|
|
TEXTURE19 |
number
|
|
TEXTURE20 |
number
|
|
TEXTURE21 |
number
|
|
TEXTURE22 |
number
|
|
TEXTURE23 |
number
|
|
TEXTURE24 |
number
|
|
TEXTURE25 |
number
|
|
TEXTURE26 |
number
|
|
TEXTURE27 |
number
|
|
TEXTURE28 |
number
|
|
TEXTURE29 |
number
|
|
TEXTURE30 |
number
|
|
TEXTURE31 |
number
|
|
ACTIVE_TEXTURE |
number
|
|
REPEAT |
number
|
|
CLAMP_TO_EDGE |
number
|
|
MIRRORED_REPEAT |
number
|
|
FLOAT_VEC2 |
number
|
|
FLOAT_VEC3 |
number
|
|
FLOAT_VEC4 |
number
|
|
INT_VEC2 |
number
|
|
INT_VEC3 |
number
|
|
INT_VEC4 |
number
|
|
BOOL |
number
|
|
BOOL_VEC2 |
number
|
|
BOOL_VEC3 |
number
|
|
BOOL_VEC4 |
number
|
|
FLOAT_MAT2 |
number
|
|
FLOAT_MAT3 |
number
|
|
FLOAT_MAT4 |
number
|
|
SAMPLER_2D |
number
|
|
SAMPLER_CUBE |
number
|
|
VERTEX_ATTRIB_ARRAY_ENABLED |
number
|
|
VERTEX_ATTRIB_ARRAY_SIZE |
number
|
|
VERTEX_ATTRIB_ARRAY_STRIDE |
number
|
|
VERTEX_ATTRIB_ARRAY_TYPE |
number
|
|
VERTEX_ATTRIB_ARRAY_NORMALIZED |
number
|
|
VERTEX_ATTRIB_ARRAY_POINTER |
number
|
|
VERTEX_ATTRIB_ARRAY_BUFFER_BINDING |
number
|
|
IMPLEMENTATION_COLOR_READ_TYPE |
number
|
|
IMPLEMENTATION_COLOR_READ_FORMAT |
number
|
|
COMPILE_STATUS |
number
|
|
LOW_FLOAT |
number
|
|
MEDIUM_FLOAT |
number
|
|
HIGH_FLOAT |
number
|
|
LOW_INT |
number
|
|
MEDIUM_INT |
number
|
|
HIGH_INT |
number
|
|
FRAMEBUFFER |
number
|
|
RENDERBUFFER |
number
|
|
RGBA4 |
number
|
|
RGB5_A1 |
number
|
|
RGB565 |
number
|
|
DEPTH_COMPONENT16 |
number
|
|
STENCIL_INDEX |
number
|
|
STENCIL_INDEX8 |
number
|
|
DEPTH_STENCIL |
number
|
|
RENDERBUFFER_WIDTH |
number
|
|
RENDERBUFFER_HEIGHT |
number
|
|
RENDERBUFFER_INTERNAL_FORMAT |
number
|
|
RENDERBUFFER_RED_SIZE |
number
|
|
RENDERBUFFER_GREEN_SIZE |
number
|
|
RENDERBUFFER_BLUE_SIZE |
number
|
|
RENDERBUFFER_ALPHA_SIZE |
number
|
|
RENDERBUFFER_DEPTH_SIZE |
number
|
|
RENDERBUFFER_STENCIL_SIZE |
number
|
|
FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE |
number
|
|
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME |
number
|
|
FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL |
number
|
|
FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE |
number
|
|
COLOR_ATTACHMENT0 |
number
|
|
DEPTH_ATTACHMENT |
number
|
|
STENCIL_ATTACHMENT |
number
|
|
DEPTH_STENCIL_ATTACHMENT |
number
|
|
NONE |
number
|
|
FRAMEBUFFER_COMPLETE |
number
|
|
FRAMEBUFFER_INCOMPLETE_ATTACHMENT |
number
|
|
FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT |
number
|
|
FRAMEBUFFER_INCOMPLETE_DIMENSIONS |
number
|
|
FRAMEBUFFER_UNSUPPORTED |
number
|
|
FRAMEBUFFER_BINDING |
number
|
|
RENDERBUFFER_BINDING |
number
|
|
MAX_RENDERBUFFER_SIZE |
number
|
|
INVALID_FRAMEBUFFER_OPERATION |
number
|
|
UNPACK_FLIP_Y_WEBGL |
number
|
|
UNPACK_PREMULTIPLY_ALPHA_WEBGL |
number
|
|
CONTEXT_LOST_WEBGL |
number
|
|
UNPACK_COLORSPACE_CONVERSION_WEBGL |
number
|
|
BROWSER_DEFAULT_WEBGL |
number
|
|
COMPRESSED_RGB_S3TC_DXT1_EXT |
number
|
|
COMPRESSED_RGBA_S3TC_DXT1_EXT |
number
|
|
COMPRESSED_RGBA_S3TC_DXT3_EXT |
number
|
|
COMPRESSED_RGBA_S3TC_DXT5_EXT |
number
|
|
COMPRESSED_RGB_PVRTC_4BPPV1_IMG |
number
|
|
COMPRESSED_RGB_PVRTC_2BPPV1_IMG |
number
|
|
COMPRESSED_RGBA_PVRTC_4BPPV1_IMG |
number
|
|
COMPRESSED_RGBA_PVRTC_2BPPV1_IMG |
number
|
|
COMPRESSED_RGBA_ASTC_4x4_WEBGL |
number
|
|
COMPRESSED_RGB_ETC1_WEBGL |
number
|
|
COMPRESSED_RGBA_BPTC_UNORM |
number
|
|
HALF_FLOAT_OES |
number
|
|
DOUBLE |
number
|
|
READ_BUFFER |
number
|
|
UNPACK_ROW_LENGTH |
number
|
|
UNPACK_SKIP_ROWS |
number
|
|
UNPACK_SKIP_PIXELS |
number
|
|
PACK_ROW_LENGTH |
number
|
|
PACK_SKIP_ROWS |
number
|
|
PACK_SKIP_PIXELS |
number
|
|
COLOR |
number
|
|
DEPTH |
number
|
|
STENCIL |
number
|
|
RED |
number
|
|
RGB8 |
number
|
|
RGBA8 |
number
|
|
RGB10_A2 |
number
|
|
TEXTURE_BINDING_3D |
number
|
|
UNPACK_SKIP_IMAGES |
number
|
|
UNPACK_IMAGE_HEIGHT |
number
|
|
TEXTURE_3D |
number
|
|
TEXTURE_WRAP_R |
number
|
|
MAX_3D_TEXTURE_SIZE |
number
|
|
UNSIGNED_INT_2_10_10_10_REV |
number
|
|
MAX_ELEMENTS_VERTICES |
number
|
|
MAX_ELEMENTS_INDICES |
number
|
|
TEXTURE_MIN_LOD |
number
|
|
TEXTURE_MAX_LOD |
number
|
|
TEXTURE_BASE_LEVEL |
number
|
|
TEXTURE_MAX_LEVEL |
number
|
|
MIN |
number
|
|
MAX |
number
|
|
DEPTH_COMPONENT24 |
number
|
|
MAX_TEXTURE_LOD_BIAS |
number
|
|
TEXTURE_COMPARE_MODE |
number
|
|
TEXTURE_COMPARE_FUNC |
number
|
|
CURRENT_QUERY |
number
|
|
QUERY_RESULT |
number
|
|
QUERY_RESULT_AVAILABLE |
number
|
|
STREAM_READ |
number
|
|
STREAM_COPY |
number
|
|
STATIC_READ |
number
|
|
STATIC_COPY |
number
|
|
DYNAMIC_READ |
number
|
|
DYNAMIC_COPY |
number
|
|
MAX_DRAW_BUFFERS |
number
|
|
DRAW_BUFFER0 |
number
|
|
DRAW_BUFFER1 |
number
|
|
DRAW_BUFFER2 |
number
|
|
DRAW_BUFFER3 |
number
|
|
DRAW_BUFFER4 |
number
|
|
DRAW_BUFFER5 |
number
|
|
DRAW_BUFFER6 |
number
|
|
DRAW_BUFFER7 |
number
|
|
DRAW_BUFFER8 |
number
|
|
DRAW_BUFFER9 |
number
|
|
DRAW_BUFFER10 |
number
|
|
DRAW_BUFFER11 |
number
|
|
DRAW_BUFFER12 |
number
|
|
DRAW_BUFFER13 |
number
|
|
DRAW_BUFFER14 |
number
|
|
DRAW_BUFFER15 |
number
|
|
MAX_FRAGMENT_UNIFORM_COMPONENTS |
number
|
|
MAX_VERTEX_UNIFORM_COMPONENTS |
number
|
|
SAMPLER_3D |
number
|
|
SAMPLER_2D_SHADOW |
number
|
|
FRAGMENT_SHADER_DERIVATIVE_HINT |
number
|
|
PIXEL_PACK_BUFFER |
number
|
|
PIXEL_UNPACK_BUFFER |
number
|
|
PIXEL_PACK_BUFFER_BINDING |
number
|
|
PIXEL_UNPACK_BUFFER_BINDING |
number
|
|
FLOAT_MAT2x3 |
number
|
|
FLOAT_MAT2x4 |
number
|
|
FLOAT_MAT3x2 |
number
|
|
FLOAT_MAT3x4 |
number
|
|
FLOAT_MAT4x2 |
number
|
|
FLOAT_MAT4x3 |
number
|
|
SRGB |
number
|
|
SRGB8 |
number
|
|
SRGB8_ALPHA8 |
number
|
|
COMPARE_REF_TO_TEXTURE |
number
|
|
RGBA32F |
number
|
|
RGB32F |
number
|
|
RGBA16F |
number
|
|
RGB16F |
number
|
|
VERTEX_ATTRIB_ARRAY_INTEGER |
number
|
|
MAX_ARRAY_TEXTURE_LAYERS |
number
|
|
MIN_PROGRAM_TEXEL_OFFSET |
number
|
|
MAX_PROGRAM_TEXEL_OFFSET |
number
|
|
MAX_VARYING_COMPONENTS |
number
|
|
TEXTURE_2D_ARRAY |
number
|
|
TEXTURE_BINDING_2D_ARRAY |
number
|
|
R11F_G11F_B10F |
number
|
|
UNSIGNED_INT_10F_11F_11F_REV |
number
|
|
RGB9_E5 |
number
|
|
UNSIGNED_INT_5_9_9_9_REV |
number
|
|
TRANSFORM_FEEDBACK_BUFFER_MODE |
number
|
|
MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS |
number
|
|
TRANSFORM_FEEDBACK_VARYINGS |
number
|
|
TRANSFORM_FEEDBACK_BUFFER_START |
number
|
|
TRANSFORM_FEEDBACK_BUFFER_SIZE |
number
|
|
TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN |
number
|
|
RASTERIZER_DISCARD |
number
|
|
MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS |
number
|
|
MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS |
number
|
|
INTERLEAVED_ATTRIBS |
number
|
|
SEPARATE_ATTRIBS |
number
|
|
TRANSFORM_FEEDBACK_BUFFER |
number
|
|
TRANSFORM_FEEDBACK_BUFFER_BINDING |
number
|
|
RGBA32UI |
number
|
|
RGB32UI |
number
|
|
RGBA16UI |
number
|
|
RGB16UI |
number
|
|
RGBA8UI |
number
|
|
RGB8UI |
number
|
|
RGBA32I |
number
|
|
RGB32I |
number
|
|
RGBA16I |
number
|
|
RGB16I |
number
|
|
RGBA8I |
number
|
|
RGB8I |
number
|
|
RED_INTEGER |
number
|
|
RGB_INTEGER |
number
|
|
RGBA_INTEGER |
number
|
|
SAMPLER_2D_ARRAY |
number
|
|
SAMPLER_2D_ARRAY_SHADOW |
number
|
|
SAMPLER_CUBE_SHADOW |
number
|
|
UNSIGNED_INT_VEC2 |
number
|
|
UNSIGNED_INT_VEC3 |
number
|
|
UNSIGNED_INT_VEC4 |
number
|
|
INT_SAMPLER_2D |
number
|
|
INT_SAMPLER_3D |
number
|
|
INT_SAMPLER_CUBE |
number
|
|
INT_SAMPLER_2D_ARRAY |
number
|
|
UNSIGNED_INT_SAMPLER_2D |
number
|
|
UNSIGNED_INT_SAMPLER_3D |
number
|
|
UNSIGNED_INT_SAMPLER_CUBE |
number
|
|
UNSIGNED_INT_SAMPLER_2D_ARRAY |
number
|
|
DEPTH_COMPONENT32F |
number
|
|
DEPTH32F_STENCIL8 |
number
|
|
FLOAT_32_UNSIGNED_INT_24_8_REV |
number
|
|
FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING |
number
|
|
FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE |
number
|
|
FRAMEBUFFER_ATTACHMENT_RED_SIZE |
number
|
|
FRAMEBUFFER_ATTACHMENT_GREEN_SIZE |
number
|
|
FRAMEBUFFER_ATTACHMENT_BLUE_SIZE |
number
|
|
FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE |
number
|
|
FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE |
number
|
|
FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE |
number
|
|
FRAMEBUFFER_DEFAULT |
number
|
|
UNSIGNED_INT_24_8 |
number
|
|
DEPTH24_STENCIL8 |
number
|
|
UNSIGNED_NORMALIZED |
number
|
|
DRAW_FRAMEBUFFER_BINDING |
number
|
|
READ_FRAMEBUFFER |
number
|
|
DRAW_FRAMEBUFFER |
number
|
|
READ_FRAMEBUFFER_BINDING |
number
|
|
RENDERBUFFER_SAMPLES |
number
|
|
FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER |
number
|
|
MAX_COLOR_ATTACHMENTS |
number
|
|
COLOR_ATTACHMENT1 |
number
|
|
COLOR_ATTACHMENT2 |
number
|
|
COLOR_ATTACHMENT3 |
number
|
|
COLOR_ATTACHMENT4 |
number
|
|
COLOR_ATTACHMENT5 |
number
|
|
COLOR_ATTACHMENT6 |
number
|
|
COLOR_ATTACHMENT7 |
number
|
|
COLOR_ATTACHMENT8 |
number
|
|
COLOR_ATTACHMENT9 |
number
|
|
COLOR_ATTACHMENT10 |
number
|
|
COLOR_ATTACHMENT11 |
number
|
|
COLOR_ATTACHMENT12 |
number
|
|
COLOR_ATTACHMENT13 |
number
|
|
COLOR_ATTACHMENT14 |
number
|
|
COLOR_ATTACHMENT15 |
number
|
|
FRAMEBUFFER_INCOMPLETE_MULTISAMPLE |
number
|
|
MAX_SAMPLES |
number
|
|
HALF_FLOAT |
number
|
|
RG |
number
|
|
RG_INTEGER |
number
|
|
R8 |
number
|
|
RG8 |
number
|
|
R16F |
number
|
|
R32F |
number
|
|
RG16F |
number
|
|
RG32F |
number
|
|
R8I |
number
|
|
R8UI |
number
|
|
R16I |
number
|
|
R16UI |
number
|
|
R32I |
number
|
|
R32UI |
number
|
|
RG8I |
number
|
|
RG8UI |
number
|
|
RG16I |
number
|
|
RG16UI |
number
|
|
RG32I |
number
|
|
RG32UI |
number
|
|
VERTEX_ARRAY_BINDING |
number
|
|
R8_SNORM |
number
|
|
RG8_SNORM |
number
|
|
RGB8_SNORM |
number
|
|
RGBA8_SNORM |
number
|
|
SIGNED_NORMALIZED |
number
|
|
COPY_READ_BUFFER |
number
|
|
COPY_WRITE_BUFFER |
number
|
|
COPY_READ_BUFFER_BINDING |
number
|
|
COPY_WRITE_BUFFER_BINDING |
number
|
|
UNIFORM_BUFFER |
number
|
|
UNIFORM_BUFFER_BINDING |
number
|
|
UNIFORM_BUFFER_START |
number
|
|
UNIFORM_BUFFER_SIZE |
number
|
|
MAX_VERTEX_UNIFORM_BLOCKS |
number
|
|
MAX_FRAGMENT_UNIFORM_BLOCKS |
number
|
|
MAX_COMBINED_UNIFORM_BLOCKS |
number
|
|
MAX_UNIFORM_BUFFER_BINDINGS |
number
|
|
MAX_UNIFORM_BLOCK_SIZE |
number
|
|
MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS |
number
|
|
MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS |
number
|
|
UNIFORM_BUFFER_OFFSET_ALIGNMENT |
number
|
|
ACTIVE_UNIFORM_BLOCKS |
number
|
|
UNIFORM_TYPE |
number
|
|
UNIFORM_SIZE |
number
|
|
UNIFORM_BLOCK_INDEX |
number
|
|
UNIFORM_OFFSET |
number
|
|
UNIFORM_ARRAY_STRIDE |
number
|
|
UNIFORM_MATRIX_STRIDE |
number
|
|
UNIFORM_IS_ROW_MAJOR |
number
|
|
UNIFORM_BLOCK_BINDING |
number
|
|
UNIFORM_BLOCK_DATA_SIZE |
number
|
|
UNIFORM_BLOCK_ACTIVE_UNIFORMS |
number
|
|
UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES |
number
|
|
UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER |
number
|
|
UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER |
number
|
|
INVALID_INDEX |
number
|
|
MAX_VERTEX_OUTPUT_COMPONENTS |
number
|
|
MAX_FRAGMENT_INPUT_COMPONENTS |
number
|
|
MAX_SERVER_WAIT_TIMEOUT |
number
|
|
OBJECT_TYPE |
number
|
|
SYNC_CONDITION |
number
|
|
SYNC_STATUS |
number
|
|
SYNC_FLAGS |
number
|
|
SYNC_FENCE |
number
|
|
SYNC_GPU_COMMANDS_COMPLETE |
number
|
|
UNSIGNALED |
number
|
|
SIGNALED |
number
|
|
ALREADY_SIGNALED |
number
|
|
TIMEOUT_EXPIRED |
number
|
|
CONDITION_SATISFIED |
number
|
|
WAIT_FAILED |
number
|
|
SYNC_FLUSH_COMMANDS_BIT |
number
|
|
VERTEX_ATTRIB_ARRAY_DIVISOR |
number
|
|
ANY_SAMPLES_PASSED |
number
|
|
ANY_SAMPLES_PASSED_CONSERVATIVE |
number
|
|
SAMPLER_BINDING |
number
|
|
RGB10_A2UI |
number
|
|
INT_2_10_10_10_REV |
number
|
|
TRANSFORM_FEEDBACK |
number
|
|
TRANSFORM_FEEDBACK_PAUSED |
number
|
|
TRANSFORM_FEEDBACK_ACTIVE |
number
|
|
TRANSFORM_FEEDBACK_BINDING |
number
|
|
COMPRESSED_R11_EAC |
number
|
|
COMPRESSED_SIGNED_R11_EAC |
number
|
|
COMPRESSED_RG11_EAC |
number
|
|
COMPRESSED_SIGNED_RG11_EAC |
number
|
|
COMPRESSED_RGB8_ETC2 |
number
|
|
COMPRESSED_SRGB8_ETC2 |
number
|
|
COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 |
number
|
|
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 |
number
|
|
COMPRESSED_RGBA8_ETC2_EAC |
number
|
|
COMPRESSED_SRGB8_ALPHA8_ETC2_EAC |
number
|
|
TEXTURE_IMMUTABLE_FORMAT |
number
|
|
MAX_ELEMENT_INDEX |
number
|
|
TEXTURE_IMMUTABLE_LEVELS |
number
|
|
MAX_TEXTURE_MAX_ANISOTROPY_EXT |
number
|
|
缠绕顺序 定义将三角形视为正面的顶点顺序。
Properties:
Name |
Type |
Description |
CLOCKWISE |
number
|
顶点按顺时针顺序排列。 |
COUNTER_CLOCKWISE |
number
|
顶点按逆时针顺序排列。 |
Methods
计算一个点相对于一个三角形的质心坐标。
Returns:
如果没有提供新的Cartesian3实例,则使用修改后的结果参数。如果三角形是退化的,函数将返回undefined。
Example:
// Returns Cartesian3.UNIT_X
const p = new Cesium.Cartesian3(-1.0, 0.0, 0.0);
const b = Cesium.barycentricCoordinates(p,
new Cesium.Cartesian3(-1.0, 0.0, 0.0),
new Cesium.Cartesian3( 1.0, 0.0, 0.0),
new Cesium.Cartesian3( 0.0, 1.0, 1.0));
在已排序的数组中查找项。
Name |
Type |
Description |
array |
Array
|
要搜索的排序数组。 |
itemToFind |
*
|
要在数组中查找的项。 |
comparator |
binarySearchComparator
|
用于比较项的函数
数组中的元素。 |
Returns:
itemToFind
在数组中的索引(如果存在)。如果itemToFind
不存在,返回值是一个负数,是位补码(~)
在索引之前插入itemToFind以维护索引的
数组的排序顺序。
Example:
// Create a comparator function to search through an array of numbers.
function comparator(a, b) {
return a - b;
};
const numbers = [0, 2, 4, 6, 8];
const index = Cesium.binarySearch(numbers, 6, comparator); // 3
给定Cesium基础URL下的相对URL,返回绝对URL。
Name |
Type |
Description |
relativeUrl |
string
|
相对路径。 |
Returns:
所提供路径的绝对URL表示形式。
Example:
const viewer = new Cesium.Viewer("cesiumContainer", {
baseLayer: Cesium.ImageryLayer.fromProviderAsync(
Cesium.TileMapServiceImageryProvider.fromUrl(
Cesium.buildModuleUrl("Assets/Textures/NaturalEarthII"),
)),
baseLayerPicker: false,
});
克隆对象,返回包含相同属性的新对象。
Name |
Type |
Default |
Description |
object |
object
|
|
要克隆的对象。 |
deep |
boolean
|
false
|
optional
如果为 true,则所有属性都将递归深度克隆。 |
Returns:
克隆的对象。
合并两个对象,将其属性复制到新的组合对象上。当两个对象具有相同的
属性,则使用第一个对象上的属性值。 如果任一对象未定义,则
它将被视为空对象。
Name |
Type |
Default |
Description |
object1 |
object
|
|
optional
第一个object to merge. |
object2 |
object
|
|
optional
第二个 object to merge. |
deep |
boolean
|
false
|
optional
Perform a recursive merge. |
Returns:
The combined object containing all properties from both objects.
Example:
const object1 = {
propOne : 1,
propTwo : {
value1 : 10
}
}
const object2 = {
propTwo : 2
}
const final = Cesium.combine(object1, object2);
// final === {
// propOne : 1,
// propTwo : {
// value1 : 10
// }
// }
计算描述绘图缓冲区部分的矩形
这与拣选相关。
Name |
Type |
Description |
drawingBufferHeight |
number
|
绘图缓冲区的高度 |
position |
Cartesian2
|
绘图缓冲区内的位置 |
width |
number
|
undefined
|
矩形的宽度,假设为
为奇数,默认值:3.0 |
height |
number
|
undefined
|
矩形的高度。如果未指定,则
height 将默认为 width 的值 |
result |
BoundingRectangle
|
结果 rectangle |
Returns:
结果矩形
从给定的 JSON 表示形式创建 'AnchorPointDirect'
Name |
Type |
Description |
anchorPointDirectJson |
object
|
输入 JSON |
Returns:
直接锚点
从给定的 JSON 表示形式创建 'AnchorPointIndirect'
Name |
Type |
Description |
anchorPointIndirectJson |
object
|
输入 JSON |
Returns:
间接锚点
从给定的函数创建命令,用于ViewModels。
命令是一个函数,它带有一个额外的 canExecute
observable属性来判断
命令是否能执行。执行时,Command函数将检查
canExecute
并抛出如果false。它还提供了何时的事件
命令已执行或即将执行。
Name |
Type |
Default |
Description |
func |
function
|
|
要执行的函数。 |
canExecute |
boolean
|
true
|
optional
一个布尔值,指示当前是否可以执行函数。 |
从给定的 JSON 表示形式创建 'CorrelationGroup'
Name |
Type |
Description |
correlationGroupJson |
object
|
输入 JSON |
Returns:
相关组
创建一个描述协方差矩阵(即
symmetric) 从包含上三角形的数组中,在
列优先顺序。
Name |
Type |
Description |
array |
Array.<number>
|
The input array |
Returns:
The Matrix3
创建一个
Material
,该材质将多个颜色/渐变带层组合在一起,并将它们映射到地形高度。
着色器对所有高度进行二进制搜索,以找出哪些颜色高于和低于给定高度,并且
在它们之间插值以获得最终颜色。此材料以相对便宜的价格支持数百个条目。
Name |
Type |
Description |
options |
object
|
对象,具有以下属性:
|
Returns:
Example:
scene.globe.material = Cesium.createElevationBandMaterial({
scene : scene,
layers : [{
entries : [{
height : 4200.0,
color : new Cesium.Color(0.0, 0.0, 0.0, 1.0)
}, {
height : 8848.0,
color : new Cesium.Color(1.0, 1.0, 1.0, 1.0)
}],
extendDownwards : true,
extendUpwards : true,
}, {
entries : [{
height : 7000.0,
color : new Cesium.Color(1.0, 0.0, 0.0, 0.5)
}, {
height : 7100.0,
color : new Cesium.Color(1.0, 0.0, 0.0, 0.5)
}]
}]
});
Demo:
为 Google 照片级真实感 3D 创建一个
Cesium3DTileset
实例
瓦片图块集。
Google 逼真 3D 瓦片只能与 Google 地理编码器一起使用。 自
确认您了解此限制通行证
'usingOnlyWithGoogleGeocoder: true' 添加到 apiOptions。 否则为一次性
调用此函数时将显示警告。
Returns:
Examples:
const viewer = new Cesium.Viewer("cesiumContainer", {
geocoder: Cesium.IonGeocodeProviderType.GOOGLE
});
try {
const tileset = await Cesium.createGooglePhotorealistic3DTileset({
onlyUsingWithGoogleGeocoder: true,
});
viewer.scene.primitives.add(tileset));
} catch (error) {
console.log(`Error creating tileset: ${error}`);
}
// Use your own Google Maps API key
Cesium.GoogleMaps.defaultApiKey = "your-api-key";
const viewer = new Cesium.Viewer("cesiumContainer". {
geocoder: Cesium.IonGeocodeProviderType.GOOGLE
});
try {
const tileset = await Cesium.createGooglePhotorealistic3DTileset({
onlyUsingWithGoogleGeocoder: true,
});
viewer.scene.primitives.add(tileset));
} catch (error) {
console.log(`Error creating tileset: ${error}`);
}
See:
创建全局唯一标识符 (GUID) 字符串。 GUID 的长度为 128 位,可以保证跨空间和时间的唯一性。
Returns:
Example:
this.guid = Cesium.createGuid();
See:
Name |
Type |
Description |
options |
object
|
optional
构造选项。Cesium3DTileset 构造函数允许的任何选项
可在此处指定。除此之外,还支持以下属性:
Name |
Type |
Default |
Description |
defaultColor |
Color
|
Color.WHITE
|
optional
用于建筑物的默认颜色
没有颜色。如果指定了 options.style ,则忽略此参数。 |
style |
Cesium3DTileStyle
|
|
optional
用于图块集的样式。如果不是
指定时,将使用默认样式,该样式为每个建筑物或建筑物部分提供
从其 OpenStreetMap 标签 推断出的颜色。如果无法推断出颜色,
options.defaultColor 的 |
enableShowOutline |
boolean
|
true
|
optional
如果为 true,则启用渲染轮廓。可以将其设置为 false,以避免在加载时对几何体进行额外处理。 |
showOutline |
boolean
|
true
|
optional
是否显示建筑物周围的轮廓。如果为 true,则
显示轮廓。如果为 false,则不显示轮廓。 |
|
Returns:
Examples:
// Create Cesium OSM Buildings with default styling
const viewer = new Cesium.Viewer("cesiumContainer");
try {
const tileset = await Cesium.createOsmBuildingsAsync();
viewer.scene.primitives.add(tileset));
} catch (error) {
console.log(`Error creating tileset: ${error}`);
}
// Create Cesium OSM Buildings with a custom style highlighting
// schools and hospitals.
const viewer = new Cesium.Viewer("cesiumContainer");
try {
const tileset = await Cesium.createOsmBuildingsAsync({
style: new Cesium.Cesium3DTileStyle({
color: {
conditions: [
["${feature['building']} === 'hospital'", "color('#0000FF')"],
["${feature['building']} === 'school'", "color('#00FF00')"],
[true, "color('#ffffff')"]
]
}
})
});
viewer.scene.primitives.add(tileset));
} catch (error) {
console.log(`Error creating tileset: ${error}`);
}
See:
创建一个
Primitive
来可视化已知的向量顶点属性:
法线
、
切线
和
双切线
。 正常
为红色;tangent 为绿色;Bitangent 是蓝色的。 如果属性不是
present,则不绘制。
Name |
Type |
Description |
options |
object
|
对象,具有以下属性:
Name |
Type |
Default |
Description |
geometry |
Geometry
|
|
具有属性的 Geometry 实例。 |
length |
number
|
10000.0
|
optional
每条线段的长度,以米为单位。 这可以是负数,以将向量指向相反的方向。 |
modelMatrix |
Matrix4
|
Matrix4.IDENTITY
|
optional
转换以将几何体从模型坐标转换为世界坐标的模型矩阵。 |
|
Returns:
一个新的 Primitive
实例,带有向量的几何体。
Example:
scene.primitives.add(Cesium.createTangentSpaceDebugPrimitive({
geometry : instance.geometry,
length : 100000.0,
modelMatrix : instance.modelMatrix
}));
Name |
Type |
Description |
options |
Object
|
optional
对象,具有以下属性:
Name |
Type |
Default |
Description |
requestVertexNormals |
Boolean
|
false
|
optional
指示客户端是否应从服务器请求其他照明信息(如果可用)的标志。 |
|
Returns:
解析为创建的 CesiumTerrainProvider 的 Promise
Examples:
// Create Cesium World Bathymetry with default settings
try {
const viewer = new Cesium.Viewer("cesiumContainer", {
terrainProvider: await Cesium.createWorldBathymetryAsync();
});
} catch (error) {
console.log(error);
}
// Create Cesium World Bathymetry with normals.
try {
const viewer1 = new Cesium.Viewer("cesiumContainer", {
terrainProvider: await Cesium.createWorldBathymetryAsync({
requestVertexNormals: true
});
});
} catch (error) {
console.log(error);
}
See:
Name |
Type |
Description |
options |
Object
|
optional
对象,具有以下属性:
Name |
Type |
Default |
Description |
style |
IonWorldImageryStyle
|
IonWorldImageryStyle
|
optional
基础影像的样式,目前仅支持 AERIAL、AERIAL_WITH_LABELS 和 ROAD。 |
|
Returns:
Examples:
// Create a Cesium World Imagery base layer with default settings
try {
const imageryProvider = await Cesium.createWorldImageryAsync();
} catch (error) {
console.log(`There was an error creating world imagery: ${error}`);
}
// Create Cesium World Imagery with different style
try {
const imageryProvider = await Cesium.createWorldImageryAsync({
style: Cesium.IonWorldImageryStyle.AERIAL_WITH_LABELS
});
} catch (error) {
console.log(`There was an error creating world imagery: ${error}`);
}
See:
Name |
Type |
Description |
options |
Object
|
optional
对象,具有以下属性:
Name |
Type |
Default |
Description |
requestVertexNormals |
Boolean
|
false
|
optional
指示客户端是否应从服务器请求其他照明信息(如果可用)的标志。 |
requestWaterMask |
Boolean
|
false
|
optional
指示客户端是否应从服务器请求每个图块水面具(如果可用)的标志。 |
|
Returns:
解析为创建的 CesiumTerrainProvider 的 Promise
Examples:
// Create Cesium World Terrain with default settings
try {
const viewer = new Cesium.Viewer("cesiumContainer", {
terrainProvider: await Cesium.createWorldTerrainAsync();
});
} catch (error) {
console.log(error);
}
// Create Cesium World Terrain with water and normals.
try {
const viewer1 = new Cesium.Viewer("cesiumContainer", {
terrainProvider: await Cesium.createWorldTerrainAsync({
requestWaterMask: true,
requestVertexNormals: true
});
});
} catch (error) {
console.log(error);
}
See:
如果未定义,则返回第一个参数,否则返回第二个参数。
用于设置参数的默认值。
Name |
Type |
Description |
a |
*
|
|
b |
*
|
|
Returns:
如果不是 undefined,则返回第一个参数,否则返回第二个参数。
This function is deprecated and will be removed in Cesium 1.134. See Issue 11674.
Use the Nullish coalescing operator instead
Example:
param = Cesium.defaultValue(param, 'default');
Name |
Type |
Description |
value |
*
|
对象。 |
Returns:
如果对象已定义,则返回 true,否则返回 false。
Example:
if (Cesium.defined(positions)) {
doSomething();
} else {
doSomethingElse();
}
销毁对象。 对象的每个函数(包括其原型中的函数
替换为抛出
DeveloperError
的函数,但对象的
isDestroyed
函数,该函数设置为返回
true
的函数。
对象的属性将通过
delete
删除。
此函数由持有原生资源的对象使用,例如 WebGL 资源,其
需要明确发布。 客户端代码调用对象的
destroy
函数
然后释放本机资源并调用
destroyObject
将自身
处于已销毁状态。
Name |
Type |
Description |
object |
object
|
要销毁的对象。 |
message |
string
|
optional
要包含在抛出的异常中的消息
调用已销毁对象的函数。 |
Example:
// How a texture would destroy itself.
this.destroy = function () {
_gl.deleteTexture(_texture);
return Cesium.destroyObject(this);
};
See:
将 EntityCollection 导出为 KML 文档。仅点、公告牌、模型、路径、多边形、折线几何图形
将被导出。请注意,图元属性与 KML 要素属性之间没有 1 对 1 的映射。为
例如,如果实体属性是时间动态的,但在 KML 中不能是动态的,则导出时其值为
options.time 或 EntityCollection 的时间间隔的开始时间(如果未指定)。对于时间动态属性
中支持的 API 中,如果它是
SampledProperty
,则使用样本,否则我们使用
options.sampleDuration 的 Duration。将导出具有时间动态位置的 Point、Billboard、Model 和 Path 几何图形
如 gx:Track Features。并非所有材质都可以在 KML 中表示,因此对于更高级的材质,只有主要材质
使用颜色。Canvas 对象导出为 PNG 图像。
Name |
Type |
Description |
options |
object
|
对象,具有以下属性:
Name |
Type |
Default |
Description |
entities |
EntityCollection
|
|
要导出为 KML 的 EntityCollection。 |
ellipsoid |
Ellipsoid
|
Ellipsoid.default
|
optional
输出文件的椭球体。 |
modelCallback |
exportKmlModelCallback
|
|
optional
将使用 ModelGraphics 实例调用的回调,并应返回要在 KML 中使用的 URI。如果实体集合中存在模型,则为必需。 |
time |
JulianDate
|
entities.computeAvailability().start
|
optional
用于获取在 KML 中不随时间变化的属性的时间值。 |
defaultAvailability |
TimeInterval
|
entities.computeAvailability()
|
optional
如果实体没有可用性,则将采样的间隔。 |
sampleDuration |
number
|
60
|
optional
对 KML 中变化的属性进行采样的秒数。 |
kmz |
boolean
|
false
|
optional
如果为 true,则 KML 和外部文件将被压缩为 kmz 文件。 |
|
Returns:
一个 Promise,该 Promise 解析为包含 KML 字符串和外部文件 blob 字典的对象,如果 options.kmz 为 true,则解析为 kmz 文件作为 blob。
Example:
Cesium.exportKml({
entities: entityCollection
})
.then(function(result) {
// The XML string is in result.kml
const externalFiles = result.externalFiles
for(const file in externalFiles) {
// file is the name of the file used in the KML document as the href
// externalFiles[file] is a blob with the contents of the file
}
});
Demo:
将错误对象格式化为 String。 如果可用,则使用 name、message 和 stack
属性,否则将回退到 toString() 上。
Name |
Type |
Description |
object |
*
|
要在数组中查找的项。 |
Returns:
包含格式化错误的字符串。
给定相对 Uri 和基本 Uri,返回相对 Uri 的绝对 Uri。
Name |
Type |
Description |
relative |
string
|
相对 Uri。 |
base |
string
|
optional
基 Uri。 |
Returns:
给定相对 Uri 的绝对 Uri。
Example:
//absolute Uri will be "https://test.com/awesome.png";
const absoluteUri = Cesium.getAbsoluteUri('awesome.png', 'https://test.com');
给定 URI,返回 URI 的基本路径。
Name |
Type |
Default |
Description |
uri |
string
|
|
The Uri. |
includeQuery |
boolean
|
false
|
optional
是否在 uri 中包含查询字符串和片段 |
Returns:
Uri 的基路径。
Example:
// basePath will be "/Gallery/";
const basePath = Cesium.getBaseUri('/Gallery/simple.czml?value=true&example=false');
// basePath will be "/Gallery/?value=true&example=false";
const basePath = Cesium.getBaseUri('/Gallery/simple.czml?value=true&example=false', true);
给定 URI,返回 URI 的扩展名。
Name |
Type |
Description |
uri |
string
|
The Uri. |
Returns:
Uri 的扩展名。
Example:
//extension will be "czml";
const extension = Cesium.getExtensionFromUri('/Gallery/simple.czml?value=true&example=false');
给定 URI,返回 URI 的最后一段,删除任何路径或查询信息。
Name |
Type |
Description |
uri |
string
|
The Uri. |
Returns:
Uri 的最后一段。
Example:
//fileName will be"simple.czml";
const fileName = Cesium.getFilenameFromUri('/Gallery/simple.czml?value=true&example=false');
返回给定类属性在 GLSL 着色器中具有的类型。
返回与 'PropertyTextureProperty.prototype.getGlslType' 相同的字符串
对于具有给定类属性的属性 texture 属性
Returns:
属性的 GLSL 着色器类型字符串
从加载的图像中提取像素数组。 绘制图像
复制到 Canvas 中,以便它可以读回像素。
Name |
Type |
Description |
image |
HTMLImageElement
|
ImageBitmap
|
要从中提取像素的图像。 |
width |
number
|
图像的宽度。如果未定义,则分配 image.width。 |
height |
number
|
图像的高度。如果未定义,则分配 image.height。 |
Returns:
图像的像素。
getSourceValueStringComponent(classProperty, metadataProperty, componentName) → string
创建一个 shader 语句,该语句返回指定
组件,标准化为范围 [0, 1]。
Name |
Type |
Description |
classProperty |
MetadataClassProperty
|
类属性 |
metadataProperty |
object
|
元数据属性,或者
一个 'PropertyTextureProperty' 或 'PropertyAttributeProperty' |
componentName |
string
|
名称位于 ["x", "y", "z", "w"] |
Returns:
字符串
创建一个 shader 语句,该语句返回指定
属性,规范化为 [0, 1] 范围。
Name |
Type |
Description |
classProperty |
MetadataClassProperty
|
类属性 |
metadataProperty |
object
|
元数据属性,或者
一个 'PropertyTextureProperty' 或 'PropertyAttributeProperty' |
Returns:
字符串
获取可用于测量事件之间时间的时间戳。 时间戳
以毫秒表示,但没有指定毫秒数
测量起始。 此函数使用 performance.now() 如果是 available, 或 Date.now()
否则.
Returns:
自某个未指定的引用时间以来的时间戳(以毫秒为单位)。
确定给定日期是否为闰年。
Name |
Type |
Description |
year |
number
|
待测年份。 |
Returns:
如果 year
是闰年,则为 True。
Example:
const leapYear = Cesium.isLeapYear(2000); // true
Loads the gltf object
稳定的合并排序。
Name |
Type |
Description |
array |
Array
|
要排序的数组。 |
comparator |
mergeSortComparator
|
用于比较数组中元素的函数。 |
userDefinedObject |
*
|
optional
作为第三个参数传递给 comparator 的任何项目。 |
Example:
// Assume array contains BoundingSpheres in world coordinates.
// Sort them in ascending order of distance from the camera.
const position = camera.positionWC;
Cesium.mergeSort(array, function(a, b, position) {
return Cesium.BoundingSphere.distanceSquaredTo(b, position) - Cesium.BoundingSphere.distanceSquaredTo(a, position);
}, position);
将表示一组名称/值对的对象转换为查询字符串,
对名称和值进行正确编码,以便在 URL 中使用。 数组值
将生成多个具有相同名称的值。
Name |
Type |
Description |
obj |
object
|
包含要编码的数据的对象。 |
Returns:
编码的查询字符串。
Example:
const str = Cesium.objectToQuery({
key1 : 'some value',
key2 : 'a/b',
key3 : ['x', 'y']
});
See:
- queryToObject
// str will be:
// 'key1=some%20value&key2=a%2Fb&key3=x&key3=y'
确定如何处理半透明表面。
启用 OIT 后,这将委托给 OIT.executeCommands。
否则,它将只是 executeTranslucentCommandsBackToFront
用于渲染通道,或 executeTranslucentCommandsFrontToBack 用于
其他通行证。
Name |
Type |
Description |
scene |
Scene
|
场景。 |
Returns:
执行半透明命令的函数。
确定点是否位于三角形内。
Returns:
如果点位于三角形内部,则为 true
;否则为 false
。
Example:
// Returns true
const p = new Cesium.Cartesian2(0.25, 0.25);
const b = Cesium.pointInsideTriangle(p,
new Cesium.Cartesian2(0.0, 0.0),
new Cesium.Cartesian2(1.0, 0.0),
new Cesium.Cartesian2(0.0, 1.0));
将查询字符串解析为对象,其中对象的键和值是
查询字符串中的名称/值对,解码。如果名称出现多次,
对象中的值将是一个值数组。
Name |
Type |
Description |
queryString |
string
|
查询字符串。 |
Returns:
包含从查询字符串解析的参数的对象。
Example:
const obj = Cesium.queryToObject('key1=some%20value&key2=a%2Fb&key3=x&key3=y');
// obj will be:
// {
// key1 : 'some value',
// key2 : 'a/b',
// key3 : ['x', 'y']
// }
See:
从 gltf.extensions、gltf.extensionsUsed、gltf.extensionsRequired 和 glTF 中的任何其他对象(如果存在)中删除扩展。
Name |
Type |
Description |
gltf |
object
|
一个包含 glTF 资产的 javascript 对象。 |
extension |
string
|
要删除的扩展。 |
Returns:
从 gltf.extensions 中删除的扩展数据。
通过以下方式对
Cartographic
位置数组启动地形高度查询
向地形提供商请求瓦片、采样和插值。 插值
匹配用于在指定级别渲染地形的三角形。 查询
异步发生,因此此函数返回一个 Promise,该 Promise 在
查询完成。 每个点高度都已就地修改。 如果高度不能
确定,因为该位置的指定标高没有可用的地形数据,
或发生其他错误时,高度将设置为 undefined。 作为典型的
Cartographic
类型,则提供的高度是高于参考椭球体的高度
(例如
Ellipsoid.WGS84
),而不是高于平均海平面的高度。 在其他
单词,如果在 Ocean 中采样,它不一定是 0.0。此函数需要
地形细节级别作为输入,如果您需要精确获取地形的高度
尽可能 (即具有最高级别的细节) 使用
sampleTerrainMostDetailed
。
Name |
Type |
Default |
Description |
terrainProvider |
TerrainProvider
|
|
从中查询高度的 terrain 提供程序。 |
level |
number
|
|
从中查询地形高度的地形细节级别。 |
positions |
Array.<Cartographic>
|
|
要随地形高度更新的位置。 |
rejectOnTileFail |
boolean
|
false
|
optional
如果为 true,则对于任何失败的地形瓦片请求,承诺都将被拒绝。如果为 false,则返回的高度将是 undefined。 |
Returns:
当 terrain 查询完成时,解析为提供的位置列表的 Promise。
Example:
// Query the terrain height of two Cartographic positions
const terrainProvider = await Cesium.createWorldTerrainAsync();
const positions = [
Cesium.Cartographic.fromDegrees(86.925145, 27.988257),
Cesium.Cartographic.fromDegrees(87.0, 28.0)
];
const updatedPositions = await Cesium.sampleTerrain(terrainProvider, 11, positions);
// positions[0].height and positions[1].height have been updated.
// updatedPositions is just a reference to positions.
// To handle tile errors, pass true for the rejectOnTileFail parameter.
try {
const updatedPositions = await Cesium.sampleTerrain(terrainProvider, 11, positions, true);
} catch (error) {
// A tile request error occurred.
}
See:
在 terrain 数据集的最大可用瓦片级别启动 sampleTerrain() 请求。
Name |
Type |
Default |
Description |
terrainProvider |
TerrainProvider
|
|
从中查询高度的 terrain 提供程序。 |
positions |
Array.<Cartographic>
|
|
要随地形高度更新的位置。 |
rejectOnTileFail |
boolean
|
false
|
optional
如果为 true,则对于失败的地形瓦片请求,承诺将被拒绝。如果为 false,则返回的高度将是 undefined。 |
Returns:
当 terrain 查询完成时,解析为提供的位置列表的 Promise。 这
如果地形提供程序的 'availability' 属性未定义,则 promise 将拒绝。
Example:
// Query the terrain height of two Cartographic positions
const terrainProvider = await Cesium.createWorldTerrainAsync();
const positions = [
Cesium.Cartographic.fromDegrees(86.925145, 27.988257),
Cesium.Cartographic.fromDegrees(87.0, 28.0)
];
const updatedPositions = await Cesium.sampleTerrainMostDetailed(terrainProvider, positions);
// positions[0].height and positions[1].height have been updated.
// updatedPositions is just a reference to positions.
// To handle tile errors, pass true for the rejectOnTileFail parameter.
try {
const updatedPositions = await Cesium.sampleTerrainMostDetailed(terrainProvider, positions, true);
} catch (error) {
// A tile request error occurred.
}
将值从 sRGB 色彩空间转换为线性色彩空间。
Name |
Type |
Description |
value |
number
|
sRGB 色彩空间中的颜色值。 |
Returns:
返回线性色彩空间中的颜色值。
Example:
const srgbColor = [0.5, 0.5, 0.5];
const linearColor = srgbColor.map(function (c) {
return Cesium.srgbToLinear(c);
});
表示立体坐标中的点,可以通过将笛卡尔坐标从一个极点投影到另一个极点的切平面上来获得。
立体投影忠实地表示通过其中心点的所有大圆的相对方向。
为了忠实地表示所有位置的角度,这是一种等角投影,这意味着点被投影到任意球体上。
将数组细分为多个大小相等的较小数组。
Name |
Type |
Description |
array |
Array
|
要划分的数组。 |
numberOfArrays |
number
|
要将提供的数组划分为的数组数。 |
Throws:
返回一个 shader 语句,该语句应用
value 根据给定的偏移量转换为给定的值
和缩放。
Name |
Type |
Description |
input |
string
|
输入值 |
offset |
string
|
偏移量 |
scale |
string
|
刻度 |
Returns:
语句
返回一个 shader 语句,该语句应用
归一化,基于给定的组件类型
Name |
Type |
Description |
input |
string
|
输入值 |
componentType |
string
|
组件类型 |
Returns:
语句
Name |
Type |
Description |
viewer |
Viewer
|
查看器实例。 |
Example:
const viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerCesium3DTilesInspectorMixin);
将CesiumInspector小部件添加到Viewer小部件的mixin。
不是直接调用,这个函数通常作为
Viewer#extend
的参数,如下例所示。
Name |
Type |
Description |
viewer |
Viewer
|
查看器实例。 |
Throws:
Example:
const viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerCesiumInspectorMixin);
Demo:
一个添加默认拖放支持CZML文件到Viewer小部件的mixin。
不是直接调用,这个函数通常作为
Viewer#extend
的参数,如下例所示。
Name |
Type |
Description |
viewer |
Viewer
|
查看器实例。 |
options |
object
|
optional
对象,具有以下属性:
Name |
Type |
Default |
Description |
dropTarget |
Element
|
string
|
viewer.container
|
optional
作为拖放目标的DOM元素。 |
clearOnDrop |
boolean
|
true
|
optional
当为true时,删除文件将首先清除所有现有数据源,当为false时,将在现有数据源之后加载新数据源。 |
flyToOnDrop |
boolean
|
true
|
optional
如果为true,则加载数据源后,删除文件将飞到数据源。 |
clampToGround |
boolean
|
true
|
optional
如果为true,则数据源被限制在地面上。 |
proxy |
Proxy
|
|
optional
要用于KML网络链接的代理。 |
|
Throws:
Example:
// Add basic drag and drop support and pop up an alert window on error.
const viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerDragDropMixin);
viewer.dropError.addEventListener(function(viewerArg, source, error) {
window.alert('Error processing ' + source + ':' + error);
});
Name |
Type |
Description |
viewer |
Viewer
|
查看器实例。 |
options |
object
|
optional
An object with properties.
Name |
Type |
Default |
Description |
lowFrameRateMessage |
string
|
'This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers.'
|
optional
当检测到低帧率时显示的消息。该消息被解释为HTML,因此请确保
它来自可信来源,因此您的应用程序不易受到跨站点脚本攻击。 |
|
Throws:
Example:
const viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerPerformanceWatchdogMixin, {
lowFrameRateMessage : 'Why is this going so <em>slowly</em>?'
});
Name |
Type |
Description |
viewer |
Viewer
|
查看器实例。 |
Example:
var viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerVoxelInspectorMixin);
将给定的文本写入新画布。 画布的大小将调整以适合文本。
如果文本为空,则返回 undefined。
Name |
Type |
Description |
text |
string
|
要写入的文本。 |
options |
object
|
optional
Object 具有以下属性:
Name |
Type |
Default |
Description |
font |
string
|
'10px sans-serif'
|
optional
要使用的 CSS 字体。 |
fill |
boolean
|
true
|
optional
是否填充文本。 |
stroke |
boolean
|
false
|
optional
是否对文本进行描边。 |
fillColor |
Color
|
Color.WHITE
|
optional
填充颜色。 |
strokeColor |
Color
|
Color.BLACK
|
optional
描边颜色。 |
strokeWidth |
number
|
1
|
optional
描边宽度。 |
backgroundColor |
Color
|
Color.TRANSPARENT
|
optional
画布的背景色。 |
padding |
number
|
0
|
optional
要在文本周围添加的填充的像素大小。 |
|
Returns:
绘制了给定文本的新画布。 dimensions 对象
来自 measureText 也将添加到返回的画布中。 如果文本为
为空,返回 undefined。
Type Definitions
在执行二分查找时比较两个项的函数。
Name |
Type |
Description |
a |
*
|
数组中的一项。 |
b |
*
|
正在搜索的项目。 |
Returns:
如果a
小于b
,则返回负值;
如果a
大于b
,则为正数
当a
等于b
时为0。
Example:
function compareNumbers(a, b) {
return a - b;
}
用于控制 WebGL 上下文设置的选项。
allowTextureFilterAnisotropic
默认为 true,这将启用
支持 WebGL 扩展时的各向异性纹理过滤。
将此设置为 false 会提高性能,但会损害视觉质量,
特别适用于地平线视图。
Properties:
Name |
Type |
Attributes |
Default |
Description |
requestWebgl1 |
boolean
|
<optional>
|
false
|
如果为 true 且浏览器支持,则使用 WebGL 1 渲染上下文 |
allowTextureFilterAnisotropic |
boolean
|
<optional>
|
true
|
如果为 true,则在纹理采样期间使用各向异性过滤 |
webgl |
WebGLOptions
|
<optional>
|
|
要传递给 canvas.getContext 的 WebGL 选项 |
getWebGLStub |
function
|
<optional>
|
|
用于创建 WebGL 存根进行测试的函数 |
Properties:
Name |
Type |
Attributes |
Default |
Description |
entries |
Array.<createElevationBandMaterialEntry>
|
|
|
海拔条目列表。它们将自动从最低到最高排序。如果只有一个条目,并且 extendsDownards 和 extendUpwards 均为 false ,则它们都将设置为 true 。 |
extendDownwards |
boolean
|
<optional>
|
false
|
如果为 true ,则波段的最小高程颜色将无限向下延伸。 |
extendUpwards |
boolean
|
<optional>
|
false
|
如果为 true ,则波段的最大仰角颜色将无限向上延伸。 |
Properties:
Name |
Type |
Description |
height |
number
|
高度。 |
color |
Color
|
此高度处的颜色。 |
由一对单位向量给出的方向
Properties:
由于 KML 不支持 glTF 模型,因此在 KML 文档中指定模型使用的 URL 时需要使用此回调。
它还可用于向 externalFiles
对象添加其他文件,该对象是嵌入在导出的 KMZ 中的文件列表。
或导出时返回 KML 字符串。
Name |
Type |
Description |
model |
ModelGraphics
|
实体的 ModelGraphics 实例。 |
time |
JulianDate
|
任何属性用于获取值的时间。 |
externalFiles |
object
|
将文件名映射到 Blob 的对象,或将 Promise 解析为 Blob。 |
Returns:
用于 KML 文档中 href 的 URL。
Properties:
Name |
Type |
Description |
kml |
string
|
生成的 KML. |
externalFiles |
Object.<string, Blob>
|
外部文件的对象字典 |
Properties:
Name |
Type |
Description |
kmz |
Blob
|
The generated kmz file. |
由数字标题、俯仰和滚动给出的方向
Properties:
Name |
Type |
Attributes |
Default |
Description |
heading |
number
|
<optional>
|
0.0
|
以弧度为单位的航向 |
pitch |
number
|
<optional>
|
-CesiumMath.PI_OVER_TWO
|
以弧度为单位的螺距 |
roll |
number
|
<optional>
|
0.0
|
以弧度为单位的滚动 |
ImageryProvider
方法返回图像的格式可能会
因提供商、配置或服务器设置而异。 最常见的是
HTMLImageElement
、
HTMLCanvasElement
或支持
浏览器,
ImageBitmap
。
有关每个 ImageryProvider 类如何返回图像的更多信息,请参阅每个 ImageryProvider 类的文档。
用于在执行归并排序时比较两个项目的函数。
Name |
Type |
Description |
a |
*
|
数组中的一项。 |
b |
*
|
数组中的一项。 |
userDefinedObject |
*
|
optional
传递给 mergeSort 的对象。 |
Returns:
如果 a
小于 b
,则返回负值,
如果 a
大于 b
,则为正值,或
如果 a
等于 b
,则为 0。
Example:
function compareNumbers(a, b, userDefinedObject) {
return a - b;
}
元数据值的实例。
这可以是以下类型之一:
number
用于类型 SCALAR
以及除 INT64
或 UINT64
之外的数字组件类型
bigint
用于类型 SCALAR
元件类型 INT64
或 UINT64
string
用于类型 STRING
或 ENUM
boolean
用于类型 BOOLEAN
Cartesian2
用于类型 VEC2
Cartesian3
用于类型 VEC3
Cartesian4
用于类型 VEC4
Matrix2
用于类型 MAT2
Matrix3
用于类型 MAT3
Matrix4
用于类型 MAT4
- 当元数据值为数组时,这些类型的数组
有关应该选取的元数据的信息
Properties:
Name |
Type |
Description |
schemaId |
string
|
undefined
|
元数据架构的可选 ID |
className |
string
|
元数据类的名称 |
propertyName |
string
|
元数据属性的名称 |
classProperty |
MetadataClassProperty
|
元数据类属性 |
描述 uniform、其类型和初始值的对象
Properties:
Experimental
此功能使用的是 3D Tiles 规范的一部分,该规范不是最终版本,并且可能会在没有 Cesium 标准弃用策略的情况下进行更改。
要传递给 HTMLCanvasElement.getContext().
参见
WebGLContextAttributes
但请注意修改后的 'alpha'、'stencil' 和 'powerPreference' 的默认值
alpha
默认为 false,这可以提高性能
与标准 WebGL 默认值 true 相比。 如果应用程序需要
以使用 alpha 混合将 Cesium 合成到其他 HTML 元素之上,将
alpha
更改为 true。
Properties:
Name |
Type |
Attributes |
Default |
Description |
alpha |
boolean
|
<optional>
|
false
|
|
depth |
boolean
|
<optional>
|
true
|
|
stencil |
boolean
|
<optional>
|
false
|
|
antialias |
boolean
|
<optional>
|
true
|
|
premultipliedAlpha |
boolean
|
<optional>
|
true
|
|
preserveDrawingBuffer |
boolean
|
<optional>
|
false
|
|
powerPreference |
"default"
|
"low-power"
|
"high-performance"
|
<optional>
|
"high-performance"
|
|
failIfMajorPerformanceCaveat |
boolean
|
<optional>
|
false
|
|