CubeMapPanorama

new Ditap.CubeMapPanorama(options)

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

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.

Name Type Description
options CubeMapPanorama.ConstructorOptions Object describing initialization options
Example:
const modelMatrix = Ditap.Matrix4.getMatrix3(
  Ditap.Transforms.localFrameToFixedFrameGenerator("north", "down")(
    Ditap.Cartesian3.fromDegrees(longitude, latitude, height),
    Ditap.Ellipsoid.default
  ),
  new Ditap.Matrix3()
);


scene.primitives.add(new Ditap.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

Gets the credits of the panorama.

show : boolean

Determines if the cube map panorama will be shown.
Default Value: true

sources : object

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

readonly transform : Matrix3

Gets the transform of the panorama. If undefined, the default orientation uses the True Equator Mean Equinox (TEME) axes.

Methods

destroy()

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.

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

Returns true if this object was destroyed; otherwise, false.

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 get the draw commands needed to render this primitive.

Do not call this function directly. This is documented just to list the exceptions that may be propagated when the scene is rendered:

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

Ditap.CubeMapPanorama.ConstructorOptions

Initialization options for the CubeMapPanorama constructor
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 Matrix3 <optional>
A 3x3 transformation matrix that defines the panorama’s orientation. If not specified, the default orientation is defined using the True Equator Mean Equinox (TEME) axes.
options.show boolean <optional>
true Determines if this primitive will be shown.
options.credit Credit | string <optional>
A credit for the panorama, which is displayed on the canvas.