在场景中显示立方体贴图格式影像的
Panorama。
这仅在 3D 中受支持。当切换到 2D 或 Columbus 视图时,立方体贴图全景图会淡出。
立方体贴图全景图的大小不得超过 Scene#maximumSkyBoxSize。
| Name | Type | Description |
|---|---|---|
options |
CubeMapPanorama.ConstructorOptions | 描述初始化选项的对象 |
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
获取全景图的 credits。
确定是否显示立方体贴图全景图。
-
Default Value:
true
用于创建立方体贴图各个面的源:一个
具有
positiveX、negativeX、positiveY、
negativeY、positiveZ 和 negativeZ 属性的对象。
这些可以是 URL 或 Image 对象。
-
Default Value:
undefined
readonly transform : Matrix3
获取全景图的变换。如果为 undefined,默认方向使用真赤道平春分点(TEME)轴。
Methods
销毁此对象持有的 WebGL 资源。销毁对象可以实现 WebGL 资源的确定性
释放,而不是依赖垃圾回收器来销毁此对象。
一旦对象被销毁,就不应再使用它;调用除
一旦对象被销毁,就不应再使用它;调用除
isDestroyed 之外的任何函数都将导致 DeveloperError 异常。因此,
应像示例中那样将返回值(undefined)赋给该对象。
Throws:
-
DeveloperError :此对象已被销毁,即已调用 destroy()。
Example:
cubeMapPanorama = cubeMapPanorama && cubeMapPanorama.destroy();
See:
Returns:
true 如果此对象已销毁,false 否则。
Throws:
-
DeveloperError :this.sources 是必需的,并且必须具有 positiveX、negativeX、positiveY、negativeY、positiveZ 和 negativeZ 属性。
-
DeveloperError :this.sources 的所有属性必须是相同类型。
Type Definitions
CubeMapPanorama 构造函数的初始化选项
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options.sources |
object |
<optional> |
六个立方体贴图面各自的源 URL 或 Image 对象。参见下面的示例。 |
|
options.transform |
Matrix3 |
<optional> |
定义全景图朝向的 3x3 变换矩阵。如果未指定,默认朝向使用真赤道平春分点(TEME)轴定义。 | |
options.show |
boolean |
<optional> |
true | 确定此图元是否显示。 |
options.credit |
Credit | string |
<optional> |
全景图的 credit,显示在画布上。 |
