CubeMapPanorama

new Cesium.CubeMapPanorama(options)

在场景中显示立方体贴图格式影像的 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

获取全景图的 credits。
确定是否显示立方体贴图全景图。
Default Value: true
用于创建立方体贴图各个面的源:一个 具有 positiveXnegativeXpositiveYnegativeYpositiveZnegativeZ 属性的对象。 这些可以是 URL 或 Image 对象。
Default Value: undefined
获取全景图的变换。如果为 undefined,默认方向使用真赤道平春分点(TEME)轴。

Methods

销毁此对象持有的 WebGL 资源。销毁对象可以实现 WebGL 资源的确定性 释放,而不是依赖垃圾回收器来销毁此对象。

一旦对象被销毁,就不应再使用它;调用除 isDestroyed 之外的任何函数都将导致 DeveloperError 异常。因此, 应像示例中那样将返回值(undefined)赋给该对象。
Throws:
Example:
cubeMapPanorama = cubeMapPanorama && cubeMapPanorama.destroy();
See:

isDestroyed()boolean

如果此对象已销毁则返回 true,否则返回 false。

如果此对象已销毁,则不应再使用它;调用除 isDestroyed 之外的任何函数都将导致 DeveloperError 异常。
Returns:
true 如果此对象已销毁,false 否则。
See:
ViewerCesiumWidget 渲染场景以获取渲染此图元 所需的绘制命令时调用。

不要直接调用此函数。记录它只是为了 列出场景渲染时可能传播的异常:

Throws:
  • DeveloperError :this.sources 是必需的,并且必须具有 positiveX、negativeX、positiveY、negativeY、positiveZ 和 negativeZ 属性。
  • DeveloperError :this.sources 的所有属性必须是相同类型。

Type Definitions

Cesium.CubeMapPanorama.ConstructorOptions

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>
全景图的 credit,显示在画布上。
需要帮助?获取答案的最快方式是在 Cesium 论坛 上向社区和团队提问。.