new Cesium.CubeMapPanorama(options)

A Panorama that displays imagery in cube map format in a scene.

这只在3D中支持. 立方体地图全景在变形到2D或哥伦布视图时会淡出. 规模 the cube map panorama must not exceed 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

获得全景的学分.

show : boolean

确定是否显示立方体地图全景 .
Default Value: true

sources : object

用于创建立方体映射面的源头:一个对象 与 NT+0 阳性 +NT+1 , NT+2 阴性 +NT+3 , NT+4 阳性 Y NT+5 , -NT+0+负Y NT+1+, NT+2+正Z+NT+3+,和 NT+4+负Z+NT+5+属性. 这些可以是URL或 NT 0 Image NT 1 对象.
Default Value: undefined

readonly transform : Matrix4

得到全景的转变.

Methods

destroy()

Destroys the WebGL resources held by this object. Destroying an object allows for deterministic 释放 WebGL 资源,而不是依赖垃圾收集器来摧毁此对象.

Once an object is destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception. Therefore, assign the return value (undefined) to the object as done in the example.
Throws:
  • DeveloperError : This object was destroyed, i.e., destroy() was called.
Example:
cubeMapPanorama = cubeMapPanorama && cubeMapPanorama.destroy();
See:

isDestroyed()boolean

如果此对象被销毁, 返回真实; 否则, 错误 .

If this object was destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception.
Returns:
true if this object was destroyed; otherwise, false.
See:

update()

Called when Viewer or CesiumWidget render the scene to 获得使这个原始化所需的绘图命令.

不要直接调用此函数 。 记录下来的只是 列出场景拍摄时可能宣传的例外情况:

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

Cesium.CubeMapPanorama.ConstructorOptions

CubeMapPanorama 构造器的初始化选项
Properties:
Name Type Attributes Default Description
options.sources object <optional>
The source URL or Image object for each of the six cube map faces. See the example below.
options.transform Matrix4 <optional>
定义全景位置和方向的 4x4 变换矩阵
options.show boolean <optional>
true Determines if this primitive will be shown.
options.credit Credit | string <optional>
在画布上展示的全景的功劳.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.