VoxelProvider
.
参数名称 | 类型 | 描述信息 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
可选
Object with the following properties:
|
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
参考:
成员(属性)
allTilesLoaded : Event
This event is fired at the end of the frame after the scene is rendered.
使用示例:
voxelPrimitive.allTilesLoaded.addEventListener(function() {
console.log('All tiles are loaded');
});
readonly boundingSphere : BoundingSphere
clippingPlanes : ClippingPlaneCollection
ClippingPlaneCollection
used to selectively disable rendering the primitive.
customShader : CustomShader
VoxelPrimitive.DefaultCustomShader
is set.
readonly customShaderCompilationEvent : Event
readonly dimensions : Cartesian3
initialTilesLoaded : Event
This event is fired at the end of the frame after the scene is rendered.
使用示例:
voxelPrimitive.initialTilesLoaded.addEventListener(function() {
console.log('Initial tiles are loaded');
});
参考:
loadProgress : Event
The number of pending tile requests, numberOfPendingRequests
, and number of tiles
processing, numberOfTilesProcessing
are passed to the event listener.
This event is fired at the end of the frame after the scene is rendered.
使用示例:
voxelPrimitive.loadProgress.addEventListener(function(numberOfPendingRequests, numberOfTilesProcessing) {
if ((numberOfPendingRequests === 0) && (numberOfTilesProcessing === 0)) {
console.log('Finished loading');
return;
}
console.log(`Loading: requests: ${numberOfPendingRequests}, processing: ${numberOfTilesProcessing}`);
});
maxBounds : Cartesian3
maxClippingBounds : Cartesian3
minBounds : Cartesian3
minClippingBounds : Cartesian3
readonly modelMatrix : Matrix4
readonly orientedBoundingBox : OrientedBoundingBox
readonly provider : VoxelProvider
VoxelProvider
associated with this primitive.
readonly shape : VoxelShapeType
tileFailed : Event
使用示例:
voxelPrimitive.tileFailed.addEventListener(function() {
console.log('An error occurred loading tile.');
});
tileLoad : Event
This event is fired during the tileset traversal while the frame is being rendered so that updates to the tile take effect in the same frame. Do not create or modify Cesium entities or primitives during the event listener.
使用示例:
voxelPrimitive.tileLoad.addEventListener(function() {
console.log('A tile was loaded.');
});
tileUnload : Event
使用示例:
voxelPrimitive.tileUnload.addEventListener(function() {
console.log('A tile was unloaded from the cache.');
});
tileVisible : Event
This event is fired during the traversal while the frame is being rendered.
使用示例:
voxelPrimitive.tileVisible.addEventListener(function() {
console.log('A tile is visible.');
});
方法
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.
使用示例:
voxelPrimitive = voxelPrimitive && voxelPrimitive.destroy();
参考:
If this object was destroyed, it should not be used; calling any function other than
isDestroyed
will result in a DeveloperError
exception.
返回值:
true
if this object was destroyed; otherwise, false
.