A
Panorama that displays imagery in cube map format in a scene.
这只在3D中支持. 立方体地图全景在变形到2D或哥伦布视图时会淡出. 规模
the cube map panorama must not exceed 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
Methods
Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
释放 WebGL 资源,而不是依赖垃圾收集器来摧毁此对象.
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:
如果此对象被销毁, 返回真实; 否则, 错误 .
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.
Called when
Viewer or CesiumWidget render the scene to
获得使这个原始化所需的绘图命令.
不要直接调用此函数 。 记录下来的只是 列出场景拍摄时可能宣传的例外情况:
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 构造器的初始化选项
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options.sources |
object |
<optional> |
The source URL or Image object for each of the six cube map faces. See the example below. |
|
options.transform |
Matrix4 |
<optional> |
定义全景位置和方向的 4x4 变换矩阵 | |
options.show |
boolean |
<optional> |
true | Determines if this primitive will be shown. |
options.credit |
Credit | string |
<optional> |
在画布上展示的全景的功劳. |