Skip to content

Commit

Permalink
Fixed issue with delayed loaded textures and callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
deltakosh committed Feb 16, 2016
1 parent 7c87bbe commit 72305fd
Show file tree
Hide file tree
Showing 150 changed files with 40,729 additions and 40,861 deletions.
16 changes: 8 additions & 8 deletions dist/preview release/babylon.core.js

Large diffs are not rendered by default.

2,804 changes: 1,403 additions & 1,401 deletions dist/preview release/babylon.d.ts

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions dist/preview release/babylon.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion dist/preview release/babylon.max.js
Expand Up @@ -17609,6 +17609,8 @@ var BABYLON;
}
else {
this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_NOTLOADED;
this._delayedOnLoad = onLoad;
this._delayedOnError = onError;
}
}
else {
Expand All @@ -17626,7 +17628,7 @@ var BABYLON;
this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_LOADED;
this._texture = this._getFromCache(this.url, this._noMipmap, this._samplingMode);
if (!this._texture) {
this._texture = this.getScene().getEngine().createTexture(this.url, this._noMipmap, this._invertY, this.getScene(), this._samplingMode, null, null, this._buffer);
this._texture = this.getScene().getEngine().createTexture(this.url, this._noMipmap, this._invertY, this.getScene(), this._samplingMode, this._delayedOnLoad, this._delayedOnError, this._buffer);
if (this._deleteBuffer) {
delete this._buffer;
}
Expand Down
24 changes: 12 additions & 12 deletions dist/preview release/babylon.noworker.js

Large diffs are not rendered by default.

145 changes: 72 additions & 73 deletions src/Actions/babylon.action.js
@@ -1,73 +1,72 @@
var BABYLON;
(function (BABYLON) {
var Action = (function () {
function Action(triggerOptions, condition) {
this.triggerOptions = triggerOptions;
if (triggerOptions.parameter) {
this.trigger = triggerOptions.trigger;
this._triggerParameter = triggerOptions.parameter;
}
else {
this.trigger = triggerOptions;
}
this._nextActiveAction = this;
this._condition = condition;
}
// Methods
Action.prototype._prepare = function () {
};
Action.prototype.getTriggerParameter = function () {
return this._triggerParameter;
};
Action.prototype._executeCurrent = function (evt) {
if (this._nextActiveAction._condition) {
var condition = this._nextActiveAction._condition;
var currentRenderId = this._actionManager.getScene().getRenderId();
// We cache the current evaluation for the current frame
if (condition._evaluationId === currentRenderId) {
if (!condition._currentResult) {
return;
}
}
else {
condition._evaluationId = currentRenderId;
if (!condition.isValid()) {
condition._currentResult = false;
return;
}
condition._currentResult = true;
}
}
this._nextActiveAction.execute(evt);
this.skipToNextActiveAction();
};
Action.prototype.execute = function (evt) {
};
Action.prototype.skipToNextActiveAction = function () {
if (this._nextActiveAction._child) {
if (!this._nextActiveAction._child._actionManager) {
this._nextActiveAction._child._actionManager = this._actionManager;
}
this._nextActiveAction = this._nextActiveAction._child;
}
else {
this._nextActiveAction = this;
}
};
Action.prototype.then = function (action) {
this._child = action;
action._actionManager = this._actionManager;
action._prepare();
return action;
};
Action.prototype._getProperty = function (propertyPath) {
return this._actionManager._getProperty(propertyPath);
};
Action.prototype._getEffectiveTarget = function (target, propertyPath) {
return this._actionManager._getEffectiveTarget(target, propertyPath);
};
return Action;
})();
BABYLON.Action = Action;
})(BABYLON || (BABYLON = {}));
//# sourceMappingURL=babylon.action.js.map
var BABYLON;
(function (BABYLON) {
var Action = (function () {
function Action(triggerOptions, condition) {
this.triggerOptions = triggerOptions;
if (triggerOptions.parameter) {
this.trigger = triggerOptions.trigger;
this._triggerParameter = triggerOptions.parameter;
}
else {
this.trigger = triggerOptions;
}
this._nextActiveAction = this;
this._condition = condition;
}
// Methods
Action.prototype._prepare = function () {
};
Action.prototype.getTriggerParameter = function () {
return this._triggerParameter;
};
Action.prototype._executeCurrent = function (evt) {
if (this._nextActiveAction._condition) {
var condition = this._nextActiveAction._condition;
var currentRenderId = this._actionManager.getScene().getRenderId();
// We cache the current evaluation for the current frame
if (condition._evaluationId === currentRenderId) {
if (!condition._currentResult) {
return;
}
}
else {
condition._evaluationId = currentRenderId;
if (!condition.isValid()) {
condition._currentResult = false;
return;
}
condition._currentResult = true;
}
}
this._nextActiveAction.execute(evt);
this.skipToNextActiveAction();
};
Action.prototype.execute = function (evt) {
};
Action.prototype.skipToNextActiveAction = function () {
if (this._nextActiveAction._child) {
if (!this._nextActiveAction._child._actionManager) {
this._nextActiveAction._child._actionManager = this._actionManager;
}
this._nextActiveAction = this._nextActiveAction._child;
}
else {
this._nextActiveAction = this;
}
};
Action.prototype.then = function (action) {
this._child = action;
action._actionManager = this._actionManager;
action._prepare();
return action;
};
Action.prototype._getProperty = function (propertyPath) {
return this._actionManager._getProperty(propertyPath);
};
Action.prototype._getEffectiveTarget = function (target, propertyPath) {
return this._actionManager._getEffectiveTarget(target, propertyPath);
};
return Action;
})();
BABYLON.Action = Action;
})(BABYLON || (BABYLON = {}));

0 comments on commit 72305fd

Please sign in to comment.