Skip to content

KBE3D / KBCore / Cesium / CubeMapPanorama

类: CubeMapPanorama

A Panorama that displays imagery in cube map format in a scene. <p> This is only supported in 3D. The cube map panorama is faded out when morphing to 2D or Columbus view. The size of the cube map panorama must not exceed Scene#maximumSkyBoxSize. </p>

示例

ts
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,
}));

参数

Object describing initialization options

属性

sources

sources: any

The sources used to create the cube map faces: an object with <code>positiveX</code>, <code>negativeX</code>, <code>positiveY</code>, <code>negativeY</code>, <code>positiveZ</code>, and <code>negativeZ</code> properties. These can be either URLs or <code>Image</code> objects.


show

show: boolean

Determines if the cube map panorama will be shown.


transform

readonly transform: Matrix4

Gets the transform of the panorama.


credit

readonly credit: Credit

Gets the credits of the panorama.

方法

update()

update(): void

Called when Viewer or CesiumWidget render the scene to get the draw commands needed to render this primitive. <p> Do not call this function directly. This is documented just to list the exceptions that may be propagated when the scene is rendered: </p>

返回

void


isDestroyed()

isDestroyed(): boolean

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

返回

boolean

true if this object was destroyed; otherwise, false.


destroy()

destroy(): void

Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object. <br /><br /> Once an object is destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a DeveloperError exception. Therefore, assign the return value (<code>undefined</code>) to the object as done in the example.

返回

void

示例

ts
cubeMapPanorama = cubeMapPanorama && cubeMapPanorama.destroy();

构造函数

构造函数

new CubeMapPanorama(options: ConstructorOptions): CubeMapPanorama

参数

options

ConstructorOptions

返回

CubeMapPanorama

KBE3D @3.0.0 Copyright © 2024-present KBE3D