Members
ArcGisBaseMapType 枚举了默认支持的 ArcGIS 影像瓦片图层。
Properties:
| Name |
Type |
Description |
SATELLITE |
number
|
|
OCEANS |
number
|
|
HILLSHADE |
number
|
|
See:
ArcType 定义了连接顶点时应采用的路径。
Properties:
| Name |
Type |
Description |
NONE |
number
|
不贴合椭球体表面的直线。 |
GEODESIC |
number
|
沿测地线(geodesic)路径。 |
RHUMB |
number
|
沿等角航线(rhumb/loxodrome)路径。 |
一个描述 x、y、z 轴以及辅助转换函数的枚举。
Properties:
| Name |
Type |
Description |
X |
number
|
表示 x 轴。 |
Y |
number
|
表示 y 轴。 |
Z |
number
|
表示 z 轴。 |
Bing Maps 提供的影像类型。
Properties:
| Name |
Type |
Description |
AERIAL |
string
|
航拍影像(aerial imagery)。 |
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
|
Ordnance Survey 影像。该影像仅在大伦敦(UK)地区可见。 |
COLLINS_BART |
string
|
Collins Bart 影像。 |
See:
确定两个像素的值如何组合。
Properties:
| Name |
Type |
Description |
ADD |
number
|
像素值按分量相加。这用于透明度的加法混合(additive blending)。 |
SUBTRACT |
number
|
像素值按分量相减(源 - 目标)。这用于透明度的 alpha 混合。 |
REVERSE_SUBTRACT |
number
|
像素值按分量相减(目标 - 源)。 |
MIN |
number
|
像素值取最小值函数(min(源, 目标))。该等式作用于每个像素颜色分量。 |
MAX |
number
|
像素值取最大值函数(max(源, 目标))。该等式作用于每个像素颜色分量。 |
确定混合因子(blending factors)如何计算。
Properties:
| Name |
Type |
Description |
ZERO |
number
|
混合因子为零。 |
ONE |
number
|
混合因子为一。 |
SOURCE_COLOR |
number
|
混合因子为源颜色。 |
ONE_MINUS_SOURCE_COLOR |
number
|
混合因子为一减源颜色。 |
DESTINATION_COLOR |
number
|
混合因子为目标颜色。 |
ONE_MINUS_DESTINATION_COLOR |
number
|
混合因子为一减目标颜色。 |
SOURCE_ALPHA |
number
|
混合因子为源 alpha。 |
ONE_MINUS_SOURCE_ALPHA |
number
|
混合因子为一减源 alpha。 |
DESTINATION_ALPHA |
number
|
混合因子为目标 alpha。 |
ONE_MINUS_DESTINATION_ALPHA |
number
|
混合因子为一减目标 alpha。 |
CONSTANT_COLOR |
number
|
混合因子为常量颜色。 |
ONE_MINUS_CONSTANT_COLOR |
number
|
混合因子为一减常量颜色。 |
CONSTANT_ALPHA |
number
|
混合因子为常量 alpha。 |
ONE_MINUS_CONSTANT_ALPHA |
number
|
混合因子为一减常量 alpha。 |
SOURCE_ALPHA_SATURATE |
number
|
混合因子为饱和源 alpha。 |
确定广告牌(billboards)、点和标签的不透明部分与半透明部分如何与场景混合。
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 材质时,技术(technique)必须将 _3DTILESDIFFUSE 语义赋给漫反射颜色参数。否则仅支持 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 Tiles 或两者。
Properties:
| Name |
Type |
Description |
TERRAIN |
number
|
仅对地形进行分类。 |
CESIUM_3D_TILE |
number
|
仅对 3D Tiles 进行分类。 |
BOTH |
number
|
地形和 3D Tiles 都将被分类。 |
Properties:
See:
Properties:
See:
Properties:
| Name |
Type |
Description |
CUMULUS |
number
|
积云(Cumulus cloud)。 |
定义目标颜色与图元源颜色之间的不同混合模式。 HIGHLIGHT 将源颜色乘以目标颜色 REPLACE 用目标颜色替换源颜色 MIX 将源颜色与目标颜色混合在一起
Properties:
| Name |
Type |
Description |
HIGHLIGHT |
number
|
|
REPLACE |
number
|
|
MIX |
number
|
|
See:
WebGL 组件数据类型(component datatypes)。组件是内建类型(intrinsics),它们组成属性(attributes),属性再组成顶点(vertices)。
Properties:
| Name |
Type |
Description |
BYTE |
number
|
8 位有符号字节,对应 gl.BYTE,并且是 Int8Array 中元素的类型。 |
UNSIGNED_BYTE |
number
|
8 位无符号字节,对应 UNSIGNED_BYTE,并且是 Uint8Array 中元素的类型。 |
SHORT |
number
|
16 位有符号短整型,对应 SHORT,并且是 Int16Array 中元素的类型。 |
UNSIGNED_SHORT |
number
|
16 位无符号短整型,对应 UNSIGNED_SHORT,并且是 Uint16Array 中元素的类型。 |
INT |
number
|
32 位有符号整型,对应 INT,并且是 Int32Array 中元素的类型。 |
UNSIGNED_INT |
number
|
32 位无符号整型,对应 UNSIGNED_INT,并且是 Uint32Array 中元素的类型。 |
FLOAT |
number
|
32 位浮点型,对应 FLOAT,并且是 Float32Array 中元素的类型。 |
DOUBLE |
number
|
64 位浮点型,对应 gl.DOUBLE(在桌面版 OpenGL 中;WebGL 不支持此类型,Cesium 通过 GeometryPipeline.encodeAttribute 进行模拟),并且是 Float64Array 中元素的类型。 |
拐角(corners)的样式选项。
Properties:
| Name |
Type |
Description |
ROUNDED |
number
|
拐角具有平滑的边缘。 |
MITERED |
number
|
拐角点为相邻边的交点。 |
BEVELED |
number
|
拐角被裁剪。 |
Demo:
确定哪些三角形(如果有)被剔除(culled)。
Properties:
| Name |
Type |
Description |
FRONT |
number
|
正面三角形被剔除。 |
BACK |
number
|
背面三角形被剔除。 |
FRONT_AND_BACK |
number
|
正面和背面三角形都被剔除。 |
描述
CustomShader 将如何被添加到片元着色器(fragment shader)的枚举。这决定了着色器如何与材质交互。
Properties:
| Name |
Type |
Description |
MODIFY_MATERIAL |
string
|
自定义着色器将用于在应用光照之前修改材质阶段(material stage)的结果。 |
REPLACE_MATERIAL |
string
|
自定义着色器将替代材质阶段使用。这是一个用于优化掉材质处理代码的提示。 |
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.
Properties:
| Name |
Type |
Description |
INHERIT |
number
|
从图元的材质继承透明度设置。如果图元使用了半透明材质,自定义着色器也将被视为半透明。如果图元使用了不透明材质,自定义着色器将被视为不透明。 |
OPAQUE |
number
|
强制图元以不透明方式渲染,忽略任何材质设置。 |
TRANSLUCENT |
number
|
强制图元以半透明方式渲染,忽略任何材质设置。 |
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.
确定用于深度测试(depth test)中比较两个深度值的函数。
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
|
强制动态大气光照始终使用太阳光方向,即使场景使用了不同的光源。 |
Properties:
Experimental
This feature is using part of the glTF spec that is not yet final and is subject to change without Cesium's standard deprecation policy.
See:
已知不包含反向轴顺序且位于 4000-5000 范围内的 EPSG 代码。
用于确定在查询超出可用数据范围时插值(interpolated)值如何外推(extrapolated)的常量。
Properties:
| Name |
Type |
Description |
NONE |
number
|
不发生外推。 |
HOLD |
number
|
在超出样本数据范围时使用第一个或最后一个值。 |
EXTRAPOLATE |
number
|
该值被外推。 |
See:
包围球(BoundingSphere)不存在。
Properties:
| Name |
Type |
Description |
SEARCH |
number
|
执行搜索,将输入视为完整输入。 |
AUTOCOMPLETE |
number
|
使用部分输入执行自动补全(auto-complete),通常保留用于在用户输入时提供可能的结果。 |
See:
用于高度图(heightmap)的编码
Properties:
| Name |
Type |
Description |
NONE |
number
|
无编码 |
LERC |
number
|
LERC 编码 |
表示相对于地形的位置。
Properties:
| Name |
Type |
Description |
NONE |
number
|
位置是绝对的。 |
CLAMP_TO_GROUND |
number
|
位置被钳制(clamped)到地形和 3D Tiles。当钳制到诸如照片级真实感 3D Tiles 之类的 3D Tileset 时,请确保该 tileset 的 Cesium3DTileset#enableCollision 已设为 true。否则,实体可能无法被正确钳制到 tileset 表面。 |
RELATIVE_TO_GROUND |
number
|
位置高度为相对于地形和 3D Tiles 的高度。 |
CLAMP_TO_TERRAIN |
number
|
位置被钳制到地形。 |
RELATIVE_TO_TERRAIN |
number
|
位置高度为相对于地形的高度。 |
CLAMP_TO_3D_TILE |
number
|
位置被钳制到 3D Tiles。 |
RELATIVE_TO_3D_TILE |
number
|
位置高度为相对于 3D Tiles 的高度。 |
原点(origin)相对于对象(例如
Billboard 或
Label)的水平位置。例如,将水平原点设为
LEFT 或
RIGHT 将在锚点位置的左侧或右侧(屏幕空间中)显示广告牌。
Properties:
| Name |
Type |
Description |
CENTER |
number
|
原点位于对象的水平中心。 |
LEFT |
number
|
原点位于对象的左侧。 |
RIGHT |
number
|
原点位于对象的右侧。 |
See:
已知包含反向轴顺序但不在 4000-5000 范围内的 EPSG 代码。
WebGL 索引数据类型(index datatypes)的常量。这些对应于
drawElements 的
type 参数。
Properties:
| Name |
Type |
Description |
UNSIGNED_BYTE |
number
|
8 位无符号字节,对应 UNSIGNED_BYTE,并且是 Uint8Array 中元素的类型。 |
UNSIGNED_SHORT |
number
|
16 位无符号短整型,对应 UNSIGNED_SHORT,并且是 Uint16Array 中元素的类型。 |
UNSIGNED_INT |
number
|
32 位无符号整型,对应 UNSIGNED_INT,并且是 Uint32Array 中元素的类型。 |
此枚举类型用于确定对象相对于视锥体(frustum)的位置。对象可以完全位于视锥体内(INSIDE)、部分位于视锥体内且部分位于视锥体外(INTERSECTING),或完全位于视锥体的 6 个平面之外(OUTSIDE)。
Properties:
| Name |
Type |
Description |
OUTSIDE |
number
|
表示对象未包含在视锥体内。 |
INTERSECTING |
number
|
表示对象与视锥体的某个平面相交。 |
INSIDE |
number
|
表示对象完全位于视锥体内。 |
可通过 Cesium ion 使用的底层地理编码服务。
Properties:
| Name |
Type |
Description |
GOOGLE |
string
|
Google 地理编码器,用于 Google 数据。 |
BING |
string
|
Bing 地理编码器,用于 Bing 数据。 |
DEFAULT |
string
|
使用服务器上设置的默认地理编码器。当既不使用 Bing 也不使用 Google 数据时使用。 |
createWorldImagery 提供的影像类型。
Properties:
| Name |
Type |
Description |
AERIAL |
number
|
航拍影像(aerial imagery)。 |
AERIAL_WITH_LABELS |
number
|
带有道路叠加层的航拍影像。 |
ROAD |
number
|
不带额外影像的道路。 |
此枚举类型用于表示键盘修饰键(keyboard modifiers)。这些是在其他事件类型之外被按住的键。
Properties:
| Name |
Type |
Description |
SHIFT |
number
|
表示 shift 键被按住。 |
CTRL |
number
|
表示 control 键被按住。 |
ALT |
number
|
表示 alt 键被按住。 |
描述如何绘制标签(label)。
Properties:
| Name |
Type |
Description |
FILL |
number
|
填充标签文本,但不描边。 |
OUTLINE |
number
|
描边标签文本,但不填充。 |
FILL_AND_OUTLINE |
number
|
填充并描边标签文本。 |
See:
用于为
Model 进行光照的照明模型(lighting model)。
Properties:
| Name |
Type |
Description |
UNLIT |
number
|
使用无光照着色(unlit shading),即跳过光照计算。在计算 out_FragColor 时直接使用模型的漫反射颜色(假定为线性 RGB,而非 sRGB)。alpha 模式仍然会被应用。 |
PBR |
number
|
使用基于物理的渲染(physically-based rendering)光照计算。这包括 PBR 金属粗糙度(metallic roughness)和 PBR 高光光泽度(specular glossiness)两种模型。在可能的情况下也会应用基于图像的光照(image-based lighting)。 |
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.
描述地图在 2D 模式下的行为方式。
Properties:
| Name |
Type |
Description |
ROTATE |
number
|
2D 地图可以绕 z 轴旋转。 |
INFINITE_SCROLL |
number
|
2D 地图可以在水平方向上无限滚动。 |
元数据组件类型(metadata component types)的枚举。
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 位有符号整数。 |
UINT64 |
string
|
64 位有符号整数。 |
FLOAT32 |
string
|
32 位(单精度)浮点数 |
FLOAT64 |
string
|
64 位(双精度)浮点数 |
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.
Properties:
| Name |
Type |
Description |
SCALAR |
string
|
单个组件 |
VEC2 |
string
|
包含两个组件的向量 |
VEC3 |
string
|
包含三个组件的向量 |
VEC4 |
string
|
包含四个组件的向量 |
MAT2 |
string
|
2x2 矩阵,以列主序(column-major)格式存储。 |
MAT3 |
string
|
3x3 矩阵,以列主序(column-major)格式存储。 |
MAT4 |
string
|
4x4 矩阵,以列主序(column-major)格式存储。 |
BOOLEAN |
string
|
布尔值(true/false) |
STRING |
string
|
UTF-8 编码的字符串值 |
ENUM |
string
|
枚举值。此类型与 MetadataEnum 配合使用以描述有效值。 |
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.
确定 glTF 动画是否循环以及循环方式。
Properties:
| Name |
Type |
Description |
NONE |
number
|
播放动画一次;不循环。 |
REPEAT |
number
|
循环播放动画,在停止后立即从头开始播放。 |
MIRRORED_REPEAT |
number
|
循环播放动画。首先正向播放,然后反向播放,再正向播放,依此类推。 |
See:
定义材质属性如何沿路径应用。
Properties:
| Name |
Type |
Description |
WHOLE |
number
|
材质作为整体应用于整条路径。 |
PORTIONS |
number
|
材质根据时间位置信息以分段方式应用,使用基于区间的材质属性。 |
包围球(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
|
包含深度和模板(stencil)值的像素格式,最常与 PixelDatatype.UNSIGNED_INT_24_8 一起使用。 |
ALPHA |
number
|
包含 alpha 通道的像素格式。 |
RED |
number
|
包含红色(red)通道的像素格式 |
RG |
number
|
包含红色和绿色(green)通道的像素格式。 |
RGB |
number
|
包含红色、绿色和蓝色(blue)通道的像素格式。 |
RGBA |
number
|
包含红色、绿色、蓝色和 alpha 通道的像素格式。 |
RED_INTEGER |
number
|
包含以整数表示的红色通道的像素格式。 |
RG_INTEGER |
number
|
包含以整数表示的红色和绿色通道的像素格式。 |
RGB_INTEGER |
number
|
包含以整数表示的红色、绿色和蓝色通道的像素格式。 |
RGBA_INTEGER |
number
|
包含以整数表示的红色、绿色、蓝色和 alpha 通道的像素格式。 |
LUMINANCE |
number
|
包含亮度(luminance,即强度 intensity)通道的像素格式。 |
LUMINANCE_ALPHA |
number
|
包含亮度(强度)和 alpha 通道的像素格式。 |
RGB_DXT1 |
number
|
包含经 DXT1 压缩的红色、绿色和蓝色通道的像素格式。 |
RGBA_DXT1 |
number
|
包含经 DXT1 压缩的红色、绿色、蓝色和 alpha 通道的像素格式。 |
RGBA_DXT3 |
number
|
包含经 DXT3 压缩的红色、绿色、蓝色和 alpha 通道的像素格式。 |
RGBA_DXT5 |
number
|
包含经 DXT5 压缩的红色、绿色、蓝色和 alpha 通道的像素格式。 |
RGB_PVRTC_4BPPV1 |
number
|
包含经 PVR 4bpp 压缩的红色、绿色和蓝色通道的像素格式。 |
RGB_PVRTC_2BPPV1 |
number
|
包含经 PVR 2bpp 压缩的红色、绿色和蓝色通道的像素格式。 |
RGBA_PVRTC_4BPPV1 |
number
|
包含经 PVR 4bpp 压缩的红色、绿色、蓝色和 alpha 通道的像素格式。 |
RGBA_PVRTC_2BPPV1 |
number
|
包含经 PVR 2bpp 压缩的红色、绿色、蓝色和 alpha 通道的像素格式。 |
RGBA_ASTC |
number
|
包含经 ASTC 压缩的红色、绿色、蓝色和 alpha 通道的像素格式。 |
RGB_ETC1 |
number
|
包含经 ETC1 压缩的红色、绿色和蓝色通道的像素格式。 |
RGB8_ETC2 |
number
|
包含经 ETC2 压缩的红色、绿色和蓝色通道的像素格式。 |
RGBA8_ETC2_EAC |
number
|
包含经 ETC2 压缩的红色、绿色、蓝色和 alpha 通道的像素格式。 |
RGBA_BC7 |
number
|
包含经 BC7 压缩的红色、绿色、蓝色和 alpha 通道的像素格式。 |
Properties:
| Name |
Type |
Description |
NEAREST |
number
|
通过返回最接近的纹理元素(texel)来采样纹理。 |
LINEAR |
number
|
通过对四个最接近的纹理元素进行双线性插值(bi-linear interpolation)来采样纹理。 |
几何图元(geometric primitive)的类型,即点、线和三角形。
Properties:
| Name |
Type |
Description |
POINTS |
number
|
点图元,其中每个顶点(或索引)都是一个独立的点。 |
LINES |
number
|
线图元,其中每两个顶点(或索引)构成一条线段。线段之间不一定相连。 |
LINE_LOOP |
number
|
线环(line loop)图元,其中第一个之后的每个顶点都与前一个顶点连接成一条线,并且最后一个顶点隐式地连接到第一个顶点。 |
LINE_STRIP |
number
|
线带(line strip)图元,其中第一个之后的每个顶点都与前一个顶点连接成一条线。 |
TRIANGLES |
number
|
三角形图元,其中每三个顶点(或索引)构成一个三角形。三角形之间不一定共享边。 |
TRIANGLE_STRIP |
number
|
三角形带(triangle strip)图元,其中前两个之后的每个顶点都与前两个顶点连接形成一个三角形。例如,这可用于建模一面墙。 |
TRIANGLE_FAN |
number
|
三角形扇(triangle fan)图元,其中前两个之后的每个顶点都与前一个顶点以及第一个顶点连接形成一个三角形。例如,这可用于建模圆锥或圆形。 |
用于标识已知参考系(reference frames)的常量。
Properties:
| Name |
Type |
Description |
FIXED |
number
|
固定参考系(fixed frame)。 |
INERTIAL |
number
|
惯性参考系(inertial frame)。 |
请求的状态。
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 Tiles 请求。 |
OTHER |
number
|
其他请求。 |
指示场景是以 3D、2D 还是 2.5D Columbus 视图查看。
Properties:
| Name |
Type |
Description |
MORPHING |
number
|
模式之间的变形(morphing),例如从 3D 到 2D。 |
COLUMBUS_VIEW |
number
|
Columbus View 模式。一种 2.5D 透视视图,地图以平面方式呈现,高度非零的对象绘制在其上方。 |
SCENE2D |
number
|
2D 模式。地图以正交投影(orthographic projection)自上而下地查看。 |
SCENE3D |
number
|
3D 模式。地球的传统 3D 透视视图。 |
See:
此枚举类型用于对鼠标事件进行分类:按下、松开、点击、双击、移动以及按住按钮时的移动。
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
|
表示触摸表面上双指事件的变化。 |
用于指示要显示传感器体积(sensor volume)的哪一部分的常量。
Properties:
| Name |
Type |
Description |
COMPLETE |
number
|
0x0000。显示完整的传感器体积。 |
BELOW_ELLIPSOID_HORIZON |
number
|
0x0001。显示位于椭球体真实地平线(true horizon)以下的传感器体积部分。 |
ABOVE_ELLIPSOID_HORIZON |
number
|
0x0002。显示位于椭球体真实地平线以上的传感器体积部分。 |
指定在启用阴影时,对象是否投射或接收来自光源的阴影。
Properties:
| Name |
Type |
Description |
DISABLED |
number
|
对象既不投射也不接收阴影。 |
ENABLED |
number
|
对象投射并接收阴影。 |
CAST_ONLY |
number
|
对象仅投射阴影。 |
RECEIVE_ONLY |
number
|
对象仅接收阴影。 |
Properties:
See:
确定用于模板测试(stencil test)中比较模板值的函数。
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
|
将模板缓冲(stencil buffer)值设为零。 |
KEEP |
number
|
不改变模板缓冲。 |
REPLACE |
number
|
用参考值替换模板缓冲值。 |
INCREMENT |
number
|
递增模板缓冲值,并钳制为无符号字节(unsigned byte)。 |
DECREMENT |
number
|
递减模板缓冲值,并钳制为零。 |
INVERT |
number
|
按位取反现有的模板缓冲值。 |
INCREMENT_WRAP |
number
|
递增模板缓冲值,当超过无符号字节范围时回绕为零。 |
DECREMENT_WRAP |
number
|
递减模板缓冲值,当低于零时回绕为最大无符号字节值。 |
协方差(covariance)信息的存储类型枚举。这反映了
NGA_gpm_local glTF 扩展中 `gltfGpmLocal.storageType` 的定义。
Properties:
| Name |
Type |
Description |
Direct |
string
|
存储锚点的完整误差协方差(error covariance),包括交叉协方差(cross-covariance)项 |
Indirect |
string
|
为每个锚点存储一个完整的协方差矩阵。但在这种情况下,交叉协方差项不直接存储,而是可以通过存储在元数据中的一组空间相关函数(spatial correlation function)参数计算得到。 |
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
Properties:
| Name |
Type |
Description |
HORIZONTAL |
number
|
水平方向。 |
VERTICAL |
number
|
垂直方向。 |
分配的 SVG 尺寸(以像素为单位)的任意限制。光栅图像使用图像分辨率。
枚举放大 WebGL 纹理时使用的所有可能的过滤器(filters)。
Properties:
| Name |
Type |
Description |
NEAREST |
number
|
通过返回最接近的像素来采样纹理。 |
LINEAR |
number
|
通过对四个最接近的像素进行双线性插值来采样纹理。这比 NEAREST 过滤产生更平滑的结果。 |
See:
枚举缩小(minifying)WebGL 纹理时使用的所有可能的过滤器。
Properties:
| Name |
Type |
Description |
NEAREST |
number
|
通过返回最接近的像素来采样纹理。 |
LINEAR |
number
|
通过对四个最接近的像素进行双线性插值来采样纹理。这比 NEAREST 过滤产生更平滑的结果。 |
NEAREST_MIPMAP_NEAREST |
number
|
选择最接近的 mip 级别(mip level),并在该级别内应用最近邻采样。 要求纹理具有 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:
为给定的经度、纬度和瓦片级别创建空间哈希键(spatial hash key)。精度会根据瓦片级别和范围进行调整,以在更高级别时获得更精细的精度。该函数首先计算给定瓦片在当前最大屏幕空间误差(MAX_ERROR_PX)下的精度,然后将经度和纬度四舍五入到该精度以保持一致性,从而计算空间哈希键。计算级别精度的步骤如下: 1. 计算给定级别下的分辨率(每像素米数): level_resolution_m = (2 * PI * RADIUS) / (2^level * TILE_SIZE) 2. 计算目标精度(以米为单位): level_precision_m = level_resolution_m * MAX_ERROR_PX 3. 将目标精度转换为弧度: level_precision_rad = level_precision_m / BODY_RADIUS 这可以简化为: level_precision_rad = (2 * PI * MAX_ERROR_PX) / (2^level * TILE_SIZE) 也可写为: level_precision_rad = (PI * MAX_ERROR_PX) / (2^(level-1) * TILE_SIZE) 计算得到的 level_precision_rad 随后用于四舍五入输入的经度和纬度,确保落在同一空间区间(spatial bin)内的位置生成相同的哈希键。 以下常量只需计算一次,因为它们对于给定的配置是固定的。
提供 JulianDate 可作为输入使用的时间标准(time standards)类型。
Properties:
| Name |
Type |
Description |
UTC |
number
|
表示协调世界时(UTC)时间标准。UTC 与 TAI 的关系为 UTC = TAI - deltaT,其中 deltaT 是截至 TAI 时刻所引入的闰秒数量。 |
TAI |
number
|
表示国际原子时(TAI)时间标准。TAI 是其他时间标准所参照的主要时间标准。 |
See:
高动态范围(HDR)渲染时使用的色调映射(tonemapping)算法。
Properties:
| Name |
Type |
Description |
REINHARD |
string
|
使用 Reinhard 色调映射。 |
MODIFIED_REINHARD |
string
|
使用改进版 Reinhard 色调映射。 |
FILMIC |
string
|
使用 Filmic 色调映射。 |
ACES |
string
|
使用 ACES 色调映射。 |
PBR_NEUTRAL |
string
|
使用来自 Khronos 的 PBR Neutral 色调映射 (来源于 Khronos)。 |
用于标识已知跟踪参考坐标系的常量。
Properties:
| Name |
Type |
Description |
AUTODETECT |
number
|
自动检测算法。用于跟踪实体的参考坐标系将根据其实时轨迹自动选择:近地面慢速移动的物体将在实体自身的“东-北-上”(east-north-up)局部参考坐标系中进行跟踪,而较快的物体(如卫星)将使用 VVLH(Vehicle Velocity, Local Horizontal,飞行器速度局部水平)坐标系。 |
ENU |
number
|
实体的局部“东-北-上”(East-North-Up)参考坐标系。 |
INERTIAL |
number
|
实体的惯性参考坐标系。如果实体没有定义方向属性,则回退到自动检测算法。 |
VELOCITY |
number
|
实体的惯性参考坐标系,其方向固定为自身的 VelocityOrientationProperty,忽略其自身方向。 |
基本 GLSL uniform 类型的枚举。这些类型可与
CustomShader 配合使用,以声明用户自定义的 uniform。
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
|
由浮点数值组成的 4x4 矩阵。 |
SAMPLER_2D |
string
|
一个 2D 采样纹理。 |
SAMPLER_CUBE |
string
|
|
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.
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
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.
原点相对于对象(例如
Billboard 或
Label)在垂直方向上的位置。例如,将垂直原点设置为
TOP 或
BOTTOM 会使广告牌显示在锚点位置的上方或下方(屏幕空间中)。
Properties:
| Name |
Type |
Description |
CENTER |
number
|
原点位于 BASELINE 与 TOP 之间的垂直中心。 |
BOTTOM |
number
|
原点位于对象的底部。 |
BASELINE |
number
|
如果对象包含文本,则原点位于文本的基线处;否则原点位于对象的底部。 |
TOP |
number
|
原点位于对象的顶部。 |
See:
此枚举类型用于确定在视地平线剔除(horizon culling)过程中,被遮挡物(occludee)的可见程度。遮挡物(occluder)可能完全遮挡被遮挡物(此时其不可见),可能部分遮挡被遮挡物,也可能完全不遮挡,从而使其完全可见。
Properties:
| Name |
Type |
Description |
NONE |
number
|
表示对象没有任何部分可见。 |
PARTIAL |
number
|
表示对象有一部分(但不是全部)可见。 |
FULL |
number
|
表示对象完全可见。 |
体素(voxel)形状的枚举。该形状控制体素网格如何映射到 3D 空间。
Properties:
| Name |
Type |
Description |
BOX |
string
|
长方体形状。 |
ELLIPSOID |
string
|
椭球形状。 |
CYLINDER |
string
|
圆柱体形状。 |
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
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
|
|
环绕顺序(Winding order)定义了三角形被视为正面朝向时的顶点顺序。
Properties:
| Name |
Type |
Description |
CLOCKWISE |
number
|
顶点按顺时针顺序排列。 |
COUNTER_CLOCKWISE |
number
|
顶点按逆时针顺序排列。 |
Methods
计算某点相对于一个三角形的重心坐标。
Returns:
修改后的 result 参数;如果未提供,则为一个新的 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
|
Int8Array
|
Uint8Array
|
Int16Array
|
Uint16Array
|
Int32Array
|
Uint32Array
|
Float32Array
|
Float64Array
|
要搜索的已排序数组。 |
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:
克隆后的对象。
合并两个对象,将其属性复制到新的组合对象上。当两个对象拥有相同属性时,使用第一个对象上该属性的值。如果任一对象为 undefined,则将其视为空对象。
| Name |
Type |
Default |
Description |
object1 |
object
|
|
optional 要合并的第一个对象。 |
object2 |
object
|
|
optional 要合并的第二个对象。 |
deep |
boolean
|
false
|
optional 执行递归合并。 |
Returns:
包含两个对象所有属性的组合对象。
Example:
const object1 = {
propOne : 1,
propTwo : {
value1 : 10
}
}
const object2 = {
propTwo : 2
}
const final = Cesium.combine(object1, object2);
// final === {
// propOne : 1,
// propTwo : {
// value1 : 10
// }
// }
计算给定时刻位置属性的飞行器速度局部水平(VVLH)变换。VVLH 坐标轴基于所提供位置点的运动定义如下: - X 轴指向该点的速度矢量方向,即运动方向。 - Y 轴沿角动量矢量方向。 - Z 轴沿位置矢量方向。
Returns:
VVLH 变换。
根据给定的函数创建一个 Command,用于与 ViewModel 配合使用。Command 是一个带有额外 canExecute 可观察(observable)属性的函数,用于确定该命令是否可执行。执行时,Command 函数会检查 canExecute 的值,若为 false 则抛出异常。它还提供了命令已执行或即将执行时的事件。
| Name |
Type |
Default |
Description |
func |
function
|
|
要执行的函数。 |
canExecute |
boolean
|
true
|
optional 一个布尔值,指示该函数当前是否可执行。 |
创建一个
Material,它组合多层颜色/渐变带并将其映射到地形高度上。着色器会在所有高度上进行二分查找,以确定哪些颜色位于给定高度之上或之下,并在它们之间进行插值以得到最终颜色。该材质可以以较低代价支持数百个条目。
| Name |
Type |
Description |
options |
object
|
Object with the following properties:
|
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 Tiles 瓦片集创建一个
Cesium3DTileset 实例。Google 真实感 3D Tiles 只能与 Google 地理编码器(geocoder)配合使用。为确认你已知晓此限制,请向 apiOptions 传入 `usingOnlyWithGoogleGeocoder: true`。否则在调用此函数时将显示一次性警告。
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
Construction options. Any options allowed by the Cesium3DTileset constructor
may be specified here. In addition to those, the following properties are supported:
| Name |
Type |
Default |
Description |
defaultColor |
Color
|
Color.WHITE
|
optional 用于没有颜色建筑物的默认颜色。如果指定了 options.style,则此参数将被忽略。 |
style |
Cesium3DTileStyle
|
|
optional 用于该瓦片集的样式。如果未指定,则使用默认样式,该样式会根据每栋建筑或其组成部分从 OpenStreetMap 的 tags 推断出的颜色为其着色。如果无法推断出颜色,则使用 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 以可视化已知的矢量顶点属性:
normal(法线)、
tangent(切线)和
bitangent(副切线)。法线显示为红色,切线显示为绿色,副切线显示为蓝色。如果某个属性不存在,则不绘制它。
| Name |
Type |
Description |
options |
object
|
Object with the following properties:
| 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
Object with the following properties:
| 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
Object with the following properties:
| 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
Object with the following properties:
| Name |
Type |
Default |
Description |
requestVertexNormals |
boolean
|
false
|
optional 一个标志,指示客户端是否应在服务器可用时请求额外的光照信息。 |
requestWaterMask |
boolean
|
false
|
optional 一个标志,指示客户端是否应在服务器可用时请求逐瓦片的水面掩码(water masks)。 |
|
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 |
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 文档。只会导出 Point、Billboard、Model、Path、Polygon、Polyline 几何体。请注意,Entity 属性与 KML Feature 属性之间并非一一对应。例如,具有时间动态但无法在 KML 中动态化的实体属性,会以其 options.time 时刻的值(若未指定则为 EntityCollection 时间间隔的起始时刻)导出。对于 KML 支持的时间动态属性,如果是
SampledProperty 则使用示例数据,否则使用 options.sampleDuration 对值进行采样。具有时间动态位置的 Point、Billboard、Model 和 Path 几何体将作为 gx:Track Features 导出。并非所有 Material 都能在 KML 中表示,因此对于较复杂的 Material,仅使用其主颜色。Canvas 对象会作为 PNG 图像导出。
| Name |
Type |
Description |
options |
object
|
An object with the following properties:
| 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 如果实体没有可用性(availability)信息时将进行采样的间隔。 |
sampleDuration |
number
|
60
|
optional 对 KML 中变化的属性进行采样所用的秒数。 |
kmz |
boolean
|
false
|
optional 如果为 true,KML 和外部文件将被压缩为一个 kmz 文件。 |
|
Returns:
一个 promise,解析为一个包含 KML 字符串和外部文件 blob 字典的对象;如果 options.kmz 为 true,则解析为一个作为 blob 的 kmz 文件。
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:
将一个错误对象格式化为字符串。如果可用,则使用 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
|
|
URI。 |
includeQuery |
boolean
|
false
|
optional 是否包含 URI 中的查询字符串和片段(fragment)。 |
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
|
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
|
URI。 |
Returns:
URI 的最后一段。
Example:
//fileName will be"simple.czml";
const fileName = Cesium.getFilenameFromUri('/Gallery/simple.czml?value=true&example=false');
从已加载的图像中提取像素数组。将图像绘制到 canvas 上以便读回像素。
| Name |
Type |
Description |
image |
HTMLImageElement
|
ImageBitmap
|
要提取像素的图像。 |
width |
number
|
图像的宽度。如果未定义,则使用 image.width。 |
height |
number
|
图像的高度。如果未定义,则使用 image.height。 |
Returns:
图像的像素。
获取一个可用于测量事件之间时间间隔的时间戳。时间戳以毫秒表示,但并未规定毫秒是从什么时刻开始计算的。如果可用,此函数使用 performance.now(),否则使用 Date.now()。
Returns:
自某个未指定参考时刻起的毫秒级时间戳。
判断给定年份是否为闰年。
| Name |
Type |
Description |
year |
number
|
要测试的年份。 |
Returns:
如果 year 是闰年则为 true。
Example:
const leapYear = Cesium.isLeapYear(2000); // true
一种稳定的归并排序(merge sort)。
| Name |
Type |
Description |
array |
Array
|
Int8Array
|
Uint8Array
|
Int16Array
|
Uint16Array
|
Int32Array
|
Uint32Array
|
Float32Array
|
Float64Array
|
要排序的数组。 |
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'
判断一个点是否在三角形内部。
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 中,则从 gltf.extensions、gltf.extensionsUsed、gltf.extensionsRequired 以及 glTF 中的任何其他对象中移除它。
| Name |
Type |
Description |
gltf |
object
|
包含 glTF 资源的 JavaScript 对象。 |
extension |
string
|
要移除的扩展。 |
Returns:
从 gltf.extensions 中移除的扩展数据。
通过对地形提供方请求瓦片、采样和插值,为一组
Cartographic 位置发起地形高度查询。插值所使用的三角形与在指定层级渲染地形时所使用的三角形一致。该查询是异步进行的,因此此函数返回一个在查询完成时解析的 promise。每个点的高度都会被就地修改。如果因为该位置在指定层级上没有可用地形数据,或发生其他错误,而无法确定高度,则该高度被设为 undefined。与
Cartographic 类型通常的情况一样,所提供的高度是相对于参考椭球体(例如
Ellipsoid.WGS84)的高度,而不是相对于平均海平面的海拔。换句话说,如果在海洋中采样,它不一定为 0.0。此函数需要以地形细节层级(level of detail)作为输入;如果你需要尽可能精确地获取地形海拔(即使用最大细节层级),请使用
sampleTerrainMostDetailed。
| Name |
Type |
Default |
Description |
terrainProvider |
TerrainProvider
|
|
用于查询高度的地形提供方。 |
level |
number
|
|
用于查询地形高度的地形细节层级。 |
positions |
Array.<Cartographic>
|
|
要用地形高度更新的位置。 |
rejectOnTileFail |
boolean
|
false
|
optional 如果为 true,则对于任何失败的地形瓦片请求,promise 将被拒绝;如果为 false,则返回的高度将为 undefined。 |
Returns:
一个在地形查询完成时解析为所提供的位置列表的 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:
在地形数据集的最大可用瓦片层级上发起 sampleTerrain() 请求。
| Name |
Type |
Default |
Description |
terrainProvider |
TerrainProvider
|
|
用于查询高度的地形提供方。 |
positions |
Array.<Cartographic>
|
|
要用地形高度更新的位置。 |
rejectOnTileFail |
boolean
|
false
|
optional 如果为 true,则对于失败的地形瓦片请求,promise 将被拒绝;如果为 false,则返回的高度将为 undefined。 |
Returns:
一个在地形查询完成时解析为所提供的位置列表的 promise。 This
promise will reject if the terrain provider's `availability` property is undefined.
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);
});
表示立体投影(stereographic)坐标系中的一个点,该点可以通过将笛卡尔坐标从一个极点投影到另一个极点处的切平面上得到。立体投影忠实地表示了所有通过其中心点的大圆的相对方向。为了在所有位置忠实地表示角度,这是一种保角投影(conformal projection),这意味着点是被投影到一个任意球体上的。
将一个数组细分为若干个更小的、大小相等的数组。
| Name |
Type |
Description |
array |
Array
|
要划分的数组。 |
numberOfArrays |
number
|
要将所提供的数组划分成的子数组数量。 |
Throws:
将路径实体的位置变换到参考实体的局部坐标系中。如果参考实体具有方向(orientation),则使用该方向来定义局部坐标系;否则回退到由参考实体速度推导出的 VVLH(Vehicle Velocity Local Horizontal)坐标系。
Returns:
在参考实体局部坐标系中的变换后位置;如果任一输入位置为 undefined,则为 undefined。
| Name |
Type |
Description |
viewer |
Viewer
|
Viewer 实例。 |
Example:
const viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerCesium3DTilesInspectorMixin);
一个 mixin,用于将 CesiumInspector 控件添加到 Viewer 控件中。此函数通常不会被直接调用,而是作为参数是传递给
Viewer#extend,如下面的示例所示。
| Name |
Type |
Description |
viewer |
Viewer
|
Viewer 实例。 |
Throws:
Example:
const viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerCesiumInspectorMixin);
Demo:
一个 mixin,用于为 Viewer 控件添加对 CZML 文件的默认拖放支持。此函数通常不会被直接调用,而是作为参数是传递给
Viewer#extend,如下面的示例所示。
| Name |
Type |
Description |
viewer |
Viewer
|
Viewer 实例。 |
options |
object
|
optional
Object with the following properties:
| 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 网络链接的代理(proxy)。 |
|
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
|
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,因此请确保它来自可信来源,以免你的应用程序受到跨站脚本攻击(XSS)的威胁。 |
|
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
|
Viewer 实例。 |
Example:
var viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerVoxelInspectorMixin);
将给定的文本写入一个新的 canvas。该 canvas 的尺寸将调整为适合文本的大小。如果文本为空,则返回 undefined。
| Name |
Type |
Description |
text |
string
|
要写入的文本。 |
options |
object
|
optional
Object with the following properties:
| 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 canvas 的背景颜色。 |
padding |
number
|
0
|
optional 在文本周围添加的填充(padding)的像素大小。 |
|
Returns:
一个新的 canvas,其中已绘制给定的文本。来自 measureText 的 dimensions 对象也会被添加到返回的 canvas 上。如果文本为空,则返回 undefined。
Type Definitions
在执行二分查找时用于比较两个元素的函数。
| Name |
Type |
Description |
a |
*
|
数组中的一个元素。 |
b |
*
|
正在被搜索的元素。 |
Returns:
如果 a 小于 b 则返回负值,如果 a 大于 b 则返回正值,如果 a 等于 b 则返回 0。
Example:
function compareNumbers(a, b) {
return a - b;
}
Properties:
| Name |
Type |
Attributes |
Default |
Description |
color |
Color
|
<optional>
|
Color.WHITE
|
填充颜色。 |
outlineColor |
Color
|
<optional>
|
Color.WHITE
|
轮廓颜色。 |
outlineWidth |
number
|
<optional>
|
0.0
|
轮廓宽度,0-255 像素。 |
size |
number
|
<optional>
|
1.0
|
点尺寸,0-255 像素。 |
Properties:
| Name |
Type |
Attributes |
Default |
Description |
modelMatrix |
Matrix4
|
<optional>
|
Matrix4.IDENTITY
|
将几何体从模型坐标变换到世界坐标。 |
show |
boolean
|
<optional>
|
true
|
|
material |
BufferPointMaterial
|
<optional>
|
BufferPointMaterial.DEFAULT_MATERIAL
|
|
featureId |
number
|
<optional>
|
|
|
pickObject |
object
|
<optional>
|
|
|
position |
Cartesian3
|
<optional>
|
Cartesian3.ZERO
|
|
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
Properties:
| Name |
Type |
Attributes |
Default |
Description |
color |
Color
|
<optional>
|
Color.WHITE
|
填充颜色。 |
outlineColor |
Color
|
<optional>
|
Color.WHITE
|
轮廓颜色。 |
outlineWidth |
number
|
<optional>
|
0.0
|
轮廓宽度,0-255 像素。 |
Properties:
| Name |
Type |
Attributes |
Default |
Description |
modelMatrix |
Matrix4
|
<optional>
|
Matrix4.IDENTITY
|
将几何体从模型坐标变换到世界坐标。 |
show |
boolean
|
<optional>
|
true
|
|
material |
BufferPolygonMaterial
|
<optional>
|
BufferPolygonMaterial.DEFAULT_MATERIAL
|
|
featureId |
number
|
<optional>
|
|
|
pickObject |
object
|
<optional>
|
|
|
positions |
TypedArray
|
<optional>
|
|
|
holes |
TypedArray
|
<optional>
|
|
|
triangles |
TypedArray
|
<optional>
|
|
|
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
Properties:
| Name |
Type |
Attributes |
Default |
Description |
color |
Color
|
<optional>
|
Color.WHITE
|
填充颜色。 |
outlineColor |
Color
|
<optional>
|
Color.WHITE
|
轮廓颜色。 |
outlineWidth |
number
|
<optional>
|
0.0
|
轮廓宽度,0-255 像素。 |
width |
number
|
<optional>
|
1.0
|
线宽,0-255 像素。 |
Properties:
| Name |
Type |
Attributes |
Default |
Description |
modelMatrix |
Matrix4
|
<optional>
|
Matrix4.IDENTITY
|
将几何体从模型坐标变换到世界坐标。 |
show |
boolean
|
<optional>
|
true
|
|
material |
BufferPolylineMaterial
|
<optional>
|
BufferPolylineMaterial.DEFAULT_MATERIAL
|
|
featureId |
number
|
<optional>
|
|
|
pickObject |
object
|
<optional>
|
|
|
positions |
TypedArray
|
<optional>
|
|
|
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
Properties:
| Name |
Type |
Attributes |
Default |
Description |
color |
Color
|
<optional>
|
Color.WHITE
|
填充颜色。 |
outlineColor |
Color
|
<optional>
|
Color.WHITE
|
轮廓颜色。 |
outlineWidth |
number
|
<optional>
|
0.0
|
轮廓宽度,0-255 像素。 |
Properties:
| Name |
Type |
Attributes |
Default |
Description |
modelMatrix |
Matrix4
|
<optional>
|
Matrix4.IDENTITY
|
将几何体从模型坐标变换到世界坐标。 |
show |
boolean
|
<optional>
|
true
|
|
material |
BufferPrimitiveMaterial
|
<optional>
|
|
|
featureId |
number
|
<optional>
|
|
|
pickObject |
object
|
<optional>
|
|
|
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
以 little-endian(小端)字节序,从数据视图(data view)的给定字节偏移处读取并返回具有给定类型的值
| Name |
Type |
Description |
dataView |
DataView
|
指向二进制缓冲区的类型化数据视图 |
byteOffset |
number
|
从视图起始处开始读取数据的偏移量(以字节为单位) |
Returns:
从 dataView 中读取的值
以 little-endian(小端)字节序,从数据视图(data view)的给定字节偏移处读取并返回具有给定类型的值
| Name |
Type |
Description |
dataView |
DataView
|
指向二进制缓冲区的类型化数据视图 |
byteOffset |
number
|
从视图起始处开始读取数据的偏移量(以字节为单位) |
numberOfComponents |
number
|
要读取的组件数量 |
result |
Array.<number>
|
用于读取结果的数组 |
用于控制 WebGL 上下文(Context)设置的选项。
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 桩(stub)以进行测试的函数 |
Properties:
| Name |
Type |
Attributes |
Default |
Description |
entries |
Array.<createElevationBandMaterialEntry>
|
|
|
一个高程条目(elevation entry)列表。它们会自动从低到高排序。如果只有一个条目,且 extendsDownards 和 extendUpwards 均为 false,则两者都会被设为 true。 |
extendDownwards |
boolean
|
<optional>
|
false
|
如果为 true,则该色带的最小高程颜色将无限向下延伸。 |
extendUpwards |
boolean
|
<optional>
|
false
|
如果为 true,则该色带的最大高程颜色将无限向上延伸。 |
Properties:
| Name |
Type |
Description |
height |
number
|
高度。 |
color |
Color
|
此高度处的颜色。 |
由一对单位矢量给出的方向
Properties:
Properties:
| Name |
Type |
Attributes |
Description |
unitary |
Matrix3
|
<optional>
|
|
diagonal |
Matrix3
|
<optional>
|
|
由于 KML 不支持 glTF 模型,因此此回调是必需的,用于指定在 KML 文档中为该模型使用的 URL。它还可用于向 externalFiles 对象添加额外的文件,这些文件是嵌入到导出的 KMZ 中的文件列表,或在导出时随 KML 字符串一并返回。
| Name |
Type |
Description |
model |
ModelGraphics
|
实体的 ModelGraphics 实例。 |
time |
JulianDate
|
任何属性应用来获取值时所用的时间。 |
externalFiles |
object
|
一个将文件名映射到 Blob 或解析为 Blob 的 Promise 的对象。 |
Returns:
在 KML 文档中用于 href 的 URL。
Properties:
| Name |
Type |
Description |
kml |
string
|
生成的 KML。 |
externalFiles |
Object.<string, Blob>
|
外部文件的对象字典 |
Properties:
| Name |
Type |
Description |
kmz |
Blob
|
生成的 kmz 文件。 |
Properties:
| Name |
Type |
Attributes |
Description |
count |
number
|
|
|
indicesOffsets |
number
|
|
|
loopIndices |
number
|
<optional>
|
|
loopIndicesOffsets |
number
|
<optional>
|
|
triangleIndices |
number
|
<optional>
|
|
triangleIndicesOffsets |
number
|
<optional>
|
|
一个顶层 GeoJSON 对象(Geometry、Feature 或 FeatureCollection)。
一个 GeoJSON feature 对象。
一个 GeoJSON feature collection 对象。
一个 GeoJSON geometry 对象。
一个表示为 [经度, 纬度] 或 [经度, 纬度, 海拔] 的 GeoJSON 位置。
Properties:
| Name |
Type |
Attributes |
Default |
Description |
geoJson |
object
|
<optional>
|
|
|
url |
Resource
|
string
|
<optional>
|
|
|
ellipsoid |
Ellipsoid
|
<optional>
|
Ellipsoid.default
|
|
allowPicking |
boolean
|
<optional>
|
true
|
|
show |
boolean
|
<optional>
|
true
|
|
pickObjectFactory |
function
|
<optional>
|
|
|
由数值化的朝向(heading)、俯仰(pitch)和翻滚(roll)给出的方向
Properties:
| Name |
Type |
Attributes |
Default |
Description |
heading |
number
|
<optional>
|
0.0
|
朝向(heading),以弧度表示 |
pitch |
number
|
<optional>
|
-CesiumMath.PI_OVER_TWO
|
俯仰(pitch),以弧度表示 |
roll |
number
|
<optional>
|
0.0
|
翻滚(roll),以弧度表示 |
ImageryProvider 方法返回图像所采用的格式可能因提供方、配置或服务器设置而异。最常见的是
HTMLImageElement、
HTMLCanvasElement,或在受支持的浏览器中是
ImageBitmap。有关各 ImageryProvider 类如何返回图像的更多信息,请参阅相应类的文档。
在执行归并排序(merge sort)时用于比较两个元素的函数。
| 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;
}
元数据值的一个实例。
其可以是以下几种类型之一:
- 对于
SCALAR 类型,以及除 INT64 或 UINT64 之外的数值型分量类型,为 number
- 对于
SCALAR 类型且分量类型为 INT64 或 UINT64 的情况,为 bigint
- 对于
STRING 或 ENUM 类型,为 string
- 对于
BOOLEAN 类型,为 boolean
- 对于
VEC2 类型,为 Cartesian2
- 对于
VEC3 类型,为 Cartesian3
- 对于
VEC4 类型,为 Cartesian4
- 对于
MAT2 类型,为 Matrix2
- 对于
MAT3 类型,为 Matrix3
- 对于
MAT4 类型,为 Matrix4
- 当元数据值为数组时,为这些类型的数组
关于应被拾取(picked)的元数据的信息
Properties:
| Name |
Type |
Description |
schemaId |
string
|
undefined
|
元数据 schema 的可选 ID |
className |
string
|
元数据类的名称 |
propertyName |
string
|
元数据属性的名称 |
classProperty |
MetadataClassProperty
|
元数据的类属性 |
所有数值类型化数组类型的联合。
所有数值类型化数组构造函数类型的联合。
一个描述 uniform、其类型以及初始值的对象
Properties:
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.
Properties:
| Name |
Type |
Description |
colors |
Float32Array
|
打包的逐顶点颜色。 |
count |
number
|
顶点数量。 |
Properties:
| Name |
Type |
Attributes |
Description |
x |
number
|
<optional>
|
|
y |
number
|
<optional>
|
|
width |
number
|
<optional>
|
|
height |
number
|
<optional>
|
|
要传递给 HTMLCanvasElement.getContext() 的 WebGL 选项。请参阅
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
|
|