|
@@ -7827,6 +7827,9 @@ var BABYLON;
|
|
|
var prepareWebGLTexture = function (texture, gl, scene, width, height, invertY, noMipmap, isCompressed, processFunction, samplingMode) {
|
|
|
if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
|
|
|
var engine = scene.getEngine();
|
|
|
+ if (!engine) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
var potWidth = BABYLON.Tools.GetExponentOfTwo(width, engine.getCaps().maxTextureSize);
|
|
|
var potHeight = BABYLON.Tools.GetExponentOfTwo(height, engine.getCaps().maxTextureSize);
|
|
|
engine._bindTextureDirectly(gl.TEXTURE_2D, texture);
|
|
@@ -21697,6 +21700,9 @@ var BABYLON;
|
|
|
}
|
|
|
};
|
|
|
Scene.prototype.render = function () {
|
|
|
+ if (this.isDisposed) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
this._lastFrameDuration.beginMonitoring();
|
|
|
this._particlesDuration.fetchNewFrame();
|
|
|
this._spritesDuration.fetchNewFrame();
|
|
@@ -22058,7 +22064,15 @@ var BABYLON;
|
|
|
this._engine.scenes.splice(index, 1);
|
|
|
}
|
|
|
this._engine.wipeCaches();
|
|
|
+ this._engine = null;
|
|
|
};
|
|
|
+ Object.defineProperty(Scene.prototype, "isDisposed", {
|
|
|
+ get: function () {
|
|
|
+ return !this._engine;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
// Release sounds & sounds tracks
|
|
|
Scene.prototype.disposeSounds = function () {
|
|
|
this.mainSoundTrack.dispose();
|
|
@@ -31320,6 +31334,12 @@ var BABYLON;
|
|
|
var meshes = [];
|
|
|
var particleSystems = [];
|
|
|
var skeletons = [];
|
|
|
+ if (scene.isDisposed) {
|
|
|
+ if (onerror) {
|
|
|
+ onerror(scene, 'Scene was disposed before being able to load ' + rootUrl + sceneFilename);
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ }
|
|
|
try {
|
|
|
if (plugin.importMesh) {
|
|
|
var syncedPlugin = plugin;
|
|
@@ -33947,7 +33967,7 @@ var BABYLON;
|
|
|
var CircleEase = (function (_super) {
|
|
|
__extends(CircleEase, _super);
|
|
|
function CircleEase() {
|
|
|
- return _super !== null && _super.apply(this, arguments) || this;
|
|
|
+ return _super.apply(this, arguments) || this;
|
|
|
}
|
|
|
CircleEase.prototype.easeInCore = function (gradient) {
|
|
|
gradient = Math.max(0, Math.min(1, gradient));
|
|
@@ -34007,7 +34027,7 @@ var BABYLON;
|
|
|
var CubicEase = (function (_super) {
|
|
|
__extends(CubicEase, _super);
|
|
|
function CubicEase() {
|
|
|
- return _super !== null && _super.apply(this, arguments) || this;
|
|
|
+ return _super.apply(this, arguments) || this;
|
|
|
}
|
|
|
CubicEase.prototype.easeInCore = function (gradient) {
|
|
|
return (gradient * gradient * gradient);
|
|
@@ -34075,7 +34095,7 @@ var BABYLON;
|
|
|
var QuadraticEase = (function (_super) {
|
|
|
__extends(QuadraticEase, _super);
|
|
|
function QuadraticEase() {
|
|
|
- return _super !== null && _super.apply(this, arguments) || this;
|
|
|
+ return _super.apply(this, arguments) || this;
|
|
|
}
|
|
|
QuadraticEase.prototype.easeInCore = function (gradient) {
|
|
|
return (gradient * gradient);
|
|
@@ -34086,7 +34106,7 @@ var BABYLON;
|
|
|
var QuarticEase = (function (_super) {
|
|
|
__extends(QuarticEase, _super);
|
|
|
function QuarticEase() {
|
|
|
- return _super !== null && _super.apply(this, arguments) || this;
|
|
|
+ return _super.apply(this, arguments) || this;
|
|
|
}
|
|
|
QuarticEase.prototype.easeInCore = function (gradient) {
|
|
|
return (gradient * gradient * gradient * gradient);
|
|
@@ -34097,7 +34117,7 @@ var BABYLON;
|
|
|
var QuinticEase = (function (_super) {
|
|
|
__extends(QuinticEase, _super);
|
|
|
function QuinticEase() {
|
|
|
- return _super !== null && _super.apply(this, arguments) || this;
|
|
|
+ return _super.apply(this, arguments) || this;
|
|
|
}
|
|
|
QuinticEase.prototype.easeInCore = function (gradient) {
|
|
|
return (gradient * gradient * gradient * gradient * gradient);
|
|
@@ -34108,7 +34128,7 @@ var BABYLON;
|
|
|
var SineEase = (function (_super) {
|
|
|
__extends(SineEase, _super);
|
|
|
function SineEase() {
|
|
|
- return _super !== null && _super.apply(this, arguments) || this;
|
|
|
+ return _super.apply(this, arguments) || this;
|
|
|
}
|
|
|
SineEase.prototype.easeInCore = function (gradient) {
|
|
|
return (1.0 - Math.sin(1.5707963267948966 * (1.0 - gradient)));
|
|
@@ -50018,7 +50038,7 @@ var BABYLON;
|
|
|
var ShadowsOptimization = (function (_super) {
|
|
|
__extends(ShadowsOptimization, _super);
|
|
|
function ShadowsOptimization() {
|
|
|
- var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
|
+ var _this = _super.apply(this, arguments) || this;
|
|
|
_this.apply = function (scene) {
|
|
|
scene.shadowsEnabled = false;
|
|
|
return true;
|
|
@@ -50031,7 +50051,7 @@ var BABYLON;
|
|
|
var PostProcessesOptimization = (function (_super) {
|
|
|
__extends(PostProcessesOptimization, _super);
|
|
|
function PostProcessesOptimization() {
|
|
|
- var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
|
+ var _this = _super.apply(this, arguments) || this;
|
|
|
_this.apply = function (scene) {
|
|
|
scene.postProcessesEnabled = false;
|
|
|
return true;
|
|
@@ -50044,7 +50064,7 @@ var BABYLON;
|
|
|
var LensFlaresOptimization = (function (_super) {
|
|
|
__extends(LensFlaresOptimization, _super);
|
|
|
function LensFlaresOptimization() {
|
|
|
- var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
|
+ var _this = _super.apply(this, arguments) || this;
|
|
|
_this.apply = function (scene) {
|
|
|
scene.lensFlaresEnabled = false;
|
|
|
return true;
|
|
@@ -50057,7 +50077,7 @@ var BABYLON;
|
|
|
var ParticlesOptimization = (function (_super) {
|
|
|
__extends(ParticlesOptimization, _super);
|
|
|
function ParticlesOptimization() {
|
|
|
- var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
|
+ var _this = _super.apply(this, arguments) || this;
|
|
|
_this.apply = function (scene) {
|
|
|
scene.particlesEnabled = false;
|
|
|
return true;
|
|
@@ -50070,7 +50090,7 @@ var BABYLON;
|
|
|
var RenderTargetsOptimization = (function (_super) {
|
|
|
__extends(RenderTargetsOptimization, _super);
|
|
|
function RenderTargetsOptimization() {
|
|
|
- var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
|
+ var _this = _super.apply(this, arguments) || this;
|
|
|
_this.apply = function (scene) {
|
|
|
scene.renderTargetsEnabled = false;
|
|
|
return true;
|
|
@@ -50083,7 +50103,7 @@ var BABYLON;
|
|
|
var MergeMeshesOptimization = (function (_super) {
|
|
|
__extends(MergeMeshesOptimization, _super);
|
|
|
function MergeMeshesOptimization() {
|
|
|
- var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
|
+ var _this = _super.apply(this, arguments) || this;
|
|
|
_this._canBeMerged = function (abstractMesh) {
|
|
|
if (!(abstractMesh instanceof BABYLON.Mesh)) {
|
|
|
return false;
|
|
@@ -57187,7 +57207,7 @@ var BABYLON;
|
|
|
})(Internals = BABYLON.Internals || (BABYLON.Internals = {}));
|
|
|
})(BABYLON || (BABYLON = {}));
|
|
|
|
|
|
-//# sourceMappingURL=babylon.tools.pmremgenerator.js.map
|
|
|
+//# sourceMappingURL=babylon.tools.pmremGenerator.js.map
|
|
|
|
|
|
|
|
|
|
|
@@ -60459,12 +60479,6 @@ var BABYLON;
|
|
|
__decorate([
|
|
|
BABYLON.serialize()
|
|
|
], StandardRenderingPipeline.prototype, "depthOfFieldBlurWidth", void 0);
|
|
|
- __decorate([
|
|
|
- BABYLON.serialize()
|
|
|
- ], StandardRenderingPipeline.prototype, "DepthOfFieldEnabled", null);
|
|
|
- __decorate([
|
|
|
- BABYLON.serialize()
|
|
|
- ], StandardRenderingPipeline.prototype, "LensFlareEnabled", null);
|
|
|
BABYLON.StandardRenderingPipeline = StandardRenderingPipeline;
|
|
|
})(BABYLON || (BABYLON = {}));
|
|
|
|