# EquirectangularPanorama

#### new Cesium.EquirectangularPanorama(options)
engine/Source/Scene/EquirectangularPanorama.js 70

A `Panorama` that displays imagery in equirectangular format in a scene.

Name | Type | Description
--- | --- | ---
`options` | EquirectangularPanorama.ConstructorOptions | Object describing initialization options

##### Example:

    const position = Cesium.Cartesian3.fromDegrees(
      -75.1699,  // longitude
      39.9522,   // latitude
      100.0      // height in meters
    );

    const heading = Cesium.Math.toRadians(45.0); // rotation about up axis
    const pitch = Cesium.Math.toRadians(-30.0);   // pitch (negative looks down)
    const roll = Cesium.Math.toRadians(10.0);    // roll about forward axis

    const hpr = new Cesium.HeadingPitchRoll(
      heading,
      pitch,
      roll
    );

    const modelMatrix = Cesium.Transforms.headingPitchRollToFixedFrame(
      position,
      hpr,
      Cesium.Ellipsoid.WGS84,
      Cesium.Transforms.eastNorthUpToFixedFrame
    );

    scene.primitives.add(new Cesium.EquirectangularPanorama({
      transform: modelMatrix,
      image: 'path/to/image',
    }));

##### Demo:

- Cesium Sandcastle Panorama

### Members

#### readonly credit : Credit
engine/Source/Scene/EquirectangularPanorama.js 185

Gets the credits of the panorama.

#### readonly image : string|HTMLImageElement|HTMLCanvasElement|ImageBitmap
engine/Source/Scene/EquirectangularPanorama.js 161

Gets the source image of the panorama.

#### readonly radius : number
engine/Source/Scene/EquirectangularPanorama.js 149

Gets the radius of the panorama.

#### show : boolean
engine/Source/Scene/EquirectangularPanorama.js 196

Determines if the equirectangular panorama will be shown.

#### readonly transform : Matrix4
engine/Source/Scene/EquirectangularPanorama.js 173

Gets the transform of the panorama.

### Methods

#### destroy()
engine/Source/Scene/EquirectangularPanorama.js 243

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:

    equirectangularPanorama = equirectangularPanorama && equirectangularPanorama.destroy();

##### See:

- EquirectangularPanorama#isDestroyed

#### isDestroyed() → boolean
engine/Source/Scene/EquirectangularPanorama.js 259

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:

- EquirectangularPanorama#destroy

#### update()
engine/Source/Scene/EquirectangularPanorama.js 219

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:

### Type Definitions

#### Cesium.EquirectangularPanorama.ConstructorOptions
engine/Source/Scene/EquirectangularPanorama.js 17

Initialization options for the EquirectangularPanorama constructor

##### Properties:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`options.transform` | Matrix4 |  |  | A 4x4 transformation matrix that defines the panorama’s position and orientation (for example, derived from a position and heading-pitch-roll).
`options.image` | string | HTMLImageElement | HTMLCanvasElement | ImageBitmap |  |  | A URL to an image resource, or a preloaded image object.
`options.radius` | number | <optional> | 100000.0 | The radius of the panorama in meters.
`options.repeatHorizontal` | number | <optional> | 1.0 | The number of times to repeat the texture horizontally.
`options.repeatVertical` | number | <optional> | 1.0 | The number of times to repeat the texture vertically.
`options.credit` | Credit | string | <optional> |  | A credit for the panorama, which is displayed on the canvas.

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.