videoOnTerrain

The videoOnTerrain object enables creation of video on terrain objects and provides access to created objects. A video on terrain object plays a video file on a selected position on the terrain. The following member and method are available:

§  items

§  create()

items

static items : Array<TerraExplorerObject>

Returns an array of TerraExplorerObject containing all video on terrain objects in the project.

create

create(description, videoURL, fov, pos, HeadingPitchRange, options) → {promise}

Creates a video on terrain object.

Parameters

Name

Type

Description

description

String

The name of the video on terrain object as it appears in the Layers and Objects section of the Analysis tab on the sidebar.

videoURL

string

URL of the video file. Only the following types are supported due to HTML5 video tag limitations: WebM, MP4, Ogg.

fov

Number

Horizontal field of view, in degrees, covered by the camera (1-60).

pos

Cesium.Cartesian3

Position of the projector.

HeadingPitchRange

Cesium.HeadingPitchRange

Yaw, pitch and range of the projection.

Options

Object

Name

Type

Description

loop

Boolean

Determines whether the video repeats.

showProjector

Boolean

Determines whether the projector pyramid object is displayed in the 3D Window.

showBillboard

Boolean

Determines whether the video file is played on a floating billboard instead of on the terrain.

Returns

Promise - A promise that resolves to the newly created video on terrain TerraExplorerObject object.

Example

The following example creates a video on terrain:

     Cesium.when(

                  TerraExplorer.objects.videoOnTerrain.create(

                    "myVideo",

                    "http://www.skylineglobe.com/SkylineGlobeLayers/Layers/Videos/bunny.mp4",

                    53,

                    Cesium.Cartesian3.fromDegrees(-82.839, 31.424, 2000),

                    new Cesium.HeadingPitchRange(0, -1.57, 2500),

                    {}

                  ),

                  function(myVideo) {

                    Cesium.when(myVideo.readyPromise, function () {

                      myVideo.flyTo();

                    });

                  }

                );