Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove DistanceDisplayCondition #3835

Merged
merged 1 commit into from
Apr 12, 2016
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
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