Video delivery category. Put pictures or videos into the scene to simulate the effect of advertising screens on buildings or large-screen TVs.
| Name | Type | Description |
|---|---|---|
scene |
Object | optional Specify the scene object for analysis. |
Throws:
-
DeveloperError : The scene must be specified.
Example:
//Create video delivery
var projectionImagee= new Cesium.ProjectionImage(scene);.
Members
-
Get or set the azimuth angle of the projector when the video is put, that is, the angle between the clockwise direction and the true north direction. The value range is 0°~360°.
-
Get or set the distance from the observation point to the projector.
-
hintLineColor : Color
-
Gets or sets the color of the prompt line when the video is put.
-
hintLineVisible : Color
-
Gets or sets the visibility of the prompt line when the video is put.
-
Gets or sets the horizontal viewing angle range of the projector when the video is put, unit: degree.
-
Gets or sets the pitch angle of the projector when the video is cast. The angle refers to the angle between the camera direction and the water surface direction. The orientation is positive, and the unit is degree.
-
Gets or sets the vertical viewing angle range of the projector when the video is put, unit: degree.
-
Gets or sets the position of the observer of the video delivery. The location is represented by an array of longitude, latitude, and elevation.
-
Gets or sets whether the video delivery is visible, the default is true.
-
Default Value:
true -
Gets or sets the maximum visible distance of the video.
-
Default Value:
500
Methods
-
Read multiple videos from the file, that is, add multiple videos at the same time through the file for delivery.
Name Type Description sceneScene Scenario infoUrlString The address or path of the video attribute information file baseUrlString optional Basic path. If it is added, it will be spliced into a path with the name of the video in the file. If it is not added, the parent path in the infoUrl file will be used as the baseUrl. Returns:
Promise returns promise, including the created ProjectionImage object.Example:
Cesium.ProjectionImage.fromInfo(scene, './data/allprojectionInfo.xml', './media/') -
Add clipping polygons.
Name Type Description optionsObject The parameter object contains the following properties: Name Type Description nameString The name of the polygon positionCartesian3 Position of polygon Returns:
Whether the polygon was added successfully -
Perform video delivery analysis.
-
Get the visibility of the video delivery analysis in the specified viewport.
Name Type Description indexNumber The specified viewport index. Returns:
visible (optional).Throws:
-
DeveloperError : The range of index value is 0-3.
-
-
pixelToWorldCoordinates(x, y) → Cartesian3
-
Convert picture pixel coordinates to world coordinates.
Name Type Description xThe x coordinate of the picture pixel yThe y coordinate of the picture pixel Returns:
The world coordinate corresponding to the pixel position of the picture -
Delete all polygons.
Returns:
Is the deletion successful -
Delete the polygon with the specified name.
Name Type Description namePolygon name Returns:
Is the deletion successful -
Set the clipping mode.
Name Type Description modeEnumerate for ModifyRegionMode Returns:
Is it added successfully -
set the direction by point(longitude, latitude and height).
Name Type Description positionArray Throws:
-
DeveloperError : the position is [longitude, latitude ,height] and is not equals viewPosition
-
-
Set the imagery or video object used for delivery.
Name Type Description optionsObject The object has the following attributes: Name Type Description urlArray Specify the address of the image resource. videoObject Specify the video address, currently only supports *.webm format video, currently only supports .webm. Throws:
-
DeveloperError : Must specify options.url or options.video.
-
-
Set the location information of the video. The location information is saved in an .xml file and set by reading the content of the file.
Name Type Description urlString The address of the file where the location information is stored. Returns:
-
Set the visibility of the video delivery analysis in the specified viewport.
Name Type Description indexNumber The specified viewport index. Throws:
-
DeveloperError : The range of index value is 0-3.
-
