Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue with delayed loaded textures and callbacks
- Loading branch information
Showing
150 changed files
with
40,729 additions
and
40,861 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = {})); |
Oops, something went wrong.