David Catuhe 7 年 前
コミット
96c01d8bdc

ファイルの差分が大きいため隠しています
+ 11587 - 11580
Playground/babylon.d.txt


ファイルの差分が大きいため隠しています
+ 12033 - 12026
dist/preview release/babylon.d.ts


ファイルの差分が大きいため隠しています
+ 15 - 15
dist/preview release/babylon.js


+ 26 - 5
dist/preview release/babylon.max.js

@@ -25378,6 +25378,7 @@ var BABYLON;
                 this._engine = engine;
             }
             this._updatable = updatable;
+            this._instanced = instanced;
             this._data = data;
             this._strideSize = stride;
             if (!postponeInternalCreation) {
@@ -25395,7 +25396,7 @@ var BABYLON;
          */
         Buffer.prototype.createVertexBuffer = function (kind, offset, size, stride, instanced) {
             // a lot of these parameters are ignored as they are overriden by the buffer
-            return new BABYLON.VertexBuffer(this._engine, this, kind, this._updatable, true, stride ? stride : this._strideSize, instanced, offset, size);
+            return new BABYLON.VertexBuffer(this._engine, this, kind, this._updatable, true, stride ? stride : this._strideSize, instanced === undefined ? this._instanced : instanced, offset, size);
         };
         // Properties
         Buffer.prototype.isUpdatable = function () {
@@ -68394,21 +68395,41 @@ var BABYLON;
             _this.color = color;
             _this.depth = depth;
             _this.colorLevel = colorLevel;
+            _this._ownRefractionTexture = true;
             _this.onActivateObservable.add(function (cam) {
-                _this._refRexture = _this._refRexture || new BABYLON.Texture(refractionTextureUrl, cam.getScene());
+                _this._refTexture = _this._refTexture || new BABYLON.Texture(refractionTextureUrl, cam.getScene());
             });
             _this.onApplyObservable.add(function (effect) {
                 effect.setColor3("baseColor", _this.color);
                 effect.setFloat("depth", _this.depth);
                 effect.setFloat("colorLevel", _this.colorLevel);
-                effect.setTexture("refractionSampler", _this._refRexture);
+                effect.setTexture("refractionSampler", _this._refTexture);
             });
             return _this;
         }
+        Object.defineProperty(RefractionPostProcess.prototype, "refractionTexture", {
+            /**
+             * Gets or sets the refraction texture
+             * Please note that you are responsible for disposing the texture if you set it manually
+             */
+            get: function () {
+                return this._refTexture;
+            },
+            set: function (value) {
+                if (this._refTexture && this._ownRefractionTexture) {
+                    this._refTexture.dispose();
+                }
+                this._refTexture = value;
+                this._ownRefractionTexture = false;
+            },
+            enumerable: true,
+            configurable: true
+        });
         // Methods
         RefractionPostProcess.prototype.dispose = function (camera) {
-            if (this._refRexture) {
-                this._refRexture.dispose();
+            if (this._refTexture && this._ownRefractionTexture) {
+                this._refTexture.dispose();
+                this._refTexture = null;
             }
             _super.prototype.dispose.call(this, camera);
         };

ファイルの差分が大きいため隠しています
+ 15 - 15
dist/preview release/babylon.worker.js


ファイルの差分が大きいため隠しています
+ 16372 - 16365
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


ファイルの差分が大きいため隠しています
+ 15 - 15
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 26 - 5
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -25378,6 +25378,7 @@ var BABYLON;
                 this._engine = engine;
             }
             this._updatable = updatable;
+            this._instanced = instanced;
             this._data = data;
             this._strideSize = stride;
             if (!postponeInternalCreation) {
@@ -25395,7 +25396,7 @@ var BABYLON;
          */
         Buffer.prototype.createVertexBuffer = function (kind, offset, size, stride, instanced) {
             // a lot of these parameters are ignored as they are overriden by the buffer
-            return new BABYLON.VertexBuffer(this._engine, this, kind, this._updatable, true, stride ? stride : this._strideSize, instanced, offset, size);
+            return new BABYLON.VertexBuffer(this._engine, this, kind, this._updatable, true, stride ? stride : this._strideSize, instanced === undefined ? this._instanced : instanced, offset, size);
         };
         // Properties
         Buffer.prototype.isUpdatable = function () {
@@ -68020,21 +68021,41 @@ var BABYLON;
             _this.color = color;
             _this.depth = depth;
             _this.colorLevel = colorLevel;
+            _this._ownRefractionTexture = true;
             _this.onActivateObservable.add(function (cam) {
-                _this._refRexture = _this._refRexture || new BABYLON.Texture(refractionTextureUrl, cam.getScene());
+                _this._refTexture = _this._refTexture || new BABYLON.Texture(refractionTextureUrl, cam.getScene());
             });
             _this.onApplyObservable.add(function (effect) {
                 effect.setColor3("baseColor", _this.color);
                 effect.setFloat("depth", _this.depth);
                 effect.setFloat("colorLevel", _this.colorLevel);
-                effect.setTexture("refractionSampler", _this._refRexture);
+                effect.setTexture("refractionSampler", _this._refTexture);
             });
             return _this;
         }
+        Object.defineProperty(RefractionPostProcess.prototype, "refractionTexture", {
+            /**
+             * Gets or sets the refraction texture
+             * Please note that you are responsible for disposing the texture if you set it manually
+             */
+            get: function () {
+                return this._refTexture;
+            },
+            set: function (value) {
+                if (this._refTexture && this._ownRefractionTexture) {
+                    this._refTexture.dispose();
+                }
+                this._refTexture = value;
+                this._ownRefractionTexture = false;
+            },
+            enumerable: true,
+            configurable: true
+        });
         // Methods
         RefractionPostProcess.prototype.dispose = function (camera) {
-            if (this._refRexture) {
-                this._refRexture.dispose();
+            if (this._refTexture && this._ownRefractionTexture) {
+                this._refTexture.dispose();
+                this._refTexture = null;
             }
             _super.prototype.dispose.call(this, camera);
         };

+ 26 - 5
dist/preview release/customConfigurations/minimalGLTFViewer/es6.js

@@ -25364,6 +25364,7 @@ var BABYLON;
                 this._engine = engine;
             }
             this._updatable = updatable;
+            this._instanced = instanced;
             this._data = data;
             this._strideSize = stride;
             if (!postponeInternalCreation) {
@@ -25381,7 +25382,7 @@ var BABYLON;
          */
         Buffer.prototype.createVertexBuffer = function (kind, offset, size, stride, instanced) {
             // a lot of these parameters are ignored as they are overriden by the buffer
-            return new BABYLON.VertexBuffer(this._engine, this, kind, this._updatable, true, stride ? stride : this._strideSize, instanced, offset, size);
+            return new BABYLON.VertexBuffer(this._engine, this, kind, this._updatable, true, stride ? stride : this._strideSize, instanced === undefined ? this._instanced : instanced, offset, size);
         };
         // Properties
         Buffer.prototype.isUpdatable = function () {
@@ -68006,21 +68007,41 @@ var BABYLON;
             _this.color = color;
             _this.depth = depth;
             _this.colorLevel = colorLevel;
+            _this._ownRefractionTexture = true;
             _this.onActivateObservable.add(function (cam) {
-                _this._refRexture = _this._refRexture || new BABYLON.Texture(refractionTextureUrl, cam.getScene());
+                _this._refTexture = _this._refTexture || new BABYLON.Texture(refractionTextureUrl, cam.getScene());
             });
             _this.onApplyObservable.add(function (effect) {
                 effect.setColor3("baseColor", _this.color);
                 effect.setFloat("depth", _this.depth);
                 effect.setFloat("colorLevel", _this.colorLevel);
-                effect.setTexture("refractionSampler", _this._refRexture);
+                effect.setTexture("refractionSampler", _this._refTexture);
             });
             return _this;
         }
+        Object.defineProperty(RefractionPostProcess.prototype, "refractionTexture", {
+            /**
+             * Gets or sets the refraction texture
+             * Please note that you are responsible for disposing the texture if you set it manually
+             */
+            get: function () {
+                return this._refTexture;
+            },
+            set: function (value) {
+                if (this._refTexture && this._ownRefractionTexture) {
+                    this._refTexture.dispose();
+                }
+                this._refTexture = value;
+                this._ownRefractionTexture = false;
+            },
+            enumerable: true,
+            configurable: true
+        });
         // Methods
         RefractionPostProcess.prototype.dispose = function (camera) {
-            if (this._refRexture) {
-                this._refRexture.dispose();
+            if (this._refTexture && this._ownRefractionTexture) {
+                this._refTexture.dispose();
+                this._refTexture = null;
             }
             _super.prototype.dispose.call(this, camera);
         };

+ 26 - 5
dist/preview release/es6.js

@@ -25364,6 +25364,7 @@ var BABYLON;
                 this._engine = engine;
             }
             this._updatable = updatable;
+            this._instanced = instanced;
             this._data = data;
             this._strideSize = stride;
             if (!postponeInternalCreation) {
@@ -25381,7 +25382,7 @@ var BABYLON;
          */
         Buffer.prototype.createVertexBuffer = function (kind, offset, size, stride, instanced) {
             // a lot of these parameters are ignored as they are overriden by the buffer
-            return new BABYLON.VertexBuffer(this._engine, this, kind, this._updatable, true, stride ? stride : this._strideSize, instanced, offset, size);
+            return new BABYLON.VertexBuffer(this._engine, this, kind, this._updatable, true, stride ? stride : this._strideSize, instanced === undefined ? this._instanced : instanced, offset, size);
         };
         // Properties
         Buffer.prototype.isUpdatable = function () {
@@ -68380,21 +68381,41 @@ var BABYLON;
             _this.color = color;
             _this.depth = depth;
             _this.colorLevel = colorLevel;
+            _this._ownRefractionTexture = true;
             _this.onActivateObservable.add(function (cam) {
-                _this._refRexture = _this._refRexture || new BABYLON.Texture(refractionTextureUrl, cam.getScene());
+                _this._refTexture = _this._refTexture || new BABYLON.Texture(refractionTextureUrl, cam.getScene());
             });
             _this.onApplyObservable.add(function (effect) {
                 effect.setColor3("baseColor", _this.color);
                 effect.setFloat("depth", _this.depth);
                 effect.setFloat("colorLevel", _this.colorLevel);
-                effect.setTexture("refractionSampler", _this._refRexture);
+                effect.setTexture("refractionSampler", _this._refTexture);
             });
             return _this;
         }
+        Object.defineProperty(RefractionPostProcess.prototype, "refractionTexture", {
+            /**
+             * Gets or sets the refraction texture
+             * Please note that you are responsible for disposing the texture if you set it manually
+             */
+            get: function () {
+                return this._refTexture;
+            },
+            set: function (value) {
+                if (this._refTexture && this._ownRefractionTexture) {
+                    this._refTexture.dispose();
+                }
+                this._refTexture = value;
+                this._ownRefractionTexture = false;
+            },
+            enumerable: true,
+            configurable: true
+        });
         // Methods
         RefractionPostProcess.prototype.dispose = function (camera) {
-            if (this._refRexture) {
-                this._refRexture.dispose();
+            if (this._refTexture && this._ownRefractionTexture) {
+                this._refTexture.dispose();
+                this._refTexture = null;
             }
             _super.prototype.dispose.call(this, camera);
         };

ファイルの差分が大きいため隠しています
+ 14 - 14
dist/preview release/viewer/babylon.viewer.js


+ 8 - 0
src/PostProcess/babylon.refractionPostProcess.ts

@@ -3,6 +3,14 @@
         private _refTexture: Texture;
         private _ownRefractionTexture = true;
 
+        /**
+         * Gets or sets the refraction texture
+         * Please note that you are responsible for disposing the texture if you set it manually
+         */
+        public get refractionTexture(): Texture {
+            return this._refTexture;
+        }
+
         public set refractionTexture(value: Texture) {
             if (this._refTexture && this._ownRefractionTexture) {
                 this._refTexture.dispose();