A
Panorama 在场景中以立方体贴图格式显示图像。 that displays imagery in cube map format in a scene.
仅 3D 支持此功能。当变形为 2D 或哥伦布视图时,立方体贴图全景会淡出。立方体贴图全景图的大小不得超过 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 = 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,
}));
演示: Demo:
另见: See:
成员 Members
readonly credit : Credit
获取全景图的学分。 Gets the credits of the panorama.
确定是否显示立方体贴图全景。 Determines if the cube map panorama will be shown.
-
默认值: Default Value:
true
用于创建立方体贴图面的源:具有 The sources used to create the cube map faces: an object with
positiveX, negativeX, positiveY,
negativeY, positiveZ, 和 , and negativeZ 属性。这些可以是 URL 或 properties. These can be either URLs or Image objects.
-
默认值: Default Value:
undefined
readonly transform : Matrix3
获取全景图的变换。如果未定义,则默认方向使用真赤道平均春分点 (TEME) 轴。 Gets the transform of the panorama. If undefined, the default orientation uses the True Equator Mean Equinox (TEME) axes.
方法 Methods
销毁该对象持有的 WebGL 资源。销毁对象可以确定性地释放 WebGL 资源,而不是依赖垃圾收集器来销毁该对象。 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
一旦对象被销毁,就不应再使用;调用除 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:
如果该对象被销毁则返回 true;否则为假。 Returns true if this object was destroyed; otherwise, false.
如果该对象被破坏,则不应使用它;调用除 If this object was destroyed, it should not be used; calling any function other than
如果该对象被破坏,则不应使用它;调用除 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:
调用时间 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
CubeMapPanorama 构造函数的初始化选项 Initialization options for the CubeMapPanorama constructor
属性: Properties:
| 名称 Name | 类型 Type | Attributes | 默认值 Default | 说明 Description |
|---|---|---|---|---|
options.sources |
object |
<可选> <optional> |
源 URL 或 The source URL or Image 六个立方体贴图面中每个面的对象。请参阅下面的示例。 object for each of the six cube map faces. See the example below. |
|
options.transform |
Matrix3 |
<可选> <optional> |
定义全景图方向的 3x3 变换矩阵。如果未指定,则使用真赤道平均春分点 (TEME) 轴定义默认方向。 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. |
