|
@@ -20304,6 +20304,23 @@ var BABYLON;
|
|
|
Camera.prototype.isActiveMesh = function (mesh) {
|
|
|
return (this._activeMeshes.indexOf(mesh) !== -1);
|
|
|
};
|
|
|
+ /**
|
|
|
+ * Is this camera ready to be used/rendered
|
|
|
+ * @param completeCheck defines if a complete check (including post processes) has to be done (false by default)
|
|
|
+ * @return true if the camera is ready
|
|
|
+ */
|
|
|
+ Camera.prototype.isReady = function (completeCheck) {
|
|
|
+ if (completeCheck === void 0) { completeCheck = false; }
|
|
|
+ if (completeCheck) {
|
|
|
+ for (var _i = 0, _a = this._postProcesses; _i < _a.length; _i++) {
|
|
|
+ var pp = _a[_i];
|
|
|
+ if (pp && !pp.isReady()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return _super.prototype.isReady.call(this, completeCheck);
|
|
|
+ };
|
|
|
//Cache
|
|
|
Camera.prototype._initCache = function () {
|
|
|
_super.prototype._initCache.call(this);
|
|
@@ -23274,9 +23291,23 @@ var BABYLON;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ // Post-processes
|
|
|
+ if (this.activeCameras && this.activeCameras.length > 0) {
|
|
|
+ for (var _d = 0, _e = this.activeCameras; _d < _e.length; _d++) {
|
|
|
+ var camera = _e[_d];
|
|
|
+ if (!camera.isReady(true)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (this.activeCamera) {
|
|
|
+ if (!this.activeCamera.isReady(true)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
// Particles
|
|
|
- for (var _d = 0, _e = this.particleSystems; _d < _e.length; _d++) {
|
|
|
- var particleSystem = _e[_d];
|
|
|
+ for (var _f = 0, _g = this.particleSystems; _f < _g.length; _f++) {
|
|
|
+ var particleSystem = _g[_f];
|
|
|
if (!particleSystem.isReady()) {
|
|
|
return false;
|
|
|
}
|