|
@@ -27191,7 +27191,11 @@ var BABYLON;
|
|
|
texture = Texture.CreateFromBase64String(parsedTexture.base64String, parsedTexture.name, scene, !generateMipMaps);
|
|
|
}
|
|
|
else {
|
|
|
- texture = new Texture(rootUrl + parsedTexture.name, scene, !generateMipMaps);
|
|
|
+ var url = rootUrl + parsedTexture.name;
|
|
|
+ if (Texture.UseSerializedUrlIfAny && parsedTexture.url) {
|
|
|
+ url = parsedTexture.url;
|
|
|
+ }
|
|
|
+ texture = new Texture(url, scene, !generateMipMaps);
|
|
|
}
|
|
|
return texture;
|
|
|
}
|
|
@@ -27254,6 +27258,10 @@ var BABYLON;
|
|
|
Texture.CLAMP_ADDRESSMODE = 0;
|
|
|
Texture.WRAP_ADDRESSMODE = 1;
|
|
|
Texture.MIRROR_ADDRESSMODE = 2;
|
|
|
+ /**
|
|
|
+ * Gets or sets a boolean which defines if the texture url must be build from the serialized URL instead of just using the name and loading them side by side with the scene file
|
|
|
+ */
|
|
|
+ Texture.UseSerializedUrlIfAny = false;
|
|
|
__decorate([
|
|
|
BABYLON.serialize()
|
|
|
], Texture.prototype, "url", void 0);
|
|
@@ -51472,9 +51480,11 @@ var BABYLON;
|
|
|
return this._particles.length;
|
|
|
};
|
|
|
/**
|
|
|
- * Disposes the particle system and free the associated resources.
|
|
|
+ * Disposes the particle system and free the associated resources
|
|
|
+ * @param disposeTexture defines if the particule texture must be disposed as well (true by default)
|
|
|
*/
|
|
|
- ParticleSystem.prototype.dispose = function () {
|
|
|
+ ParticleSystem.prototype.dispose = function (disposeTexture) {
|
|
|
+ if (disposeTexture === void 0) { disposeTexture = true; }
|
|
|
if (this._vertexBuffer) {
|
|
|
this._vertexBuffer.dispose();
|
|
|
this._vertexBuffer = null;
|
|
@@ -51483,7 +51493,7 @@ var BABYLON;
|
|
|
this._scene.getEngine()._releaseBuffer(this._indexBuffer);
|
|
|
this._indexBuffer = null;
|
|
|
}
|
|
|
- if (this.particleTexture) {
|
|
|
+ if (disposeTexture && this.particleTexture) {
|
|
|
this.particleTexture.dispose();
|
|
|
this.particleTexture = null;
|
|
|
}
|
|
@@ -52756,9 +52766,11 @@ var BABYLON;
|
|
|
this._renderVAO = [];
|
|
|
};
|
|
|
/**
|
|
|
- * Disposes the particle system and free the associated resources.
|
|
|
+ * Disposes the particle system and free the associated resources
|
|
|
+ * @param disposeTexture defines if the particule texture must be disposed as well (true by default)
|
|
|
*/
|
|
|
- GPUParticleSystem.prototype.dispose = function () {
|
|
|
+ GPUParticleSystem.prototype.dispose = function (disposeTexture) {
|
|
|
+ if (disposeTexture === void 0) { disposeTexture = true; }
|
|
|
var index = this._scene.particleSystems.indexOf(this);
|
|
|
if (index > -1) {
|
|
|
this._scene.particleSystems.splice(index, 1);
|
|
@@ -52769,6 +52781,10 @@ var BABYLON;
|
|
|
this._randomTexture.dispose();
|
|
|
this._randomTexture = null;
|
|
|
}
|
|
|
+ if (disposeTexture && this.particleTexture) {
|
|
|
+ this.particleTexture.dispose();
|
|
|
+ this.particleTexture = null;
|
|
|
+ }
|
|
|
// Callback
|
|
|
this.onDisposeObservable.notifyObservers(this);
|
|
|
this.onDisposeObservable.clear();
|
|
@@ -90976,15 +90992,13 @@ BABYLON.Effect.IncludesShadersStore={"depthPrePass":"#ifdef DEPTHPREPASS\ngl_Fra
|
|
|
|
|
|
(function universalModuleDefinition(root, factory) {
|
|
|
var f = factory();
|
|
|
- if (root && root["BABYLON"]) {
|
|
|
- return;
|
|
|
- }
|
|
|
+
|
|
|
var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : this);
|
|
|
globalObject["BABYLON"] = f;
|
|
|
if(true)
|
|
|
module.exports = f;
|
|
|
else if(typeof define === 'function' && define.amd)
|
|
|
- define(["BABYLON"], factory);
|
|
|
+ define("BABYLON", factory);
|
|
|
else if(typeof exports === 'object')
|
|
|
exports["BABYLON"] = f;
|
|
|
else {
|
|
@@ -111139,16 +111153,14 @@ var BABYLON;
|
|
|
|
|
|
(function universalModuleDefinition(root, factory) {
|
|
|
var f = factory();
|
|
|
- if (root && root["BABYLON"]) {
|
|
|
- return;
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
if(true)
|
|
|
module.exports = f;
|
|
|
else if(typeof define === 'function' && define.amd)
|
|
|
- define(["BJSLoaders"], factory);
|
|
|
+ define("babylonjs-loaders", ["BABYLON"], factory);
|
|
|
else if(typeof exports === 'object')
|
|
|
- exports["BJSLoaders"] = f;
|
|
|
+ exports["babylonjs-loaders"] = f;
|
|
|
else {
|
|
|
root["BABYLON"] = f;
|
|
|
}
|
|
@@ -111400,20 +111412,18 @@ exports.InitTags = InitTags;
|
|
|
|
|
|
(function universalModuleDefinition(root, factory) {
|
|
|
var f = factory();
|
|
|
- if (root && root["BabylonViewer"]) {
|
|
|
- return;
|
|
|
- }
|
|
|
+
|
|
|
var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : this);
|
|
|
-globalObject["BabylonViewer"] = f;
|
|
|
+globalObject["undefined"] = f;
|
|
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
|
module.exports = f;
|
|
|
else if(typeof define === 'function' && define.amd)
|
|
|
- define(["BabylonViewer"], factory);
|
|
|
+ define("babylonjs-viewer", factory);
|
|
|
else if(typeof exports === 'object')
|
|
|
- exports["BabylonViewer"] = f;
|
|
|
+ exports["babylonjs-viewer"] = f;
|
|
|
else {
|
|
|
- root["BabylonViewer"] = f;
|
|
|
+ root["undefined"] = f;
|
|
|
}
|
|
|
})(this, function() {
|
|
|
- return BabylonViewer;
|
|
|
+ return undefined;
|
|
|
});
|