Skip to content
This repository was archived by the owner on Nov 26, 2024. It is now read-only.

LAB-950: Fix terrain starry skies #3

Merged
merged 2 commits into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Source/Renderer/ComputeCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ define([
*/
this.postExecute = options.postExecute;

/**
* Function that is called when the command is canceled
*
* @type {Function}
* @default undefined
*/
this.canceled = options.canceled;

/**
* Whether the renderer resources will persist beyond this call. If not, they
* will be destroyed after completion.
Expand Down
9 changes: 9 additions & 0 deletions Source/Scene/ImageryLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,10 @@ define([
that._finalizeReprojectTexture(context, outputTexture);
imagery.state = ImageryState.READY;
imagery.releaseReference();
},
canceled : function() {
imagery.state = ImageryState.TEXTURE_LOADED;
imagery.releaseReference();
}
});
this._reprojectComputeCommands.push(computeCommand);
Expand Down Expand Up @@ -1017,6 +1021,11 @@ define([
* @private
*/
ImageryLayer.prototype.cancelReprojections = function() {
this._reprojectComputeCommands.forEach(function(command) {
if (command.canceled) {
command.canceled();
}
});
this._reprojectComputeCommands.length = 0;
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@propelleraero/cesium",
"version": "1.61.0",
"version": "1.61.1",
"description": "CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin.",
"homepage": "http://cesiumjs.org",
"license": "Apache-2.0",
Expand Down