Skip to content

Commit

Permalink
Merge pull request #3835 from AnalyticalGraphicsInc/3d-tiles-display-…
Browse files Browse the repository at this point in the history
…condition

Remove DistanceDisplayCondition
  • Loading branch information
lilleyse committed Apr 12, 2016
2 parents 66f271b + dc81063 commit 86ae00a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 94 deletions.
73 changes: 0 additions & 73 deletions Source/Scene/DistanceDisplayCondition.js

This file was deleted.

22 changes: 1 addition & 21 deletions Source/Scene/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,6 @@ define([
* @param {Object|ArrayBuffer|Uint8Array} [options.gltf] The object for the glTF JSON or an arraybuffer of Binary glTF defined by the KHR_binary_glTF extension.
* @param {String} [options.basePath=''] The base path that paths in the glTF JSON are relative to.
* @param {Boolean} [options.show=true] Determines if the model primitive will be shown.
* @param {DisplayCondition} [options.displayCondition] DOC_TBA
* @param {Boolean} [options.loadOnlyIfDisplayCondition] DOC_TBA
* @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms the model from model to world coordinates.
* @param {Number} [options.scale=1.0] A uniform scale applied to this model.
* @param {Number} [options.minimumPixelSize=0.0] The approximate minimum pixel size of the model regardless of zoom.
Expand Down Expand Up @@ -411,16 +409,6 @@ define([
*/
this.show = defaultValue(options.show, true);

/**
* DOC_TBA
*/
this.displayCondition = options.displayCondition;

/**
* DOC_TBA
*/
this.loadOnlyIfDisplayCondition = defaultValue(options.loadOnlyIfDisplayCondition, false);

/**
* The 4x4 transformation matrix that transforms the model from model to world coordinates.
* When this is the identity matrix, the model is drawn in world coordinates, i.e., Earth's WGS84 coordinates.
Expand Down Expand Up @@ -920,8 +908,6 @@ define([
* @param {String} options.url The url to the .gltf file.
* @param {Object} [options.headers] HTTP headers to send with the request.
* @param {Boolean} [options.show=true] Determines if the model primitive will be shown.
* @param {DisplayCondition} [options.displayCondition] DOC_TBA
* @param {Boolean} [options.loadOnlyIfDisplayCondition] DOC_TBA
* @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms the model from model to world coordinates.
* @param {Number} [options.scale=1.0] A uniform scale applied to this model.
* @param {Number} [options.minimumPixelSize=0.0] The approximate minimum pixel size of the model regardless of zoom.
Expand Down Expand Up @@ -3388,12 +3374,6 @@ define([
return;
}

var displayConditionPassed = defined(this.displayCondition) ? this.displayCondition.isVisible(this, frameState) : true;
if (this.loadOnlyIfDisplayCondition && !displayConditionPassed) {
// Don't even try to load until the display condition is true
return;
}

var context = frameState.context;
this._defaultTexture = context.defaultTexture;

Expand Down Expand Up @@ -3498,7 +3478,7 @@ define([
}
}

var show = this.show && (this.scale !== 0.0) && displayConditionPassed && (!defined(loadResources) || !loadResources.decompressionInFlight);
var show = this.show && (this.scale !== 0.0) && (!defined(loadResources) || !loadResources.decompressionInFlight);

if ((show && this._state === ModelState.LOADED) || justLoaded) {
var animated = this.activeAnimations.update(frameState) || this._cesiumAnimationsDirty;
Expand Down

0 comments on commit 86ae00a

Please sign in to comment.