瀏覽代碼

Renaming shared functions

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

文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/babylon.core.js


文件差異過大導致無法顯示
+ 488 - 488
dist/preview release/babylon.d.ts


文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/babylon.js


+ 4 - 4
dist/preview release/babylon.max.js

@@ -20309,7 +20309,7 @@ var BABYLON;
             // Matrices        
             this.bindOnlyWorldMatrix(world);
             // Bones
-            StandardMaterial.ApplyBonesParameters(mesh, this._effect);
+            StandardMaterial.BindBonesParameters(mesh, this._effect);
             if (scene.getCachedMaterial() !== this) {
                 this._effect.setMatrix("viewProjection", scene.getTransformMatrix());
                 if (StandardMaterial.FresnelEnabled) {
@@ -20426,7 +20426,7 @@ var BABYLON;
                     this._effect.setMatrix("view", scene.getViewMatrix());
                 }
                 // Fog
-                StandardMaterial.ApplyFogParameters(scene, mesh, this._effect);
+                StandardMaterial.BindFogParameters(scene, mesh, this._effect);
                 // Log. depth
                 if (this._defines.LOGARITHMICDEPTH) {
                     this._effect.setFloat("logarithmicDepthConstant", 2.0 / (Math.log(scene.activeCamera.maxZ + 1.0) / Math.LN2));
@@ -20434,13 +20434,13 @@ var BABYLON;
             }
             _super.prototype.bind.call(this, world, mesh);
         };
-        StandardMaterial.ApplyFogParameters = function (scene, mesh, effect) {
+        StandardMaterial.BindFogParameters = function (scene, mesh, effect) {
             if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== BABYLON.Scene.FOGMODE_NONE) {
                 effect.setFloat4("vFogInfos", scene.fogMode, scene.fogStart, scene.fogEnd, scene.fogDensity);
                 effect.setColor3("vFogColor", scene.fogColor);
             }
         };
-        StandardMaterial.ApplyBonesParameters = function (mesh, effect) {
+        StandardMaterial.BindBonesParameters = function (mesh, effect) {
             if (mesh && mesh.useBones && mesh.computeBonesUsingShaders) {
                 effect.setMatrices("mBones", mesh.skeleton.getTransformMatrices(mesh));
             }

文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/babylon.noworker.js


文件差異過大導致無法顯示
+ 4 - 7
materialsLibrary/dist/babylon.pbrMaterial.js


文件差異過大導致無法顯示
+ 3 - 3
materialsLibrary/dist/babylon.pbrMaterial.min.js


+ 2 - 2
materialsLibrary/dist/babylon.simpleMaterial.js

@@ -236,7 +236,7 @@ var BABYLON;
             this.bindOnlyWorldMatrix(world);
             this._effect.setMatrix("viewProjection", scene.getTransformMatrix());
             // Bones
-            BABYLON.StandardMaterial.ApplyBonesParameters(mesh, this._effect);
+            BABYLON.StandardMaterial.BindBonesParameters(mesh, this._effect);
             if (scene.getCachedMaterial() !== this) {
                 // Textures        
                 if (this.diffuseTexture && BABYLON.StandardMaterial.DiffuseTextureEnabled) {
@@ -265,7 +265,7 @@ var BABYLON;
                 this._effect.setMatrix("view", scene.getViewMatrix());
             }
             // Fog
-            BABYLON.StandardMaterial.ApplyFogParameters(scene, mesh, this._effect);
+            BABYLON.StandardMaterial.BindFogParameters(scene, mesh, this._effect);
             _super.prototype.bind.call(this, world, mesh);
         };
         SimpleMaterial.prototype.getAnimatables = function () {

文件差異過大導致無法顯示
+ 1 - 1
materialsLibrary/dist/babylon.simpleMaterial.min.js


+ 2 - 5
materialsLibrary/materials/pbr/babylon.pbrMaterial.ts

@@ -743,7 +743,7 @@ module BABYLON {
             this.bindOnlyWorldMatrix(world);
 
             // Bones
-            StandardMaterial.ApplyBonesParameters(mesh, this._effect);
+            StandardMaterial.BindBonesParameters(mesh, this._effect);
 
             if (this._myScene.getCachedMaterial() !== (<BABYLON.Material>this)) {
                 this._effect.setMatrix("viewProjection", this._myScene.getTransformMatrix());
@@ -923,10 +923,7 @@ module BABYLON {
                 }
 
                 // Fog
-                if (this._myScene.fogEnabled && mesh.applyFog && this._myScene.fogMode !== Scene.FOGMODE_NONE) {
-                    this._effect.setFloat4("vFogInfos", this._myScene.fogMode, this._myScene.fogStart, this._myScene.fogEnd, this._myScene.fogDensity);
-                    this._effect.setColor3("vFogColor", this._myScene.fogColor);
-                }
+                StandardMaterial.BindFogParameters(this._myScene, mesh, this._effect);
 
                 this._lightingInfos.x = this.directIntensity;
                 this._lightingInfos.y = this.emissiveIntensity;

+ 2 - 2
materialsLibrary/materials/simple/babylon.simpleMaterial.ts

@@ -286,7 +286,7 @@ module BABYLON {
             this._effect.setMatrix("viewProjection", scene.getTransformMatrix());
 
             // Bones
-            StandardMaterial.ApplyBonesParameters(mesh, this._effect);
+            StandardMaterial.BindBonesParameters(mesh, this._effect);
 
             if (scene.getCachedMaterial() !== this) {
                 // Textures        
@@ -323,7 +323,7 @@ module BABYLON {
             }
 
             // Fog
-            StandardMaterial.ApplyFogParameters(scene, mesh, this._effect);
+            StandardMaterial.BindFogParameters(scene, mesh, this._effect);
 
             super.bind(world, mesh);
         }

+ 4 - 4
materialsLibrary/test/refs/babylon.max.js

@@ -20309,7 +20309,7 @@ var BABYLON;
             // Matrices        
             this.bindOnlyWorldMatrix(world);
             // Bones
-            StandardMaterial.ApplyBonesParameters(mesh, this._effect);
+            StandardMaterial.BindBonesParameters(mesh, this._effect);
             if (scene.getCachedMaterial() !== this) {
                 this._effect.setMatrix("viewProjection", scene.getTransformMatrix());
                 if (StandardMaterial.FresnelEnabled) {
@@ -20426,7 +20426,7 @@ var BABYLON;
                     this._effect.setMatrix("view", scene.getViewMatrix());
                 }
                 // Fog
-                StandardMaterial.ApplyFogParameters(scene, mesh, this._effect);
+                StandardMaterial.BindFogParameters(scene, mesh, this._effect);
                 // Log. depth
                 if (this._defines.LOGARITHMICDEPTH) {
                     this._effect.setFloat("logarithmicDepthConstant", 2.0 / (Math.log(scene.activeCamera.maxZ + 1.0) / Math.LN2));
@@ -20434,13 +20434,13 @@ var BABYLON;
             }
             _super.prototype.bind.call(this, world, mesh);
         };
-        StandardMaterial.ApplyFogParameters = function (scene, mesh, effect) {
+        StandardMaterial.BindFogParameters = function (scene, mesh, effect) {
             if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== BABYLON.Scene.FOGMODE_NONE) {
                 effect.setFloat4("vFogInfos", scene.fogMode, scene.fogStart, scene.fogEnd, scene.fogDensity);
                 effect.setColor3("vFogColor", scene.fogColor);
             }
         };
-        StandardMaterial.ApplyBonesParameters = function (mesh, effect) {
+        StandardMaterial.BindBonesParameters = function (mesh, effect) {
             if (mesh && mesh.useBones && mesh.computeBonesUsingShaders) {
                 effect.setMatrices("mBones", mesh.skeleton.getTransformMatrices(mesh));
             }

+ 4 - 4
src/Materials/babylon.standardMaterial.js

@@ -717,7 +717,7 @@ var BABYLON;
             // Matrices        
             this.bindOnlyWorldMatrix(world);
             // Bones
-            StandardMaterial.ApplyBonesParameters(mesh, this._effect);
+            StandardMaterial.BindBonesParameters(mesh, this._effect);
             if (scene.getCachedMaterial() !== this) {
                 this._effect.setMatrix("viewProjection", scene.getTransformMatrix());
                 if (StandardMaterial.FresnelEnabled) {
@@ -834,7 +834,7 @@ var BABYLON;
                     this._effect.setMatrix("view", scene.getViewMatrix());
                 }
                 // Fog
-                StandardMaterial.ApplyFogParameters(scene, mesh, this._effect);
+                StandardMaterial.BindFogParameters(scene, mesh, this._effect);
                 // Log. depth
                 if (this._defines.LOGARITHMICDEPTH) {
                     this._effect.setFloat("logarithmicDepthConstant", 2.0 / (Math.log(scene.activeCamera.maxZ + 1.0) / Math.LN2));
@@ -842,13 +842,13 @@ var BABYLON;
             }
             _super.prototype.bind.call(this, world, mesh);
         };
-        StandardMaterial.ApplyFogParameters = function (scene, mesh, effect) {
+        StandardMaterial.BindFogParameters = function (scene, mesh, effect) {
             if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== BABYLON.Scene.FOGMODE_NONE) {
                 effect.setFloat4("vFogInfos", scene.fogMode, scene.fogStart, scene.fogEnd, scene.fogDensity);
                 effect.setColor3("vFogColor", scene.fogColor);
             }
         };
-        StandardMaterial.ApplyBonesParameters = function (mesh, effect) {
+        StandardMaterial.BindBonesParameters = function (mesh, effect) {
             if (mesh && mesh.useBones && mesh.computeBonesUsingShaders) {
                 effect.setMatrices("mBones", mesh.skeleton.getTransformMatrices(mesh));
             }

+ 4 - 4
src/Materials/babylon.standardMaterial.ts

@@ -856,7 +856,7 @@
             this.bindOnlyWorldMatrix(world);
 
             // Bones
-            StandardMaterial.ApplyBonesParameters(mesh, this._effect);
+            StandardMaterial.BindBonesParameters(mesh, this._effect);
 
             if (scene.getCachedMaterial() !== this) {
                 this._effect.setMatrix("viewProjection", scene.getTransformMatrix());
@@ -1004,7 +1004,7 @@
                 }
 
                 // Fog
-                StandardMaterial.ApplyFogParameters(scene, mesh, this._effect);
+                StandardMaterial.BindFogParameters(scene, mesh, this._effect);
 
                 // Log. depth
                 if (this._defines.LOGARITHMICDEPTH) {
@@ -1015,13 +1015,13 @@
             super.bind(world, mesh);
         }
 
-        public static ApplyFogParameters(scene: Scene, mesh: AbstractMesh, effect: Effect): void {
+        public static BindFogParameters(scene: Scene, mesh: AbstractMesh, effect: Effect): void {
             if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) {
                 effect.setFloat4("vFogInfos", scene.fogMode, scene.fogStart, scene.fogEnd, scene.fogDensity);
                 effect.setColor3("vFogColor", scene.fogColor);
             }
         }
-        public static ApplyBonesParameters(mesh: AbstractMesh, effect: Effect): void {
+        public static BindBonesParameters(mesh: AbstractMesh, effect: Effect): void {
             if (mesh && mesh.useBones && mesh.computeBonesUsingShaders) {
                 effect.setMatrices("mBones", mesh.skeleton.getTransformMatrices(mesh));
             }