Appearance
KBE3D / KBCore / Cesium / EquirectangularPanorama
类: EquirectangularPanorama
A Panorama that displays imagery in equirectangular format in a scene.
示例
ts
const position = Cesium.Cartesian3.fromDegrees(
-75.1699, // longitude
39.9522, // latitude
100.0 // height in meters
);
const heading = Cesium.Math.toRadians(45.0); // rotation about up axis
const pitch = Cesium.Math.toRadians(-30.0); // pitch (negative looks down)
const roll = Cesium.Math.toRadians(10.0); // roll about forward axis
const hpr = new Cesium.HeadingPitchRoll(
heading,
pitch,
roll
);
const modelMatrix = Cesium.Transforms.headingPitchRollToFixedFrame(
position,
hpr,
Cesium.Ellipsoid.WGS84,
Cesium.Transforms.eastNorthUpToFixedFrame
);
scene.primitives.add(new Cesium.EquirectangularPanorama({
transform: modelMatrix,
image: 'path/to/image',
}));参数
Object describing initialization options
属性
radius
readonlyradius:number
Gets the radius of the panorama.
image
readonlyimage:string|HTMLCanvasElement|HTMLImageElement|ImageBitmap
Gets the source image of the panorama.
transform
readonlytransform:Matrix4
Gets the transform of the panorama.
credit
readonlycredit:Credit
Gets the credits of the panorama.
show
show:
boolean
Determines if the equirectangular panorama will be shown.
方法
update()
update():
void
Called when Viewer or CesiumWidget render the scene to get the draw commands needed to render this primitive. <p> Do not call this function directly. This is documented just to list the exceptions that may be propagated when the scene is rendered: </p>
返回
void
destroy()
destroy():
void
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. <br /><br /> Once an object is destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a DeveloperError exception. Therefore, assign the return value (<code>undefined</code>) to the object as done in the example.
返回
void
示例
ts
equirectangularPanorama = equirectangularPanorama && equirectangularPanorama.destroy();isDestroyed()
isDestroyed():
boolean
Returns true if this object was destroyed; otherwise, false. <br /><br /> If this object was destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a DeveloperError exception.
返回
boolean
true if this object was destroyed; otherwise, false.
构造函数
构造函数
new EquirectangularPanorama(
options:ConstructorOptions):EquirectangularPanorama
参数
options
返回
EquirectangularPanorama
