Browse Source

Fix PR Comments

sevan 8 years ago
parent
commit
5d5be7c42d

+ 7 - 6
src/Lights/Shadows/babylon.shadowGenerator.ts

@@ -205,7 +205,7 @@
             }
         }
         
-        private _initializeGenerator(boxBlurOffset: number) {
+        private _initializeGenerator(boxBlurOffset: number): void {
             var light = this._light;
             var scene = this._scene;
             var textureType = this._textureType;
@@ -334,7 +334,7 @@
             });
         }
 
-        private _applyFilterValues() {
+        private _applyFilterValues(): void {
             if (this.usePoissonSampling || this.useExponentialShadowMap || this.useBlurExponentialShadowMap) {
                 this._shadowMap.anisotropicFilteringLevel = 16;
                 this._shadowMap.updateSamplingMode(Texture.BILINEAR_SAMPLINGMODE);
@@ -344,7 +344,7 @@
             }
         }
 
-        public recreateShadowMap() {
+        public recreateShadowMap(): void {
             // Clean up existing data.
             this._disposeRTTandPostProcesses();
 
@@ -529,7 +529,7 @@
             return new Vector2(depth - fract / 255.0, fract);
         }
 
-        private _disposeRTTandPostProcesses() {
+        private _disposeRTTandPostProcesses(): void {
             if (this._shadowMap) {
                 this._shadowMap.dispose();
             }
@@ -641,7 +641,7 @@
         }
 
         /**
-         * This works according to the standard show defined and supported by the BJS materials.
+         * This creates the defines related to the standard BJS materials.
          */
         public prepareDefines(defines: MaterialDefines, lightIndex: number): void {
             var scene = this._scene;
@@ -666,7 +666,8 @@
         }
 
         /**
-         * This works according to the standard show defined and supported by the BJS materials.
+         * This binds shadow lights related to the standard BJS materials.
+         * It implies the unifroms available on the materials are the standard BJS ones.
          */
         public bindShadowLight(lightIndex: string, effect: Effect, depthValuesAlreadySet: boolean): boolean {
             var light = this._light;

+ 1 - 1
src/Lights/babylon.directionalLight.ts

@@ -46,7 +46,7 @@ module BABYLON {
          * Returns the integer 1.
          */
         public getTypeID(): number {
-            return 1;
+            return Light.LIGHTTYPEID_DIRECTIONALLIGHT;
         }
 
         /**

+ 1 - 1
src/Lights/babylon.hemisphericLight.ts

@@ -73,7 +73,7 @@
          * Returns the integer 3.  
          */
         public getTypeID(): number {
-            return 3;
+            return Light.LIGHTTYPEID_HEMISPHERICLIGHT;
         }
     }
 } 

+ 3 - 3
src/Lights/babylon.light.ts

@@ -166,7 +166,7 @@
 
         /**
          * Defines the rendering priority of the lights. It can help in case of fallback or number of lights
-         * exceeding the allowed number of the materials.
+         * exceeding the number allowed of the materials.
          */
         @serialize()
         @expandToProperty("_reorderLightsInScene")
@@ -371,8 +371,8 @@
 
         /**
 		 * Sort function to order lights for rendering.
-		 * @param a First SPECTRE.Light object to compare to second.
-		 * @param b Second SPECTRE.Light object to compare first.
+		 * @param a First Light object to compare to second.
+		 * @param b Second Light object to compare first.
 		 * @return -1 to reduce's a's index relative to be, 0 for no change, 1 to increase a's index relative to b.
 		 */
         public static compareLightsPriority(a: Light, b: Light): number {

+ 2 - 2
src/Lights/babylon.pointLight.ts

@@ -64,11 +64,11 @@
          * Returns the integer 0.  
          */
         public getTypeID(): number {
-            return 0;
+            return Light.LIGHTTYPEID_POINTLIGHT;
         }
 
         /**
-         * Boolean : returns true by default.
+         * Specifies wether or not the shadowmap should be a cube texture.
          */
         public needCube(): boolean {
             return !this.direction;

+ 1 - 1
src/Lights/babylon.spotLight.ts

@@ -44,7 +44,7 @@
          * Returns the integer 2.
          */
         public getTypeID(): number {
-            return 2;
+            return Light.LIGHTTYPEID_SPOTLIGHT;
         }
 
         /**