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 轴。 |
Bing Maps 提供的影像类型。
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
|
Collins Bart 影像。 |
See:
确定如何混合源颜色和目标颜色。
Properties:
| Name |
Type |
Description |
ADD |
number
|
源和目标分量相加。 |
SUBTRACT |
number
|
从源分量中减去目标分量。 |
REVERSE_SUBTRACT |
number
|
从目标分量中减去源分量。 |
See:
用于确定如何缩放源颜色或目标颜色的 RGB 或 Alpha 分量的混合函数。
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 或一减去目标 Alpha,以较小者为准。 |
See:
确定如何混合广告牌、点和标签的不透明和半透明部分与场景。
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
|
在触控表面上的双指触控。 |
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
|
积云。 |
定义目标颜色与图元源颜色之间的不同混合模式。
HIGHLIGHT 将源颜色与目标颜色相乘
REPLACE 用目标颜色替换源颜色
MIX 将源颜色和目标颜色混合在一起
Properties:
| Name |
Type |
Description |
HIGHLIGHT |
number
|
|
REPLACE |
number
|
|
MIX |
number
|
|
See:
WebGL 组件数据类型。组件是基本类型,
它们构成属性,属性构成顶点。
Properties:
| Name |
Type |
Description |
BYTE |
number
|
对应 gl.BYTE 的 8 位有符号字节,也是
Int8Array 中元素的类型。 |
UNSIGNED_BYTE |
number
|
对应 UNSIGNED_BYTE 的 8 位无符号字节,也是
Uint8Array 中元素的类型。 |
SHORT |
number
|
对应 SHORT 的 16 位有符号短整型,也是
Int16Array 中元素的类型。 |
UNSIGNED_SHORT |
number
|
对应 UNSIGNED_SHORT 的 16 位无符号短整型,也是
Uint16Array 中元素的类型。 |
INT |
number
|
对应 INT 的 32 位有符号整型,也是
Int32Array 中元素的类型。 |
UNSIGNED_INT |
number
|
对应 UNSIGNED_INT 的 32 位无符号整型,也是
Uint32Array 中元素的类型。 |
FLOAT |
number
|
对应 FLOAT 的 32 位浮点型,也是
Float32Array 中元素的类型。 |
DOUBLE |
number
|
对应 gl.DOUBLE 的 64 位浮点型(在桌面 OpenGL 中;
WebGL 不支持,Cesium 通过 GeometryPipeline.encodeAttribute 模拟),
也是 Float64Array 中元素的类型。 |
拐角样式的选项。
Properties:
| Name |
Type |
Description |
ROUNDED |
number
|
拐角具有平滑边缘。 |
MITERED |
number
|
拐角点是相邻边的交点。 |
BEVELED |
number
|
拐角被斜切。 |
Demo:
确定光栅化期间是剔除正面、背面还是都不剔除。
Properties:
| Name |
Type |
Description |
BACK |
number
|
剔除背面面片。 |
FRONT |
number
|
剔除正面面片。 |
NONE |
number
|
不剔除面片。 |
See:
Properties:
| Name |
Type |
Description |
MODIFY_MATERIAL |
string
|
自定义着色器将用于在应用光照之前修改材质阶段的结果。 |
REPLACE_MATERIAL |
string
|
自定义着色器将替代材质阶段使用。这是一个用于优化掉材质处理代码的提示。 |
Experimental
此功能使用了 3D Tiles 规范中尚未最终确定的部分,可能会在没有 Cesium 标准弃用策略的情况下更改。
Properties:
| Name |
Type |
Description |
INHERIT |
number
|
从图元的材质继承透明度设置。如果图元使用了半透明材质,自定义着色器也将被视为半透明。如果图元使用了不透明材质,自定义着色器将被视为不透明。 |
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 Tiles。当贴附到 photorealistic 3D Tiles 等 3D 瓦片集时,
确保瓦片集的 Cesium3DTileset#enableCollision 设置为 true。
否则,实体可能无法正确贴附到瓦片集表面。 |
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 的高度。 |
相对于对象(如
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位无符号字节,对应于UNSIGNED_BYTE以及
Uint8Array中元素的类型。 |
UNSIGNED_SHORT |
number
|
16位无符号短整型,对应于UNSIGNED_SHORT以及
Uint16Array中元素的类型。 |
UNSIGNED_INT |
number
|
32位无符号整型,对应于UNSIGNED_INT以及
Uint32Array中元素的类型。 |
此枚举类型用于确定对象相对于视锥体的位置。对象可以完全位于视锥体内(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_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 地图可以在水平方向上无限滚动。 |
An enum of metadata component types.
Properties:
| Name |
Type |
Description |
INT8 |
string
|
An 8-bit signed integer |
UINT8 |
string
|
An 8-bit unsigned integer |
INT16 |
string
|
A 16-bit signed integer |
UINT16 |
string
|
A 16-bit unsigned integer |
INT32 |
string
|
A 32-bit signed integer |
UINT32 |
string
|
A 32-bit unsigned integer |
INT64 |
string
|
A 64-bit signed integer. |
UINT64 |
string
|
A 64-bit signed integer. |
FLOAT32 |
string
|
A 32-bit (single precision) floating point number |
FLOAT64 |
string
|
A 64-bit (double precision) floating point 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.
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
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.
Determines if and how a glTF animation is looped.
Properties:
| Name |
Type |
Description |
NONE |
number
|
Play the animation once; do not loop it. |
REPEAT |
number
|
Loop the animation playing it from the start immediately after it stops. |
MIRRORED_REPEAT |
number
|
Loop the animation. First, playing it forward, then in reverse, then forward, and so on. |
See:
BoundingSphere 正在计算中。
The data type of a pixel.
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通道的像素格式。 |
RED_INTEGER |
number
|
将红色通道作为整数表示的像素格式。 |
RG_INTEGER |
number
|
将红色和绿色通道作为整数表示的像素格式。 |
RGB_INTEGER |
number
|
将红色、绿色和蓝色通道作为整数表示的像素格式。 |
RGBA_INTEGER |
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
|
包含红色、绿色、蓝色和Alpha通道的像素格式,使用DXT5压缩。 |
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
|
包含红色、绿色、蓝色和Alpha通道的像素格式,使用ASTC压缩。 |
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
|
Samples the texture by returning the closest texel. |
LINEAR |
number
|
Samples the texture through bi-linear interpolation of the four nearest texels. |
几何图元的类型,即点、线和三角形。
Properties:
| Name |
Type |
Description |
POINTS |
number
|
点图元,其中每个顶点(或索引)都是一个独立的点。 |
LINES |
number
|
线图元,每两个顶点(或索引)构成一条线段。线段之间不一定相连。 |
LINE_LOOP |
number
|
线环图元,第一个顶点之后的每个顶点(或索引)都与前一个顶点连接成线,最后一个顶点隐式连接到第一个顶点。 |
LINE_STRIP |
number
|
线带图元,第一个顶点之后的每个顶点(或索引)都与前一个顶点连接成线。 |
TRIANGLES |
number
|
三角形图元,每三个顶点(或索引)构成一个三角形。三角形之间不一定共享边。 |
TRIANGLE_STRIP |
number
|
三角形带图元,前两个顶点之后的每个顶点(或索引)都与前两个顶点连接形成一个三角形。例如,这可用于建模墙体。 |
TRIANGLE_FAN |
number
|
三角形扇图元,前两个顶点之后的每个顶点(或索引)都与前一个顶点和第一个顶点连接形成一个三角形。例如,这可用于建模圆锥体或圆形。 |
用于标识已知参考系的常量。
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 Columbus 视图观察的。
Properties:
| Name |
Type |
Description |
MORPHING |
number
|
模式之间的过渡,例如从 3D 到 2D。 |
COLUMBUS_VIEW |
number
|
Columbus 视图模式。2.5D 透视视图,地图平铺展开,
具有非零高度的物体绘制在其上方。 |
SCENE2D |
number
|
2D 模式。使用正交投影从正上方查看地图。 |
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
|
表示触摸表面上双指事件的变化。 |
Constants used to indicated what part of the sensor volume to display.
Properties:
| Name |
Type |
Description |
COMPLETE |
number
|
0x0000. Display the complete sensor volume. |
BELOW_ELLIPSOID_HORIZON |
number
|
0x0001. Display the portion of the sensor volume that lies below the true horizon of the ellipsoid. |
ABOVE_ELLIPSOID_HORIZON |
number
|
0x0002. Display the portion of the sensor volume that lies above the true horizon of the ellipsoid. |
指定当启用阴影时,对象是否从光源投射或接收阴影。
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
|
递减模板缓冲区值,回绕到最大无符号字节而不是低于零。 |
协方差信息的存储类型枚举。
这反映了
NGA_gpm_local glTF 扩展中
`gltfGpmLocal.storageType` 的定义。
Properties:
| Name |
Type |
Description |
Direct |
string
|
存储锚点的完整误差协方差,包括交叉协方差项 |
Indirect |
string
|
为每个锚点存储完整的协方差矩阵。但在这种情况下,交叉协方差项不直接存储,
而是可以通过元数据中存储的一组空间相关函数参数来计算。 |
Experimental
此功能尚未最终确定,可能会在不遵循 Cesium 标准弃用政策的情况下更改。
Properties:
| Name |
Type |
Description |
HORIZONTAL |
number
|
Horizontal orientation. |
VERTICAL |
number
|
Vertical orientation. |
Arbitrary limit on allocated SVG size, in pixels. Raster images use image resolution.
Enumerates all possible filters used when magnifying WebGL textures.
Properties:
| Name |
Type |
Description |
NEAREST |
number
|
Samples the texture by returning the closest pixel. |
LINEAR |
number
|
Samples the texture through bi-linear interpolation of the four nearest pixels. This produces smoother results than NEAREST filtering. |
See:
枚举了在缩小 WebGL 纹理时使用的所有可能滤镜。
Properties:
| Name |
Type |
Description |
NEAREST |
number
|
通过返回最接近的像素来对纹理进行采样。 |
LINEAR |
number
|
通过对最接近的四个像素进行双线性插值来对纹理进行采样。这会产生比 NEAREST 滤镜更平滑的结果。 |
NEAREST_MIPMAP_NEAREST |
number
|
选择最近的 mipmap 级别并在该级别内应用最近采样。
要求纹理具有 mipmap。mip 级别由视角和纹理的屏幕空间大小选择。
|
LINEAR_MIPMAP_NEAREST |
number
|
选择最近的 mipmap 级别并在该级别内应用线性采样。
要求纹理具有 mipmap。mip 级别由视角和纹理的屏幕空间大小选择。
|
NEAREST_MIPMAP_LINEAR |
number
|
从两个相邻的 mipmap 级别使用最近采样读取纹理值,并对结果进行线性插值。
此选项在对 mipmap 纹理进行采样时,提供了视觉质量和速度的良好平衡。
要求纹理具有 mipmap。mip 级别由视角和纹理的屏幕空间大小选择。
|
LINEAR_MIPMAP_LINEAR |
number
|
从两个相邻的 mipmap 级别使用线性采样读取纹理值,并对结果进行线性插值。
此选项在对 mipmap 纹理进行采样时,提供了视觉质量和速度的良好平衡。
要求纹理具有 mipmap。mip 级别由视角和纹理的屏幕空间大小选择。
|
See:
为给定的经度、纬度和瓦片层级创建空间哈希键。
精度会根据瓦片层级和范围进行调整,以在较高层级实现更精细的精度。
此函数通过首先确定当前最大屏幕空间误差(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 随后用于舍入输入的经度和纬度,
确保落在同一空间格网内的位置产生相同的哈希键。
下面的常量是一次性计算得出的,因为对于给定配置它们是固定的。
提供JulianDate可作为输入的时间标准类型。
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
|
使用电影色调映射。 |
ACES |
string
|
使用ACES色调映射。 |
PBR_NEUTRAL |
string
|
使用PBR中性色调映射 来自Khronos。 |
用于标识已知跟踪参考系的常量。
Properties:
| Name |
Type |
Description |
AUTODETECT |
number
|
自动检测算法。用于跟踪实体的参考系将
根据其轨迹自动选择:近地表慢速移动
对象将在实体的局部东-北-上参考系中跟踪,
而卫星等快速对象将使用 VVLH(载体速度,
局部水平)。 |
ENU |
number
|
实体的局部东-北-上参考系。 |
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:
此枚举类型用于确定在视地平线剔除过程中,被遮挡物(occludee)的可见程度。遮挡物可能完全遮挡被遮挡物(此时其不可见),也可能部分遮挡被遮挡物,或者完全不遮挡(使其完全可见)。
Properties:
| Name |
Type |
Description |
NONE |
number
|
表示对象的任何部分都不可见。 |
PARTIAL |
number
|
表示对象的部分(非全部)可见。 |
FULL |
number
|
表示对象完全可见。 |
体素形状的枚举。形状控制体素网格如何映射到 3D 空间。
Properties:
| Name |
Type |
Description |
BOX |
string
|
A box shape. |
ELLIPSOID |
string
|
An ellipsoid shape. |
CYLINDER |
string
|
A cylinder shape. |
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
addDrillPickedResults(pickedResults, limit, results, pickedPrimitives, pickedAttributes, pickedFeatures) → boolean
| Name |
Type |
Description |
pickedResults |
Array.<object>
|
pickCallback 返回的结果 |
limit |
number
|
如果提供,在收集到该数量的拾取结果后停止钻取。 |
results |
Array.<object>
|
|
pickedPrimitives |
Array.<object>
|
|
pickedAttributes |
Array.<object>
|
|
pickedFeatures |
Array.<object>
|
|
Returns:
是否应该结束拾取
计算点相对于三角形的重心坐标。
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
|
Int8Array
|
Uint8Array
|
Int16Array
|
Uint16Array
|
Int32Array
|
Uint32Array
|
Float32Array
|
Float64Array
|
要搜索的已排序数组。 |
itemToFind |
*
|
要在数组中查找的项目。 |
comparator |
binarySearchComparator
|
用于将项目与数组中的元素进行比较的函数。 |
Returns:
如果项目存在,则返回其在数组中的索引。如果项目不存在,则返回值为负数,该负数是项目应插入位置之前索引的按位补码(~),
以保持数组的排序顺序。
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
// }
// }
计算用于拾取的部分绘制缓冲区所描述的矩形。
| Name |
Type |
Description |
drawingBufferHeight |
number
|
绘制缓冲区的高度 |
position |
Cartesian2
|
绘制缓冲区内的位置 |
width |
number
|
undefined
|
矩形的宽度,假定为奇数整数,默认值:3.0 |
height |
number
|
undefined
|
矩形的高度。如果未指定,height 将默认取 width 的值 |
result |
BoundingRectangle
|
结果矩形 |
Returns:
结果矩形
计算给定时间位置属性的车辆速度、局部水平(VVLH)变换。
VVLH坐标轴根据所提供位置点的运动定义如下:
- X轴指向点的速度向量方向,即运动方向。
- Y轴沿角动量向量方向。
- Z轴沿位置向量方向。
Returns:
VVLH变换矩阵。
返回给定数组的深拷贝。
如果输入为 undefined,则返回 undefined。
否则,结果将是给定数组的副本,其中
每个元素都使用 Cartesian3.clone 复制。
| Name |
Type |
Description |
input |
Array.<Cartesian3>
|
undefined
|
输入数组 |
Returns:
副本
Creates an axis-aligned bounding box for a quadtree node at the given tree-space coordinates and level.
This AABB is in the tree's local space (where the root node of the tree is a unit cube in its own local space).
| Name |
Type |
Description |
x |
number
|
The x coordinate of the node. |
y |
number
|
The y coordinate of the node. |
level |
number
|
The level of the node. |
Returns:
The axis-aligned bounding box for the node.
从给定的 JSON 表示创建 `AnchorPointDirect`。
| Name |
Type |
Description |
anchorPointDirectJson |
object
|
输入 JSON |
Returns:
直接锚点
从给定的 JSON 表示创建 `AnchorPointIndirect`。
| Name |
Type |
Description |
anchorPointIndirectJson |
object
|
输入 JSON |
Returns:
间接锚点
从给定函数创建 Command,供 ViewModel 使用。
Command 是一个带有额外 canExecute 可观察属性的函数,用于确定
命令是否可以执行。当执行时,Command 函数将检查 canExecute 的值,
如果为 false 则抛出异常。它还提供命令即将执行和已执行的事件。
| Name |
Type |
Default |
Description |
func |
function
|
|
要执行的函数。 |
canExecute |
boolean
|
true
|
optional
布尔值,表示函数当前是否可以执行。 |
从给定的 JSON 表示创建 `CorrelationGroup`。
| Name |
Type |
Description |
correlationGroupJson |
object
|
输入 JSON |
Returns:
相关组
从包含上三角部分的数组(按列主序)创建描述协方差矩阵(对称)的 Matrix3。
| Name |
Type |
Description |
array |
Array.<number>
|
输入数组 |
Returns:
Matrix3 对象
Creates a
Material that combines multiple layers of color/gradient bands and maps them to terrain heights.
The shader does a binary search over all the heights to find out which colors are above and below a given height, and
interpolates between them for the final color. This material supports hundreds of entries relatively cheaply.
| Name |
Type |
Description |
options |
object
|
Object with the following properties:
| Name |
Type |
Description |
scene |
Scene
|
The scene where the visualization is taking place. |
layers |
Array.<createElevationBandMaterialBand>
|
A list of bands ordered from lowest to highest precedence. |
|
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:
Creates a
Cesium3DTileset instance for the Google Photorealistic 3D
Tiles tileset.
Google Photorealistic 3D Tiles can only be used with the Google geocoder. To
confirm that you are aware of this restriction pass
`usingOnlyWithGoogleGeocoder: true` to the apiOptions. Otherwise a one time
warning will be displayed when this function is called.
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
The default color to use for buildings
that do not have a color. This parameter is ignored if options.style is specified. |
style |
Cesium3DTileStyle
|
|
optional
The style to use with the tileset. If not
specified, a default style is used which gives each building or building part a
color inferred from its OpenStreetMap tags. If no color can be inferred,
options.defaultColor is used. |
enableShowOutline |
boolean
|
true
|
optional
If true, enable rendering outlines. This can be set to false to avoid the additional processing of geometry at load time. |
showOutline |
boolean
|
true
|
optional
Whether to show outlines around buildings. When true,
outlines are displayed. When false, outlines are not displayed. |
|
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:
Creates a
Primitive to visualize well-known vector vertex attributes:
normal,
tangent, and
bitangent. Normal
is red; tangent is green; and bitangent is blue. If an attribute is not
present, it is not drawn.
| Name |
Type |
Description |
options |
object
|
Object with the following properties:
| Name |
Type |
Default |
Description |
geometry |
Geometry
|
|
The Geometry instance with the attribute. |
length |
number
|
10000.0
|
optional
The length of each line segment in meters. This can be negative to point the vector in the opposite direction. |
modelMatrix |
Matrix4
|
Matrix4.IDENTITY
|
optional
The model matrix that transforms to transform the geometry from model to world coordinates. |
|
Returns:
A new Primitive instance with geometry for the vectors.
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:
// 使用默认设置创建 Cesium World Bathymetry
try {
const viewer = new Cesium.Viewer("cesiumContainer", {
terrainProvider: await Cesium.createWorldBathymetryAsync();
});
} catch (error) {
console.log(error);
}
// 创建带法线的 Cesium World Bathymetry
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:
// 使用默认设置创建 Cesium World Imagery 基础图层
try {
const imageryProvider = await Cesium.createWorldImageryAsync();
} catch (error) {
console.log(`创建世界影像时出错:${error}`);
}
// 使用不同样式创建 Cesium World Imagery
try {
const imageryProvider = await Cesium.createWorldImageryAsync({
style: Cesium.IonWorldImageryStyle.AERIAL_WITH_LABELS
});
} catch (error) {
console.log(`创建世界影像时出错:${error}`);
}
See:
| Name |
Type |
Description |
options |
object
|
optional
包含以下属性的对象:
| Name |
Type |
Default |
Description |
requestVertexNormals |
boolean
|
false
|
optional
指示客户端是否应请求服务器提供的附加光照信息的标志。 |
requestWaterMask |
boolean
|
false
|
optional
指示客户端是否应请求服务器提供的每瓦片水掩码的标志。 |
|
Returns:
一个解析为已创建的 CesiumTerrainProvider 的 promise
Examples:
// 使用默认设置创建 Cesium World Terrain
try {
const viewer = new Cesium.Viewer("cesiumContainer", {
terrainProvider: await Cesium.createWorldTerrainAsync();
});
} catch (error) {
console.log(error);
}
// 创建带水面效果和法线的 Cesium World Terrain
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:
通过重复调用给定的 `pickCallback` 进行钻取拾取,每次剥离之前已拾取的对象。
| Name |
Type |
Default |
Description |
pickCallback |
function
|
|
每次迭代执行的拾取回调函数 |
limit |
number
|
Number.MAX_VALUE
|
optional
如果提供,在收集到该数量的拾取结果后停止钻取。 |
Returns:
拾取结果列表
返回给定数组是否逐分量相等。
当两个数组均为 undefined 时,返回 true。
当仅定义了一个数组,或它们都已定义但长度
不同时,返回 false。
否则,返回数组的对应元素是否
相等(根据 Cartesian3.equals)。
Returns:
数组是否相等
将 EntityCollection 导出为 KML 文档。仅导出点、广告牌、模型、路径、多边形、折线几何。
注意,实体属性与 KML 要素属性之间不存在一一对应关系。例如,无法在 KML 中实现时间动态的实体属性将使用 options.time 处的值导出,如果未指定,则使用 EntityCollection 时间间隔的开始处的值。
对于 KML 中支持的时间动态属性,如果是
SampledProperty 则使用样本,否则使用 options.sampleDuration 采样值。
具有时间动态位置的点、广告牌、模型和路径几何将导出为 gx:Track 要素。并非所有材质都可以在 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,解析为包含 KML 字符串和外部文件 blob 字典的对象,如果 options.kmz 为 true,则解析为 blob 形式的 kmz 文件。
Example:
Cesium.exportKml({
entities: entityCollection
})
.then(function(result) {
// XML 字符串在 result.kml 中
const externalFiles = result.externalFiles
for(const file in externalFiles) {
// file 是 KML 文档中用作 href 的文件名
// externalFiles[file] 是包含文件内容的 blob
}
});
Demo:
获取视口的署名信息
| Name |
Type |
Description |
resource |
Resource
|
资源对象 |
url |
string
|
署名 API 的 URL |
key |
string
|
订阅密钥 |
tilesetId |
string
|
瓦片集 ID |
level |
number
|
瓦片级别 |
Returns:
署名文本数组
将错误对象格式化为字符串。如果可用,使用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中的查询字符串和片段 |
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');
从已加载的图像中提取像素数组。将图像绘制到画布中,以便读取像素数据。
| Name |
Type |
Description |
image |
HTMLImageElement
|
ImageBitmap
|
要提取像素的图像。 |
width |
number
|
图像的宽度。如果未定义,则使用 image.width。 |
height |
number
|
图像的高度。如果未定义,则使用 image.height。 |
Returns:
图像的像素数据。
getSourceValueStringComponent(classProperty, metadataProperty, componentName) → string
Creates a shader statement that returns the value of the specified
component of the given property, normalized to the range [0, 1].
| Name |
Type |
Description |
classProperty |
MetadataClassProperty
|
The class property |
metadataProperty |
object
|
The metadata property, either
a `PropertyTextureProperty` or a `PropertyAttributeProperty` |
componentName |
string
|
The name, in ["x", "y", "z", "w"] |
Returns:
The string
Creates a shader statement that returns the value of the specified
property, normalized to the range [0, 1].
| Name |
Type |
Description |
classProperty |
MetadataClassProperty
|
The class property |
metadataProperty |
object
|
The metadata property, either
a `PropertyTextureProperty` or a `PropertyAttributeProperty` |
Returns:
The string
获取可用于测量事件之间时间的时间戳。时间戳以毫秒表示,
但未指定毫秒的测量起点。如果可用,此函数使用 performance.now(),
否则使用 Date.now()。
Returns:
自某个未指定参考时间以来的时间戳(以毫秒为单位)。
判断给定年份是否为闰年。
| Name |
Type |
Description |
year |
number
|
要测试的年份。 |
Returns:
如果 year 是闰年则返回true。
Example:
const leapYear = Cesium.isLeapYear(2000); // true
加载立方体贴图均匀变量的图像(如果自上次调用以来已更改)。
| Name |
Type |
Description |
material |
Material
|
要加载立方体贴图图像的材质。 |
uniformId |
string
|
对应于立方体贴图图像的均匀变量 ID。 |
Returns:
当图像加载完成时解析的 promise,如果不需要加载图像则返回已解析的 promise。
Loads the gltf object
根据当前画布状态计算文本的尺寸。
将指标(不包括宽度)四舍五入为整像素。这纯粹是为了最小化
迁移到浏览器内 measureText() 时的渲染差异,未来可能会修订。参见:github.com/CesiumGS/cesium/pull/13081
稳定的归并排序。
| 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'
Determine how translucent surfaces will be handled.
When OIT is enabled, then this will delegate to OIT.executeCommands.
Otherwise, it will just be executeTranslucentCommandsBackToFront
for render passes, or executeTranslucentCommandsFrontToBack for
other passes.
| Name |
Type |
Description |
scene |
Scene
|
The scene. |
Returns:
A function to execute translucent commands.
pickBegin(scene, windowPosition, drawingBufferRectangle, width, height)
拾取前所需的设置。
| Name |
Type |
Default |
Description |
scene |
Scene
|
|
|
windowPosition |
Cartesian2
|
|
用于执行拾取的窗口坐标。 |
drawingBufferRectangle |
BoundingRectangle
|
|
输出的绘制缓冲区矩形。 |
width |
number
|
3
|
optional
拾取矩形的宽度。 |
height |
number
|
3
|
optional
拾取矩形的高度。 |
拾取后所需的清理。
| Name |
Type |
Description |
scene |
Scene
|
|
确定一个点是否在三角形内部。
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 中移除的扩展数据。
Remove all invalid binary body references from the batch table
JSON of the given parsed content.
This is a workaround for gracefully handling the invalid PNTS
files that may have been created by the point cloud tiler.
See https://github.com/CesiumGS/cesium/issues/12872
When the batch table JSON is undefined, nothing will be done.
When the batch table binary is defined, nothing will be done
(assuming that any binary body references are valid - this is
not checked here).
Otherwise, this will remove all binary body references from the
batch table JSON that are not resolved from draco via the
`parsedContent.draco.batchTableProperties`.
If any (invalid) binary body reference is found (and removed),
a one-time warning will be printed.
| Name |
Type |
Description |
parsedContent |
object
|
The parsed content |
通过从地形提供程序请求瓦片、采样和插值,为一组
Cartographic位置发起地形高度查询。插值
匹配用于渲染指定层级地形的三角形。查询
是异步进行的,因此此函数返回一个Promise,在查询完成时
解析。每个点的高度都会被就地修改。如果无法确定高度,
因为该位置在指定层级没有可用的地形数据,
或者发生其他错误,高度将被设置为undefined。作为
Cartographic类型的典型特征,提供的高度是参考椭球体
(如
Ellipsoid.WGS84)以上的高度,而不是平均海平面以上的海拔。换句话说,
如果在海洋中采样,它不一定为0.0。此函数需要
地形细节层级作为输入,如果您需要尽可能精确地
获取地形海拔(即使用最大细节层级),请使用
sampleTerrainMostDetailed。
| Name |
Type |
Default |
Description |
terrainProvider |
TerrainProvider
|
|
要从中查询高度的地形提供程序。 |
level |
number
|
|
要从中查询地形高度的地形细节层级。 |
positions |
Array.<Cartographic>
|
|
要用地形高度更新的位置。 |
rejectOnTileFail |
boolean
|
false
|
optional
如果为true,对于任何失败的地形瓦片请求,Promise将被拒绝。如果为false,返回的高度将为undefined。 |
Returns:
当地形查询完成时,解析为提供的位置列表的Promise。
Example:
// 查询两个Cartographic位置的地形高度
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和positions[1].height已被更新。
// updatedPositions只是positions的引用。
// 要处理瓦片错误,请为rejectOnTileFail参数传递true。
try {
const updatedPositions = await Cesium.sampleTerrain(terrainProvider, 11, positions, true);
} catch (error) {
// 发生瓦片请求错误。
}
See:
为地形数据集在最大可用瓦片层级发起sampleTerrain()请求。
| Name |
Type |
Default |
Description |
terrainProvider |
TerrainProvider
|
|
要从中查询高度的地形提供程序。 |
positions |
Array.<Cartographic>
|
|
要用地形高度更新的位置。 |
rejectOnTileFail |
boolean
|
false
|
optional
如果为true,对于失败的地形瓦片请求,Promise将被拒绝。如果为false,返回的高度将为undefined。 |
Returns:
当地形查询完成时,解析为提供的位置列表的Promise。如果地形提供程序的`availability`属性为undefined,此Promise将被拒绝。
Example:
// 查询两个Cartographic位置的地形高度
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和positions[1].height已被更新。
// updatedPositions只是positions的引用。
// 要处理瓦片错误,请为rejectOnTileFail参数传递true。
try {
const updatedPositions = await Cesium.sampleTerrainMostDetailed(terrainProvider, positions, true);
} catch (error) {
// 发生瓦片请求错误。
}
将值从 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:
将路径实体的位置转换到参考实体的局部坐标系中。
如果参考实体具有方向,则使用该方向定义局部坐标系。
否则,回退到从参考实体速度导出的VVLH(车辆速度局部水平)坐标系。
Returns:
参考实体局部坐标系中的转换后位置,如果任一输入位置未定义则返回undefined。
返回一个着色器语句,根据给定的偏移量和缩放比例,将值变换的逆运算应用于给定值。
| Name |
Type |
Description |
input |
string
|
输入值 |
offset |
string
|
偏移量 |
scale |
string
|
缩放比例 |
Returns:
语句
Returns a shader statement that applies the inverse of the
normalization, based on the given component type
| Name |
Type |
Description |
input |
string
|
The input value |
componentType |
string
|
The component type |
Returns:
The statement
| 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
|
Viewer 实例。 |
Throws:
Example:
const viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerCesiumInspectorMixin);
Demo:
为 Viewer 控件添加默认的 CZML 文件拖放支持的 mixin。
此函数通常不直接调用,而是作为参数传递给
Viewer#extend,如下面的示例所示。
| Name |
Type |
Description |
viewer |
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:
// 添加基本的拖放支持并在遇到错误时弹出警告窗口。
const viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerDragDropMixin);
viewer.dropError.addEventListener(function(viewerArg, source, error) {
window.alert('处理 ' + source + ' 时出错: ' + error);
});
| Name |
Type |
Description |
viewer |
Viewer
|
Viewer 实例。 |
options |
object
|
optional
具有属性的对象。
| 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
包含以下属性的对象:
| 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:
一个绘制了给定文本的新画布。来自 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;
}
Properties:
| Name |
Type |
Attributes |
Default |
Description |
color |
Color
|
<optional>
|
Color.WHITE
|
填充颜色。 |
outlineColor |
Color
|
<optional>
|
Color.WHITE
|
轮廓颜色。 |
outlineWidth |
number
|
<optional>
|
0.0
|
轮廓宽度,0-255px。 |
size |
number
|
<optional>
|
1.0
|
点大小,0-255px。 |
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
此功能尚未最终确定,可能会在不遵循 Cesium 标准弃用政策的情况下进行更改。
Properties:
| Name |
Type |
Attributes |
Default |
Description |
color |
Color
|
<optional>
|
Color.WHITE
|
填充颜色。 |
outlineColor |
Color
|
<optional>
|
Color.WHITE
|
轮廓颜色。 |
outlineWidth |
number
|
<optional>
|
0.0
|
轮廓宽度,0-255px。 |
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
此功能尚未最终确定,可能会在不遵循 Cesium 标准弃用政策的情况下进行更改。
Properties:
| Name |
Type |
Attributes |
Default |
Description |
color |
Color
|
<optional>
|
Color.WHITE
|
填充颜色。 |
outlineColor |
Color
|
<optional>
|
Color.WHITE
|
轮廓颜色。 |
outlineWidth |
number
|
<optional>
|
0.0
|
轮廓宽度,0-255px。 |
width |
number
|
<optional>
|
1.0
|
线条宽度,0-255px。 |
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
此功能尚未最终确定,可能会在不遵循 Cesium 标准弃用政策的情况下进行更改。
Properties:
| Name |
Type |
Attributes |
Default |
Description |
color |
Color
|
<optional>
|
Color.WHITE
|
填充颜色。 |
outlineColor |
Color
|
<optional>
|
Color.WHITE
|
轮廓颜色。 |
outlineWidth |
number
|
<optional>
|
0.0
|
轮廓宽度,0-255px。 |
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
此功能尚未最终确定,可能会在不遵循 Cesium 标准弃用政策的情况下进行更改。
以 little-endian 顺序从数据视图的给定字节偏移处读取并返回具有给定类型的值
| Name |
Type |
Description |
dataView |
DataView
|
二进制缓冲区的类型化数据视图 |
byteOffset |
number
|
从视图起始位置开始读取数据的偏移量(以字节为单位) |
Returns:
从 dataView 读取的值
以 little-endian 顺序从数据视图的给定字节偏移处读取并返回具有给定类型的值
| Name |
Type |
Description |
dataView |
DataView
|
二进制缓冲区的类型化数据视图 |
byteOffset |
number
|
从视图起始位置开始读取数据的偏移量(以字节为单位) |
numberOfComponents |
number
|
要读取的分量数量 |
result |
Array.<number>
|
用于读取结果的数组 |
用于控制 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>
|
|
|
A list of elevation entries. They will automatically be sorted from lowest to highest. If there is only one entry and extendsDownards and extendUpwards are both false, they will both be set to true. |
extendDownwards |
boolean
|
<optional>
|
false
|
If true, the band's minimum elevation color will extend infinitely downwards. |
extendUpwards |
boolean
|
<optional>
|
false
|
If true, the band's maximum elevation color will extend infinitely upwards. |
Properties:
| Name |
Type |
Description |
height |
number
|
The height. |
color |
Color
|
The color at this height. |
由一对单位向量定义的朝向
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 |
Default |
Description |
heading |
number
|
<optional>
|
0.0
|
航向角(弧度) |
pitch |
number
|
<optional>
|
-CesiumMath.PI_OVER_TWO
|
俯仰角(弧度) |
roll |
number
|
<optional>
|
0.0
|
翻滚角(弧度) |
ImageryProvider 方法返回图像时的格式可能
因提供程序、配置或服务器设置而异。最常见的是
HTMLImageElement、
HTMLCanvasElement,或在支持的
浏览器上返回
ImageBitmap。
有关各 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
|
元数据 schema 的可选 ID |
className |
string
|
元数据类的名称 |
propertyName |
string
|
元数据属性的名称 |
classProperty |
MetadataClassProperty
|
元数据类属性 |
所有数值类型化数组类型的联合。
所有数值类型化数组构造函数类型的联合。
描述统一变量、其类型和初始值的对象
Properties:
Experimental
此功能使用了 3D Tiles 规范中尚未最终确定的部分,可能会在没有 Cesium 标准弃用策略的情况下更改。
Properties:
| Name |
Type |
Description |
colors |
Float32Array
|
打包的每顶点颜色。 |
count |
number
|
顶点数量。 |
Properties:
| Name |
Type |
Attributes |
Description |
x |
number
|
<optional>
|
x 坐标 |
y |
number
|
<optional>
|
y 坐标 |
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
|
alpha 通道 |
depth |
boolean
|
<optional>
|
true
|
深度缓冲区 |
stencil |
boolean
|
<optional>
|
false
|
模板缓冲区 |
antialias |
boolean
|
<optional>
|
true
|
抗锯齿 |
premultipliedAlpha |
boolean
|
<optional>
|
true
|
预乘 alpha |
preserveDrawingBuffer |
boolean
|
<optional>
|
false
|
保留绘图缓冲区 |
powerPreference |
"default"
|
"low-power"
|
"high-performance"
|
<optional>
|
"high-performance"
|
功耗偏好 |
failIfMajorPerformanceCaveat |
boolean
|
<optional>
|
false
|
性能警告时失败 |