VoxelProvider.
| 名称 Name | 类型 Type | 说明 Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
可选 optional
具有以下属性的对象: Object with the following properties:
|
实验性 Experimental
此功能不是最终版本,可能会在没有 Cesium 标准弃用政策的情况下进行更改。 This feature is not final and is subject to change without Cesium's standard deprecation policy.
另见: See:
成员 Members
allTilesLoaded : Event
该事件在场景渲染后的帧末尾触发。 This event is fired at the end of the frame after the scene is rendered.
示例: Example:
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.
另见: See:
readonly customShaderCompilationEvent : Event
readonly dimensions : Cartesian3
initialTilesLoaded : Event
该事件在场景渲染后的帧末尾触发。 This event is fired at the end of the frame after the scene is rendered.
示例: Example:
voxelPrimitive.initialTilesLoaded.addEventListener(function() {
console.log('Initial tiles are loaded');
});
另见: See:
readonly inputDimensions : Cartesian3
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.
示例: Example:
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 paddingAfter : Cartesian3
readonly paddingBefore : Cartesian3
readonly provider : VoxelProvider
readonly shape : VoxelShapeType
tileFailed : Event
示例: Example:
voxelPrimitive.tileFailed.addEventListener(function() {
console.log('An error occurred loading tile.');
});
tileLoad : Event
在渲染帧时,在图块集遍历过程中会触发此事件,以便对图块的更新在同一帧中生效。不要在事件监听期间创建或修改 Cesium 实体或原语。 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.
示例: Example:
voxelPrimitive.tileLoad.addEventListener(function() {
console.log('A tile was loaded.');
});
tileUnload : Event
示例: Example:
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.
示例: Example:
voxelPrimitive.tileVisible.addEventListener(function() {
console.log('A tile is visible.');
});
方法 Methods
一旦对象被销毁,就不应再使用;调用除 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:
voxelPrimitive = voxelPrimitive && voxelPrimitive.destroy();
另见: See:
如果该对象被破坏,则不应使用它;调用除 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.
