瀏覽代碼

refractionTExture is a separate file

David Catuhe 9 年之前
父節點
當前提交
cc02f19223

+ 1 - 0
Tools/Gulp/config.json

@@ -57,6 +57,7 @@
       "../../src/Materials/Textures/babylon.renderTargetTexture.js",
       "../../src/Materials/Textures/Procedurals/babylon.proceduralTexture.js",
       "../../src/Materials/Textures/babylon.mirrorTexture.js",
+      "../../src/Materials/Textures/babylon.refractionTexture.js",
       "../../src/Materials/Textures/babylon.dynamicTexture.js",
       "../../src/Materials/Textures/babylon.videoTexture.js",
       "../../src/Materials/Textures/Procedurals/babylon.customProceduralTexture.js",

File diff suppressed because it is too large
+ 8 - 8
dist/preview release/babylon.core.js


File diff suppressed because it is too large
+ 1175 - 1172
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 14 - 14
dist/preview release/babylon.js


+ 11 - 0
dist/preview release/babylon.max.js

@@ -18355,6 +18355,16 @@ var BABYLON;
         return MirrorTexture;
     })(BABYLON.RenderTargetTexture);
     BABYLON.MirrorTexture = MirrorTexture;
+})(BABYLON || (BABYLON = {}));
+
+
+
+
+
+
+
+var BABYLON;
+(function (BABYLON) {
     /**
     * Creates a refraction texture used by refraction channel of the standard material.
     * @param name the texture name
@@ -22937,6 +22947,7 @@ var BABYLON;
         // Methods
         Bone.prototype.updateMatrix = function (matrix) {
             this._baseMatrix = matrix.clone();
+            this._matrix = matrix.clone();
             this._skeleton._markAsDirty();
             this._updateDifferenceMatrix();
         };

File diff suppressed because it is too large
+ 15 - 15
dist/preview release/babylon.noworker.js


+ 1 - 0
src/Bones/babylon.bone.js

@@ -57,6 +57,7 @@ var BABYLON;
         // Methods
         Bone.prototype.updateMatrix = function (matrix) {
             this._baseMatrix = matrix.clone();
+            this._matrix = matrix.clone();
             this._skeleton._markAsDirty();
             this._updateDifferenceMatrix();
         };

+ 1 - 0
src/Bones/babylon.bone.ts

@@ -68,6 +68,7 @@
         // Methods
         public updateMatrix(matrix: Matrix): void {
             this._baseMatrix = matrix.clone();
+            this._matrix = matrix.clone();
 
             this._skeleton._markAsDirty();
 

+ 0 - 44
src/Materials/Textures/babylon.mirrorTexture.js

@@ -51,48 +51,4 @@ var BABYLON;
         return MirrorTexture;
     })(BABYLON.RenderTargetTexture);
     BABYLON.MirrorTexture = MirrorTexture;
-    /**
-    * Creates a refraction texture used by refraction channel of the standard material.
-    * @param name the texture name
-    * @param size size of the underlying texture
-    * @param scene root scene
-    */
-    var RefractionTexture = (function (_super) {
-        __extends(RefractionTexture, _super);
-        function RefractionTexture(name, size, scene, generateMipMaps) {
-            var _this = this;
-            _super.call(this, name, size, scene, generateMipMaps, true);
-            this.refractionPlane = new BABYLON.Plane(0, 1, 0, 1);
-            this.depth = 2.0;
-            this.onBeforeRender = function () {
-                scene.clipPlane = _this.refractionPlane;
-            };
-            this.onAfterRender = function () {
-                delete scene.clipPlane;
-            };
-        }
-        RefractionTexture.prototype.clone = function () {
-            var textureSize = this.getSize();
-            var newTexture = new RefractionTexture(this.name, textureSize.width, this.getScene(), this._generateMipMaps);
-            // Base texture
-            newTexture.hasAlpha = this.hasAlpha;
-            newTexture.level = this.level;
-            // Refraction Texture
-            newTexture.refractionPlane = this.refractionPlane.clone();
-            newTexture.renderList = this.renderList.slice(0);
-            newTexture.depth = this.depth;
-            return newTexture;
-        };
-        RefractionTexture.prototype.serialize = function () {
-            if (!this.name) {
-                return null;
-            }
-            var serializationObject = _super.prototype.serialize.call(this);
-            serializationObject.mirrorPlane = this.refractionPlane.asArray();
-            serializationObject.depth = this.depth;
-            return serializationObject;
-        };
-        return RefractionTexture;
-    })(BABYLON.RenderTargetTexture);
-    BABYLON.RefractionTexture = RefractionTexture;
 })(BABYLON || (BABYLON = {}));

+ 0 - 52
src/Materials/Textures/babylon.mirrorTexture.ts

@@ -60,56 +60,4 @@
             return serializationObject;
         }
     }
-
-    /**
-    * Creates a refraction texture used by refraction channel of the standard material.
-    * @param name the texture name
-    * @param size size of the underlying texture
-    * @param scene root scene
-    */
-    export class RefractionTexture extends RenderTargetTexture {
-        public refractionPlane = new Plane(0, 1, 0, 1);
-        public depth = 2.0;
-
-        constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean) {
-            super(name, size, scene, generateMipMaps, true);
-
-            this.onBeforeRender = () => {
-                scene.clipPlane = this.refractionPlane;
-            }
-
-            this.onAfterRender = () => {
-                delete scene.clipPlane;
-            }
-        }
-
-        public clone(): RefractionTexture {
-            var textureSize = this.getSize();
-            var newTexture = new RefractionTexture(this.name, textureSize.width, this.getScene(), this._generateMipMaps);
-
-            // Base texture
-            newTexture.hasAlpha = this.hasAlpha;
-            newTexture.level = this.level;
-
-            // Refraction Texture
-            newTexture.refractionPlane = this.refractionPlane.clone();
-            newTexture.renderList = this.renderList.slice(0);
-            newTexture.depth = this.depth;
-
-            return newTexture;
-        }
-
-        public serialize(): any {
-            if (!this.name) {
-                return null;
-            }
-
-            var serializationObject = super.serialize();
-
-            serializationObject.mirrorPlane = this.refractionPlane.asArray();
-            serializationObject.depth = this.depth;
-
-            return serializationObject;
-        }
-    }
 } 

+ 52 - 0
src/Materials/Textures/babylon.refractionTexture.js

@@ -0,0 +1,52 @@
+var __extends = (this && this.__extends) || function (d, b) {
+    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+    function __() { this.constructor = d; }
+    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+};
+var BABYLON;
+(function (BABYLON) {
+    /**
+    * Creates a refraction texture used by refraction channel of the standard material.
+    * @param name the texture name
+    * @param size size of the underlying texture
+    * @param scene root scene
+    */
+    var RefractionTexture = (function (_super) {
+        __extends(RefractionTexture, _super);
+        function RefractionTexture(name, size, scene, generateMipMaps) {
+            var _this = this;
+            _super.call(this, name, size, scene, generateMipMaps, true);
+            this.refractionPlane = new BABYLON.Plane(0, 1, 0, 1);
+            this.depth = 2.0;
+            this.onBeforeRender = function () {
+                scene.clipPlane = _this.refractionPlane;
+            };
+            this.onAfterRender = function () {
+                delete scene.clipPlane;
+            };
+        }
+        RefractionTexture.prototype.clone = function () {
+            var textureSize = this.getSize();
+            var newTexture = new RefractionTexture(this.name, textureSize.width, this.getScene(), this._generateMipMaps);
+            // Base texture
+            newTexture.hasAlpha = this.hasAlpha;
+            newTexture.level = this.level;
+            // Refraction Texture
+            newTexture.refractionPlane = this.refractionPlane.clone();
+            newTexture.renderList = this.renderList.slice(0);
+            newTexture.depth = this.depth;
+            return newTexture;
+        };
+        RefractionTexture.prototype.serialize = function () {
+            if (!this.name) {
+                return null;
+            }
+            var serializationObject = _super.prototype.serialize.call(this);
+            serializationObject.mirrorPlane = this.refractionPlane.asArray();
+            serializationObject.depth = this.depth;
+            return serializationObject;
+        };
+        return RefractionTexture;
+    })(BABYLON.RenderTargetTexture);
+    BABYLON.RefractionTexture = RefractionTexture;
+})(BABYLON || (BABYLON = {}));

+ 53 - 0
src/Materials/Textures/babylon.refractionTexture.ts

@@ -0,0 +1,53 @@
+module BABYLON {
+    /**
+    * Creates a refraction texture used by refraction channel of the standard material.
+    * @param name the texture name
+    * @param size size of the underlying texture
+    * @param scene root scene
+    */
+    export class RefractionTexture extends RenderTargetTexture {
+        public refractionPlane = new Plane(0, 1, 0, 1);
+        public depth = 2.0;
+
+        constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean) {
+            super(name, size, scene, generateMipMaps, true);
+
+            this.onBeforeRender = () => {
+                scene.clipPlane = this.refractionPlane;
+            }
+
+            this.onAfterRender = () => {
+                delete scene.clipPlane;
+            }
+        }
+
+        public clone(): RefractionTexture {
+            var textureSize = this.getSize();
+            var newTexture = new RefractionTexture(this.name, textureSize.width, this.getScene(), this._generateMipMaps);
+
+            // Base texture
+            newTexture.hasAlpha = this.hasAlpha;
+            newTexture.level = this.level;
+
+            // Refraction Texture
+            newTexture.refractionPlane = this.refractionPlane.clone();
+            newTexture.renderList = this.renderList.slice(0);
+            newTexture.depth = this.depth;
+
+            return newTexture;
+        }
+
+        public serialize(): any {
+            if (!this.name) {
+                return null;
+            }
+
+            var serializationObject = super.serialize();
+
+            serializationObject.mirrorPlane = this.refractionPlane.asArray();
+            serializationObject.depth = this.depth;
+
+            return serializationObject;
+        }
+    }
+}