在场景中以立方体地图格式显示影像的
Panorama。
此功能仅支持 3D 模式。当转换为 2D 或 Columbus 视图时,立方体地图全景图会淡化。立方体地图全景图的大小
必须不超过 Scene#maximumSkyBoxSize。
| Name | Type | Description |
|---|---|---|
options |
CubeMapPanorama.ConstructorOptions | 描述初始化选项的对象 |
Example:
const modelMatrix = Cesium.Matrix4.getMatrix3()
Cesium.Transforms.localFrameToFixedFrameGenerator("north", "down")
Cesium.Cartesian3.fromDegrees(longitude, latitude, height)
Cesium.Ellipsoid.default
),
new Cesium.Matrix3()
);
scene.primitives.add(new Cesium.CubeMapPanorama({
sources : {
positiveX : 'cubemap_px.png',
negativeX : 'cubemap_nx.png',
positiveY : 'cubemap_py.png',
negativeY : 'cubemap_ny.png',
positiveZ : 'cubemap_pz.png',
negativeZ : 'cubemap_nz.png'
}
transform: modelMatrix,
}));
Demo:
See:
Members
readonly credit : Credit
不要直接调用此函数。此文档仅用于列出渲染场景时可能传播的异常:
获取全景图的致谢信息。
-
Default Value:
true
用于创建立方体地图面的源:一个具有
positiveX、negativeX、positiveY、negativeY、positiveZ 和 negativeZ 属性的对象。
这些可以是 URL 或 Image 对象。
决定立方体地图全景图是否会被显示。
获取全景图的变换。如果未定义,则使用默认方向,即真赤道平均分点(TEME)轴。
-
Default Value:
undefined
在
Viewer 或 CesiumWidget 渲染场景时调用此函数,以获取渲染此原始体所需的绘制命令。
Methods
会释放该对象所持有的 WebGL 资源。销毁对象可以使得 WebGL 资源被确定性地释放,而无需依赖垃圾收集器来销毁该对象。
一旦对象被销毁,就不应再使用它;调用除
Once an object is destroyed, it should not be used; calling any function other than
isDestroyed 之外的任何函数都会引发
Once an object is destroyed, it should not be used; calling any function other than
isDestroyed will result in a DeveloperError exception. Therefore,
应将返回值 (undefined) 赋给该对象,如示例中所示。
Throws:
-
DeveloperError : This 表明对象已被销毁,即调用了 destroy() 方法。
Example:
cubeMapPanorama = cubeMapPanorama && cubeMapPanorama.destroy();
See:
Returns true if this object was destroyed; otherwise, false.
If this object was destroyed, it should not be used; calling any function other than 调用
If this object was destroyed, it should not be used; calling any function other than 调用
isDestroyed 将引发 DeveloperError 异常。
Returns:
true 如果此对象已被销毁,则返回 true;否则返回 false。
Called when
Viewer or CesiumWidget render the scene to
所有属性必须属于同一类型。
如果此对象被销毁,则返回 true;否则返回 false。 如果此对象被销毁,则不应使用它;调用任何其他函数
Throws:
-
DeveloperError : this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.
-
DeveloperError : this.sources properties must all be the same type.
Type Definitions
CubeMapPanorama 构造器的初始化选项
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options.sources |
object |
<optional> |
六个立方体地图面的源 URL 或 Image 对象。请参见下面的示例。 |
|
options.transform |
Matrix3 |
<optional> |
定义全景图方向的 3x3 变换矩阵。未指定时,默认方向使用真赤道平均分点(TEME)轴。 | |
options.show |
boolean |
<optional> |
true | 决定此原始体是否会被显示。 |
options.credit |
Credit | string |
<optional> |
显示在画布上的全景图的致谢信息。 |
