Просмотр исходного кода

Monstro refactor: Enabling noImplicitAny on all repo

David Catuhe 7 лет назад
Родитель
Сommit
b942e86a05
100 измененных файлов с 16061 добавлено и 21284 удалено
  1. 3 7
      Tools/Gulp/config.json
  2. 4 2
      Tools/Gulp/gulpfile.js
  3. 1351 1325
      dist/preview release/babylon.d.ts
  4. 40 40
      dist/preview release/babylon.js
  5. 1988 1987
      dist/preview release/babylon.max.js
  6. 1351 1325
      dist/preview release/babylon.module.d.ts
  7. 41 41
      dist/preview release/babylon.worker.js
  8. 4319 4244
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts
  9. 46 46
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js
  10. 2033 2010
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js
  11. 4319 4244
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts
  12. 7 1
      dist/preview release/gui/babylon.gui.d.ts
  13. 11 0
      dist/preview release/gui/babylon.gui.js
  14. 3 3
      dist/preview release/gui/babylon.gui.min.js
  15. 7 1
      dist/preview release/gui/babylon.gui.module.d.ts
  16. 4 4
      dist/preview release/inspector/babylon.inspector.bundle.js
  17. 10 117
      dist/preview release/inspector/babylon.inspector.d.ts
  18. 12 150
      dist/preview release/inspector/babylon.inspector.js
  19. 4 4
      dist/preview release/inspector/babylon.inspector.min.js
  20. 75 25
      dist/preview release/loaders/babylon.glTF1FileLoader.d.ts
  21. 7 7
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  22. 2 2
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  23. 3 1
      dist/preview release/loaders/babylon.glTF2FileLoader.d.ts
  24. 14 10
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  25. 2 2
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  26. 78 26
      dist/preview release/loaders/babylon.glTFFileLoader.d.ts
  27. 21 17
      dist/preview release/loaders/babylon.glTFFileLoader.js
  28. 3 3
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  29. 1 1
      dist/preview release/loaders/babylon.objFileLoader.js
  30. 1 1
      dist/preview release/loaders/babylon.objFileLoader.min.js
  31. 1 1
      dist/preview release/loaders/babylon.stlFileLoader.js
  32. 1 1
      dist/preview release/loaders/babylon.stlFileLoader.min.js
  33. 23 19
      dist/preview release/loaders/babylonjs.loaders.js
  34. 3 3
      dist/preview release/loaders/babylonjs.loaders.min.js
  35. 78 26
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  36. 1 1
      dist/preview release/materialsLibrary/babylon.cellMaterial.js
  37. 1 1
      dist/preview release/materialsLibrary/babylon.cellMaterial.min.js
  38. 1 1
      dist/preview release/materialsLibrary/babylon.customMaterial.d.ts
  39. 2 1
      dist/preview release/materialsLibrary/babylon.customMaterial.js
  40. 1 1
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js
  41. 1 1
      dist/preview release/materialsLibrary/babylon.furMaterial.js
  42. 1 1
      dist/preview release/materialsLibrary/babylon.furMaterial.min.js
  43. 1 1
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js
  44. 1 1
      dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js
  45. 1 1
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js
  46. 1 1
      dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js
  47. 1 1
      dist/preview release/materialsLibrary/babylon.normalMaterial.js
  48. 1 1
      dist/preview release/materialsLibrary/babylon.normalMaterial.min.js
  49. 2 2
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js
  50. 1 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js
  51. 1 1
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js
  52. 1 1
      dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js
  53. 1 1
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js
  54. 1 1
      dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js
  55. 1 1
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js
  56. 1 1
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js
  57. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.js
  58. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  59. 13 12
      dist/preview release/materialsLibrary/babylonjs.materials.js
  60. 7 7
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  61. 1 1
      dist/preview release/materialsLibrary/babylonjs.materials.module.d.ts
  62. 1 1
      gui/src/controls/control.ts
  63. 2 1
      gui/src/tsconfig.json
  64. 1 1
      gui/src/valueAndUnit.ts
  65. 2 2
      inspector/src/Inspector.ts
  66. 1 1
      inspector/src/adapters/TextureAdapter.ts
  67. 0 5250
      inspector/src/babylon.canvas2d.d.ts
  68. 2 2
      inspector/src/details/DetailPanel.ts
  69. 6 33
      inspector/src/details/PropertyLine.ts
  70. 1 1
      inspector/src/gui/BasicElement.ts
  71. 6 6
      inspector/src/helpers/Helpers.ts
  72. 0 23
      inspector/src/lib.d.ts
  73. 7 118
      inspector/src/properties.ts
  74. 4 2
      inspector/src/properties_gui.ts
  75. 6 5
      inspector/src/tabs/ConsoleTab.ts
  76. 5 3
      inspector/src/tabs/MeshTab.ts
  77. 1 1
      inspector/src/tabs/PhysicsTab.ts
  78. 1 0
      inspector/src/tabs/PropertyTab.ts
  79. 2 1
      inspector/src/tabs/SceneTab.ts
  80. 1 1
      inspector/src/tabs/SoundTab.ts
  81. 1 1
      inspector/src/tabs/Tab.ts
  82. 1 1
      inspector/src/tools/AbstractTool.ts
  83. 3 3
      inspector/src/tools/PickTool.ts
  84. 2 1
      inspector/src/tsconfig.json
  85. 1 1
      loaders/src/OBJ/babylon.objFileLoader.ts
  86. 1 1
      loaders/src/STL/babylon.stlFileLoader.ts
  87. 20 20
      loaders/src/glTF/1.0/babylon.glTFLoader.ts
  88. 25 25
      loaders/src/glTF/1.0/babylon.glTFLoaderInterfaces.ts
  89. 2 2
      loaders/src/glTF/1.0/babylon.glTFLoaderUtils.ts
  90. 4 4
      loaders/src/glTF/1.0/babylon.glTFMaterialsCommonExtension.ts
  91. 20 14
      loaders/src/glTF/2.0/babylon.glTFLoader.ts
  92. 1 1
      loaders/src/glTF/2.0/babylon.glTFLoaderInterfaces.ts
  93. 1 1
      loaders/src/glTF/2.0/babylon.glTFLoaderUtils.ts
  94. 2 2
      loaders/src/glTF/babylon.glTFFileLoader.ts
  95. 2 1
      loaders/src/tsconfig.json
  96. 1 1
      materialsLibrary/src/cell/babylon.cellMaterial.ts
  97. 11 11
      materialsLibrary/src/custom/babylon.customMaterial.ts
  98. 1 1
      materialsLibrary/src/fur/babylon.furMaterial.ts
  99. 1 1
      materialsLibrary/src/gradient/babylon.gradientMaterial.ts
  100. 0 0
      materialsLibrary/src/lava/babylon.lavaMaterial.ts

+ 3 - 7
Tools/Gulp/config.json

@@ -69,7 +69,6 @@
             "assetsManager",
             "mapTexture",
             "dynamicFloatArray",
-            "imageProcessing",
             "serialization",
             "probes",
             "layer",
@@ -146,7 +145,6 @@
             "assetsManager",
             "mapTexture",
             "dynamicFloatArray",
-            "imageProcessing",
             "serialization",
             "probes",
             "layer",
@@ -206,9 +204,7 @@
                 "../../src/Materials/babylon.colorCurves.js"
             ],
             "shaderIncludes": [
-                "depthPrePass",
-                "imageProcessingDeclaration",
-                "imageProcessingFunctions"
+                "depthPrePass"
             ]
         },
         "particles": {
@@ -384,7 +380,7 @@
                 "defaultUboDeclaration",
                 "shadowsFragmentFunctions",
                 "fresnelFunction",
-                "reflectionFunction",
+                "reflectionFunction",                
                 "imageProcessingDeclaration",
                 "imageProcessingFunctions",
                 "bumpFragmentFunctions",
@@ -440,7 +436,7 @@
                 "shadowsFragmentFunctions",
                 "pbrFunctions",
                 "imageProcessingDeclaration",
-                "imageProcessingFunctions",
+                "imageProcessingFunctions",                
                 "harmonicsFunctions",
                 "pbrLightFunctions",
                 "helperFunctions",

+ 4 - 2
Tools/Gulp/gulpfile.js

@@ -45,7 +45,8 @@ var tsConfig = {
     declarationFiles: true,
     typescript: require('typescript'),
     experimentalDecorators: true,
-    isolatedModules: false
+    isolatedModules: false,
+    noImplicitAny: true
 };
 var tsProject = typescript.createProject(tsConfig);
 
@@ -55,7 +56,8 @@ var externalTsConfig = {
     declarationFiles: true,
     typescript: require('typescript'),
     experimentalDecorators: true,
-    isolatedModules: false
+    isolatedModules: false,
+    noImplicitAny: true
 };
 
 function processDependency(kind, dependency, filesToLoad) {

Разница между файлами не показана из-за своего большого размера
+ 1351 - 1325
dist/preview release/babylon.d.ts


Разница между файлами не показана из-за своего большого размера
+ 40 - 40
dist/preview release/babylon.js


Разница между файлами не показана из-за своего большого размера
+ 1988 - 1987
dist/preview release/babylon.max.js


Разница между файлами не показана из-за своего большого размера
+ 1351 - 1325
dist/preview release/babylon.module.d.ts


Разница между файлами не показана из-за своего большого размера
+ 41 - 41
dist/preview release/babylon.worker.js


Разница между файлами не показана из-за своего большого размера
+ 4319 - 4244
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


Разница между файлами не показана из-за своего большого размера
+ 46 - 46
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


Разница между файлами не показана из-за своего большого размера
+ 2033 - 2010
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js


Разница между файлами не показана из-за своего большого размера
+ 4319 - 4244
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


+ 7 - 1
dist/preview release/gui/babylon.gui.d.ts

@@ -107,7 +107,7 @@ declare module BABYLON.GUI {
         negativeValueAllowed: boolean;
         private _value;
         ignoreAdaptiveScaling: boolean;
-        constructor(value: any, unit?: number, negativeValueAllowed?: boolean);
+        constructor(value: number, unit?: number, negativeValueAllowed?: boolean);
         readonly isPercentage: boolean;
         readonly isPixel: boolean;
         readonly internalValue: number;
@@ -508,6 +508,11 @@ declare module BABYLON.GUI {
         private _lines;
         private _totalHeight;
         private _resizeToFit;
+        /**
+        * An event triggered after the text is changed
+        * @type {BABYLON.Observable}
+        */
+        onTextChangedObservable: Observable<TextBlock>;
         resizeToFit: boolean;
         textWrapping: boolean;
         text: string;
@@ -521,6 +526,7 @@ declare module BABYLON.GUI {
         protected _parseLine(line: string, context: CanvasRenderingContext2D): object;
         protected _parseLineWithTextWrapping(line: string, context: CanvasRenderingContext2D): object;
         protected _renderLines(context: CanvasRenderingContext2D): void;
+        dispose(): void;
     }
 }
 

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

@@ -1627,6 +1627,7 @@ var BABYLON;
             };
             Control.prototype.dispose = function () {
                 this.onDirtyObservable.clear();
+                this.onAfterDrawObservable.clear();
                 this.onPointerDownObservable.clear();
                 this.onPointerEnterObservable.clear();
                 this.onPointerMoveObservable.clear();
@@ -2945,6 +2946,11 @@ var BABYLON;
                 _this._textHorizontalAlignment = GUI.Control.HORIZONTAL_ALIGNMENT_CENTER;
                 _this._textVerticalAlignment = GUI.Control.VERTICAL_ALIGNMENT_CENTER;
                 _this._resizeToFit = false;
+                /**
+                * An event triggered after the text is changed
+                * @type {BABYLON.Observable}
+                */
+                _this.onTextChangedObservable = new BABYLON.Observable();
                 _this.text = text;
                 return _this;
             }
@@ -2986,6 +2992,7 @@ var BABYLON;
                     }
                     this._text = value;
                     this._markAsDirty();
+                    this.onTextChangedObservable.notifyObservers(this);
                 },
                 enumerable: true,
                 configurable: true
@@ -3119,6 +3126,10 @@ var BABYLON;
                     this.height = this.paddingTopInPixels + this.paddingBottomInPixels + this._fontOffset.height * this._lines.length + 'px';
                 }
             };
+            TextBlock.prototype.dispose = function () {
+                _super.prototype.dispose.call(this);
+                this.onTextChangedObservable.clear();
+            };
             return TextBlock;
         }(GUI.Control));
         GUI.TextBlock = TextBlock;

Разница между файлами не показана из-за своего большого размера
+ 3 - 3
dist/preview release/gui/babylon.gui.min.js


+ 7 - 1
dist/preview release/gui/babylon.gui.module.d.ts

@@ -112,7 +112,7 @@ declare module BABYLON.GUI {
         negativeValueAllowed: boolean;
         private _value;
         ignoreAdaptiveScaling: boolean;
-        constructor(value: any, unit?: number, negativeValueAllowed?: boolean);
+        constructor(value: number, unit?: number, negativeValueAllowed?: boolean);
         readonly isPercentage: boolean;
         readonly isPixel: boolean;
         readonly internalValue: number;
@@ -513,6 +513,11 @@ declare module BABYLON.GUI {
         private _lines;
         private _totalHeight;
         private _resizeToFit;
+        /**
+        * An event triggered after the text is changed
+        * @type {BABYLON.Observable}
+        */
+        onTextChangedObservable: Observable<TextBlock>;
         resizeToFit: boolean;
         textWrapping: boolean;
         text: string;
@@ -526,6 +531,7 @@ declare module BABYLON.GUI {
         protected _parseLine(line: string, context: CanvasRenderingContext2D): object;
         protected _parseLineWithTextWrapping(line: string, context: CanvasRenderingContext2D): object;
         protected _renderLines(context: CanvasRenderingContext2D): void;
+        dispose(): void;
     }
 }
 

Разница между файлами не показана из-за своего большого размера
+ 4 - 4
dist/preview release/inspector/babylon.inspector.bundle.js


+ 10 - 117
dist/preview release/inspector/babylon.inspector.d.ts

@@ -65,6 +65,7 @@ declare module INSPECTOR {
     }
 }
 
+
 declare module INSPECTOR {
     var PROPERTIES: {
         format: (obj: any) => any;
@@ -158,9 +159,6 @@ declare module INSPECTOR {
         'HDRCubeTexture': {
             type: typeof BABYLON.HDRCubeTexture;
         };
-        'FontTexture': {
-            type: typeof BABYLON.FontTexture;
-        };
         'Sound': {
             type: typeof BABYLON.Sound;
             properties: string[];
@@ -225,26 +223,6 @@ declare module INSPECTOR {
                 };
             };
         };
-        'PrimitiveAlignment': {
-            type: typeof BABYLON.PrimitiveAlignment;
-            properties: string[];
-        };
-        'PrimitiveThickness': {
-            type: typeof BABYLON.PrimitiveThickness;
-            properties: string[];
-        };
-        'BoundingInfo2D': {
-            type: typeof BABYLON.BoundingInfo2D;
-            properties: string[];
-        };
-        'SolidColorBrush2D': {
-            type: typeof BABYLON.SolidColorBrush2D;
-            properties: string[];
-        };
-        'GradientColorBrush2D': {
-            type: typeof BABYLON.GradientColorBrush2D;
-            properties: string[];
-        };
         'PBRMaterial': {
             type: typeof BABYLON.PBRMaterial;
             properties: string[];
@@ -256,96 +234,6 @@ declare module INSPECTOR {
                 };
             };
         };
-        'Canvas2D': {
-            type: typeof BABYLON.Canvas2D;
-        };
-        'Canvas2DEngineBoundData': {
-            type: typeof BABYLON.Canvas2DEngineBoundData;
-        };
-        'Ellipse2D': {
-            type: typeof BABYLON.Ellipse2D;
-        };
-        'Ellipse2DInstanceData': {
-            type: typeof BABYLON.Ellipse2DInstanceData;
-        };
-        'Ellipse2DRenderCache': {
-            type: typeof BABYLON.Ellipse2DRenderCache;
-        };
-        'Group2D': {
-            type: typeof BABYLON.Group2D;
-        };
-        'IntersectInfo2D': {
-            type: typeof BABYLON.IntersectInfo2D;
-        };
-        'Lines2D': {
-            type: typeof BABYLON.Lines2D;
-        };
-        'Lines2DInstanceData': {
-            type: typeof BABYLON.Lines2DInstanceData;
-        };
-        'Lines2DRenderCache': {
-            type: typeof BABYLON.Lines2DRenderCache;
-        };
-        'PrepareRender2DContext': {
-            type: typeof BABYLON.PrepareRender2DContext;
-        };
-        'Prim2DBase': {
-            type: typeof BABYLON.Prim2DBase;
-        };
-        'Prim2DClassInfo': {
-            type: typeof BABYLON.Prim2DClassInfo;
-        };
-        'Prim2DPropInfo': {
-            type: typeof BABYLON.Prim2DPropInfo;
-        };
-        'Rectangle2D': {
-            type: typeof BABYLON.Rectangle2D;
-        };
-        'Rectangle2DInstanceData': {
-            type: typeof BABYLON.Rectangle2DInstanceData;
-        };
-        'Rectangle2DRenderCache': {
-            type: typeof BABYLON.Rectangle2DRenderCache;
-        };
-        'Render2DContext': {
-            type: typeof BABYLON.Render2DContext;
-        };
-        'RenderablePrim2D': {
-            type: typeof BABYLON.RenderablePrim2D;
-        };
-        'ScreenSpaceCanvas2D': {
-            type: typeof BABYLON.ScreenSpaceCanvas2D;
-        };
-        'Shape2D': {
-            type: typeof BABYLON.Shape2D;
-        };
-        'Shape2DInstanceData': {
-            type: typeof BABYLON.Shape2DInstanceData;
-        };
-        'Sprite2D': {
-            type: typeof BABYLON.Sprite2D;
-        };
-        'Sprite2DInstanceData': {
-            type: typeof BABYLON.Sprite2DInstanceData;
-        };
-        'Sprite2DRenderCache': {
-            type: typeof BABYLON.Sprite2DRenderCache;
-        };
-        'Text2D': {
-            type: typeof BABYLON.Text2D;
-        };
-        'Text2DInstanceData': {
-            type: typeof BABYLON.Text2DInstanceData;
-        };
-        'Text2DRenderCache': {
-            type: typeof BABYLON.Text2DRenderCache;
-        };
-        'WorldSpaceCanvas2D': {
-            type: typeof BABYLON.WorldSpaceCanvas2D;
-        };
-        'WorldSpaceCanvas2DNode': {
-            type: typeof BABYLON.WorldSpaceCanvas2DNode;
-        };
         'PhysicsImpostor': {
             type: typeof BABYLON.PhysicsImpostor;
             properties: string[];
@@ -353,6 +241,7 @@ declare module INSPECTOR {
     };
 }
 
+
 declare module INSPECTOR {
     /**
      * Function that add gui objects properties to the variable PROPERTIES
@@ -376,7 +265,7 @@ declare module INSPECTOR {
          * Build the html element
          */
         protected _build(): void;
-        abstract update(data?: any): any;
+        abstract update(data?: any): void;
         /** Default dispose method if needed */
         dispose(): void;
     }
@@ -863,7 +752,7 @@ declare module INSPECTOR {
         /** Send the event which name is given in parameter to the window */
         static SEND_EVENT(eventName: string): void;
         /** Returns the given number with 2 decimal number max if a decimal part exists */
-        static Trunc(nb: any): number;
+        static Trunc(nb: number): number;
         /**
          * Useful function used to create a div
          */
@@ -931,7 +820,7 @@ declare module INSPECTOR {
         /** Add this in the propertytab with the searchbar */
         filter(str: string): void;
         /** Dispose properly this tab */
-        abstract dispose(): any;
+        abstract dispose(): void;
         /** Select an item in the tree */
         select(item: TreeItem): void;
         /**
@@ -941,6 +830,7 @@ declare module INSPECTOR {
     }
 }
 
+declare function Split(elements: HTMLDivElement[], options: any): void;
 declare module INSPECTOR {
     /**
      * A Property tab can creates two panels:
@@ -1037,6 +927,7 @@ declare module INSPECTOR {
     }
 }
 
+
 declare module INSPECTOR {
     class MeshTab extends PropertyTab {
         constructor(tabbar: TabBar, inspector: Inspector);
@@ -1044,6 +935,7 @@ declare module INSPECTOR {
     }
 }
 
+declare function Split(elements: HTMLElement[], options: any): void;
 declare module INSPECTOR {
     class SceneTab extends Tab {
         private _inspector;
@@ -1066,6 +958,7 @@ declare module INSPECTOR {
     }
 }
 
+declare function Split(elements: HTMLDivElement[], options: any): void;
 declare module INSPECTOR {
     /**
      * The console tab will have two features :
@@ -1175,7 +1068,7 @@ declare module INSPECTOR {
          * Updates the icon of this tool with the given string
          */
         protected _updateIcon(icon: string): void;
-        abstract action(): any;
+        abstract action(): void;
     }
 }
 

+ 12 - 150
dist/preview release/inspector/babylon.inspector.js

@@ -330,6 +330,7 @@ var INSPECTOR;
 
 //# sourceMappingURL=Inspector.js.map
 
+/// <reference path="../../dist/preview release/babylon.d.ts"/>
 var INSPECTOR;
 (function (INSPECTOR) {
     INSPECTOR.PROPERTIES = {
@@ -346,7 +347,7 @@ var INSPECTOR;
             }
         },
         'type_not_defined': {
-            properties: [],
+            properties: new Array(),
             format: function () { return ''; }
         },
         'Vector2': {
@@ -424,9 +425,6 @@ var INSPECTOR;
         'HDRCubeTexture': {
             type: BABYLON.HDRCubeTexture
         },
-        'FontTexture': {
-            type: BABYLON.FontTexture
-        },
         'Sound': {
             type: BABYLON.Sound,
             properties: [
@@ -606,26 +604,6 @@ var INSPECTOR;
                 alpha: { min: 0, max: 1, step: 0.01 }
             }
         },
-        'PrimitiveAlignment': {
-            type: BABYLON.PrimitiveAlignment,
-            properties: ['horizontal', 'vertical']
-        },
-        'PrimitiveThickness': {
-            type: BABYLON.PrimitiveThickness,
-            properties: ['topPixels', 'leftPixels', 'rightPixels', 'bottomPixels']
-        },
-        'BoundingInfo2D': {
-            type: BABYLON.BoundingInfo2D,
-            properties: ['radius', 'center', 'extent']
-        },
-        'SolidColorBrush2D': {
-            type: BABYLON.SolidColorBrush2D,
-            properties: ['color']
-        },
-        'GradientColorBrush2D': {
-            type: BABYLON.GradientColorBrush2D,
-            properties: ['color1', 'color2', 'translation', 'rotation', 'scale']
-        },
         'PBRMaterial': {
             type: BABYLON.PBRMaterial,
             properties: [
@@ -667,96 +645,6 @@ var INSPECTOR;
                 alpha: { min: 0, max: 1, step: 0.01 }
             }
         },
-        'Canvas2D': {
-            type: BABYLON.Canvas2D
-        },
-        'Canvas2DEngineBoundData': {
-            type: BABYLON.Canvas2DEngineBoundData
-        },
-        'Ellipse2D': {
-            type: BABYLON.Ellipse2D
-        },
-        'Ellipse2DInstanceData': {
-            type: BABYLON.Ellipse2DInstanceData
-        },
-        'Ellipse2DRenderCache': {
-            type: BABYLON.Ellipse2DRenderCache
-        },
-        'Group2D': {
-            type: BABYLON.Group2D
-        },
-        'IntersectInfo2D': {
-            type: BABYLON.IntersectInfo2D
-        },
-        'Lines2D': {
-            type: BABYLON.Lines2D
-        },
-        'Lines2DInstanceData': {
-            type: BABYLON.Lines2DInstanceData
-        },
-        'Lines2DRenderCache': {
-            type: BABYLON.Lines2DRenderCache
-        },
-        'PrepareRender2DContext': {
-            type: BABYLON.PrepareRender2DContext
-        },
-        'Prim2DBase': {
-            type: BABYLON.Prim2DBase
-        },
-        'Prim2DClassInfo': {
-            type: BABYLON.Prim2DClassInfo
-        },
-        'Prim2DPropInfo': {
-            type: BABYLON.Prim2DPropInfo
-        },
-        'Rectangle2D': {
-            type: BABYLON.Rectangle2D
-        },
-        'Rectangle2DInstanceData': {
-            type: BABYLON.Rectangle2DInstanceData
-        },
-        'Rectangle2DRenderCache': {
-            type: BABYLON.Rectangle2DRenderCache
-        },
-        'Render2DContext': {
-            type: BABYLON.Render2DContext
-        },
-        'RenderablePrim2D': {
-            type: BABYLON.RenderablePrim2D
-        },
-        'ScreenSpaceCanvas2D': {
-            type: BABYLON.ScreenSpaceCanvas2D
-        },
-        'Shape2D': {
-            type: BABYLON.Shape2D
-        },
-        'Shape2DInstanceData': {
-            type: BABYLON.Shape2DInstanceData
-        },
-        'Sprite2D': {
-            type: BABYLON.Sprite2D
-        },
-        'Sprite2DInstanceData': {
-            type: BABYLON.Sprite2DInstanceData
-        },
-        'Sprite2DRenderCache': {
-            type: BABYLON.Sprite2DRenderCache
-        },
-        'Text2D': {
-            type: BABYLON.Text2D
-        },
-        'Text2DInstanceData': {
-            type: BABYLON.Text2DInstanceData
-        },
-        'Text2DRenderCache': {
-            type: BABYLON.Text2DRenderCache
-        },
-        'WorldSpaceCanvas2D': {
-            type: BABYLON.WorldSpaceCanvas2D
-        },
-        'WorldSpaceCanvas2DNode': {
-            type: BABYLON.WorldSpaceCanvas2DNode
-        },
         'PhysicsImpostor': {
             type: BABYLON.PhysicsImpostor,
             properties: [
@@ -770,6 +658,7 @@ var INSPECTOR;
 
 //# sourceMappingURL=properties.js.map
 
+/// <reference path="../../dist/preview release/gui/babylon.gui.d.ts"/>
 var INSPECTOR;
 (function (INSPECTOR) {
     /**
@@ -804,7 +693,7 @@ var INSPECTOR;
             },
             'Button': {
                 type: BABYLON.GUI.Button,
-                properties: [],
+                properties: new Array(),
                 format: function (button) { return button.name; }
             },
             'ColorPicker': {
@@ -1217,7 +1106,7 @@ var INSPECTOR;
             return [];
         };
         TextureAdapter.prototype.getTools = function () {
-            var tools = [];
+            var tools = new Array();
             // tools.push(new CameraPOV(this));
             return tools;
         };
@@ -1631,35 +1520,7 @@ var INSPECTOR;
         PropertyFormatter.format = function (obj, prop) {
             // Get original value;
             var value = obj[prop];
-            // test if type PrimitiveAlignment is available (only included in canvas2d)
-            if (BABYLON.PrimitiveAlignment) {
-                if (obj instanceof BABYLON.PrimitiveAlignment) {
-                    if (prop === 'horizontal') {
-                        switch (value) {
-                            case BABYLON.PrimitiveAlignment.AlignLeft:
-                                return 'left';
-                            case BABYLON.PrimitiveAlignment.AlignRight:
-                                return 'right';
-                            case BABYLON.PrimitiveAlignment.AlignCenter:
-                                return 'center';
-                            case BABYLON.PrimitiveAlignment.AlignStretch:
-                                return 'stretch';
-                        }
-                    }
-                    else if (prop === 'vertical') {
-                        switch (value) {
-                            case BABYLON.PrimitiveAlignment.AlignTop:
-                                return 'top';
-                            case BABYLON.PrimitiveAlignment.AlignBottom:
-                                return 'bottom';
-                            case BABYLON.PrimitiveAlignment.AlignCenter:
-                                return 'center';
-                            case BABYLON.PrimitiveAlignment.AlignStretch:
-                                return 'stretch';
-                        }
-                    }
-                }
-            }
+            // test if type PrimitiveAlignment is available (only included in canvas2d)           
             return value;
         };
         return PropertyFormatter;
@@ -3065,7 +2926,7 @@ var INSPECTOR;
         }
         /* Overrides super */
         PhysicsTab.prototype._getTree = function () {
-            var arr = [];
+            var arr = new Array();
             var scene = this._inspector.scene;
             if (!scene.isPhysicsEnabled()) {
                 return arr;
@@ -3106,7 +2967,7 @@ var INSPECTOR;
         /* Overrides super */
         SoundTab.prototype._getTree = function () {
             var _this = this;
-            var arr = [];
+            var arr = new Array();
             // get all cameras from the first scene
             var instances = this._inspector.scene;
             for (var _i = 0, _a = instances.soundTracks; _i < _a.length; _i++) {
@@ -3364,6 +3225,7 @@ var INSPECTOR;
     INSPECTOR.MaterialTab = MaterialTab;
 })(INSPECTOR || (INSPECTOR = {}));
 
+/// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -3384,9 +3246,9 @@ var INSPECTOR;
         /* Overrides super */
         MeshTab.prototype._getTree = function () {
             var _this = this;
-            var arr = [];
-            // Tab containign mesh already in results
-            var alreadyIn = [];
+            var arr = new Array();
+            // Tab containing mesh already in results
+            var alreadyIn = new Array();
             // Recursive method building the tree panel
             var createNode = function (obj) {
                 var descendants = obj.getDescendants(true);

Разница между файлами не показана из-за своего большого размера
+ 4 - 4
dist/preview release/inspector/babylon.inspector.min.js


+ 75 - 25
dist/preview release/loaders/babylon.glTF1FileLoader.d.ts

@@ -139,7 +139,9 @@ declare module BABYLON.GLTF1 {
     * Interfaces
     */
     interface IGLTFProperty {
-        extensions?: Object;
+        extensions?: {
+            [key: string]: any;
+        };
         extras?: Object;
     }
     interface IGLTFChildRootProperty extends IGLTFProperty {
@@ -203,10 +205,16 @@ declare module BABYLON.GLTF1 {
         functions: IGLTFTechniqueStatesFunctions;
     }
     interface IGLTFTechnique extends IGLTFChildRootProperty {
-        parameters: Object;
+        parameters: {
+            [key: string]: IGLTFTechniqueParameter;
+        };
         program: string;
-        attributes: Object;
-        uniforms: Object;
+        attributes: {
+            [key: string]: string;
+        };
+        uniforms: {
+            [key: string]: string;
+        };
         states: IGLTFTechniqueStates;
     }
     interface IGLTFMaterial extends IGLTFChildRootProperty {
@@ -214,7 +222,9 @@ declare module BABYLON.GLTF1 {
         values: string[];
     }
     interface IGLTFMeshPrimitive extends IGLTFProperty {
-        attributes: Object;
+        attributes: {
+            [key: string]: string;
+        };
         indices: string;
         material: string;
         mode?: number;
@@ -293,8 +303,12 @@ declare module BABYLON.GLTF1 {
     }
     interface IGLTFAnimation extends IGLTFChildRootProperty {
         channels?: IGLTFAnimationChannel[];
-        parameters?: Object;
-        samplers?: Object;
+        parameters?: {
+            [key: string]: string;
+        };
+        samplers?: {
+            [key: string]: IGLTFAnimationSampler;
+        };
     }
     interface IGLTFNodeInstanceSkin {
         skeletons: string[];
@@ -328,25 +342,61 @@ declare module BABYLON.GLTF1 {
     * Runtime
     */
     interface IGLTFRuntime {
-        extensions: Object;
-        accessors: Object;
-        buffers: Object;
-        bufferViews: Object;
-        meshes: Object;
-        lights: Object;
-        cameras: Object;
-        nodes: Object;
-        images: Object;
-        textures: Object;
-        shaders: Object;
-        programs: Object;
-        samplers: Object;
-        techniques: Object;
-        materials: Object;
-        animations: Object;
-        skins: Object;
+        extensions: {
+            [key: string]: any;
+        };
+        accessors: {
+            [key: string]: IGLTFAccessor;
+        };
+        buffers: {
+            [key: string]: IGLTFBuffer;
+        };
+        bufferViews: {
+            [key: string]: IGLTFBufferView;
+        };
+        meshes: {
+            [key: string]: IGLTFMesh;
+        };
+        lights: {
+            [key: string]: IGLTFLight;
+        };
+        cameras: {
+            [key: string]: IGLTFCamera;
+        };
+        nodes: {
+            [key: string]: IGLTFNode;
+        };
+        images: {
+            [key: string]: IGLTFImage;
+        };
+        textures: {
+            [key: string]: IGLTFTexture;
+        };
+        shaders: {
+            [key: string]: IGLTFShader;
+        };
+        programs: {
+            [key: string]: IGLTFProgram;
+        };
+        samplers: {
+            [key: string]: IGLTFSampler;
+        };
+        techniques: {
+            [key: string]: IGLTFTechnique;
+        };
+        materials: {
+            [key: string]: IGLTFMaterial;
+        };
+        animations: {
+            [key: string]: IGLTFAnimation;
+        };
+        skins: {
+            [key: string]: IGLTFSkins;
+        };
         currentScene?: Object;
-        scenes: Object;
+        scenes: {
+            [key: string]: IGLTFScene;
+        };
         extensionsUsed: string[];
         extensionsRequired?: string[];
         buffersCount: number;

+ 7 - 7
dist/preview release/loaders/babylon.glTF1FileLoader.js

@@ -859,10 +859,10 @@ var BABYLON;
             }
             var vertexData = new BABYLON.VertexData();
             var geometry = new BABYLON.Geometry(id, gltfRuntime.scene, vertexData, false, newMesh);
-            var verticesStarts = [];
-            var verticesCounts = [];
-            var indexStarts = [];
-            var indexCounts = [];
+            var verticesStarts = new Array();
+            var verticesCounts = new Array();
+            var indexStarts = new Array();
+            var indexCounts = new Array();
             for (var meshIndex = 0; meshIndex < meshes.length; meshIndex++) {
                 var meshID = meshes[meshIndex];
                 var mesh = gltfRuntime.meshes[meshID];
@@ -1654,8 +1654,8 @@ var BABYLON;
                     }
                     // Create nodes
                     _this._createNodes(gltfRuntime);
-                    var meshes = [];
-                    var skeletons = [];
+                    var meshes = new Array();
+                    var skeletons = new Array();
                     // Fill arrays of meshes and skeletons
                     for (var nde in gltfRuntime.nodes) {
                         var node = gltfRuntime.nodes[nde];
@@ -2035,7 +2035,7 @@ var BABYLON;
                     var options = {
                         attributes: ["position"],
                         uniforms: ["worldView", "projection", "u_emission"],
-                        samplers: [],
+                        samplers: new Array(),
                         needAlphaBlending: false
                     };
                     GLTFUtils._DefaultMaterial = new BABYLON.ShaderMaterial("GLTFDefaultMaterial", scene, shaderPath, options);

Разница между файлами не показана из-за своего большого размера
+ 2 - 2
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


+ 3 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.d.ts

@@ -97,7 +97,9 @@ declare module BABYLON.GLTF2 {
     * Interfaces
     */
     interface IGLTFProperty {
-        extensions?: Object;
+        extensions?: {
+            [key: string]: any;
+        };
         extras?: any;
     }
     interface IGLTFChildRootProperty extends IGLTFProperty {

+ 14 - 10
dist/preview release/loaders/babylon.glTF2FileLoader.js

@@ -485,7 +485,7 @@ var BABYLON;
                 return meshes;
             };
             GLTFLoader.prototype._getSkeletons = function () {
-                var skeletons = [];
+                var skeletons = new Array();
                 var skins = this._gltf.skins;
                 if (skins) {
                     skins.forEach(function (skin) {
@@ -497,7 +497,7 @@ var BABYLON;
                 return skeletons;
             };
             GLTFLoader.prototype._getAnimationTargets = function () {
-                var targets = [];
+                var targets = new Array();
                 var animations = this._gltf.animations;
                 if (animations) {
                     animations.forEach(function (animation) {
@@ -940,21 +940,23 @@ var BABYLON;
                 if (!targetNode) {
                     throw new Error(channelContext + ": Failed to find target node " + channel.target.node);
                 }
-                var targetPath = {
+                var conversion = {
                     "translation": "position",
                     "rotation": "rotationQuaternion",
                     "scale": "scaling",
                     "weights": "influence"
-                }[channel.target.path];
+                };
+                var targetPath = conversion[channel.target.path];
                 if (!targetPath) {
                     throw new Error(channelContext + ": Invalid target path '" + channel.target.path + "'");
                 }
-                var animationType = {
+                var animationConvertion = {
                     "position": BABYLON.Animation.ANIMATIONTYPE_VECTOR3,
                     "rotationQuaternion": BABYLON.Animation.ANIMATIONTYPE_QUATERNION,
                     "scaling": BABYLON.Animation.ANIMATIONTYPE_VECTOR3,
                     "influence": BABYLON.Animation.ANIMATIONTYPE_FLOAT,
-                }[targetPath];
+                };
+                var animationType = animationConvertion[targetPath];
                 var inputData;
                 var outputData;
                 var checkSuccess = function () {
@@ -962,7 +964,7 @@ var BABYLON;
                         return;
                     }
                     var outputBufferOffset = 0;
-                    var getNextOutputValue = {
+                    var nextOutputConversion = {
                         "position": function () {
                             var value = BABYLON.Vector3.FromArray(outputData, outputBufferOffset);
                             outputBufferOffset += 3;
@@ -986,8 +988,9 @@ var BABYLON;
                             }
                             return value;
                         },
-                    }[targetPath];
-                    var getNextKey = {
+                    };
+                    var getNextOutputValue = nextOutputConversion[targetPath];
+                    var nextKeyConversion = {
                         "LINEAR": function (frameIndex) { return ({
                             frame: inputData[frameIndex],
                             value: getNextOutputValue()
@@ -998,7 +1001,8 @@ var BABYLON;
                             value: getNextOutputValue(),
                             outTangent: getNextOutputValue()
                         }); },
-                    }[sampler.interpolation];
+                    };
+                    var getNextKey = nextKeyConversion[sampler.interpolation];
                     if (!getNextKey) {
                         throw new Error(samplerContext + ": Invalid interpolation '" + sampler.interpolation + "'");
                     }

Разница между файлами не показана из-за своего большого размера
+ 2 - 2
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


+ 78 - 26
dist/preview release/loaders/babylon.glTFFileLoader.d.ts

@@ -139,7 +139,9 @@ declare module BABYLON.GLTF1 {
     * Interfaces
     */
     interface IGLTFProperty {
-        extensions?: Object;
+        extensions?: {
+            [key: string]: any;
+        };
         extras?: Object;
     }
     interface IGLTFChildRootProperty extends IGLTFProperty {
@@ -203,10 +205,16 @@ declare module BABYLON.GLTF1 {
         functions: IGLTFTechniqueStatesFunctions;
     }
     interface IGLTFTechnique extends IGLTFChildRootProperty {
-        parameters: Object;
+        parameters: {
+            [key: string]: IGLTFTechniqueParameter;
+        };
         program: string;
-        attributes: Object;
-        uniforms: Object;
+        attributes: {
+            [key: string]: string;
+        };
+        uniforms: {
+            [key: string]: string;
+        };
         states: IGLTFTechniqueStates;
     }
     interface IGLTFMaterial extends IGLTFChildRootProperty {
@@ -214,7 +222,9 @@ declare module BABYLON.GLTF1 {
         values: string[];
     }
     interface IGLTFMeshPrimitive extends IGLTFProperty {
-        attributes: Object;
+        attributes: {
+            [key: string]: string;
+        };
         indices: string;
         material: string;
         mode?: number;
@@ -293,8 +303,12 @@ declare module BABYLON.GLTF1 {
     }
     interface IGLTFAnimation extends IGLTFChildRootProperty {
         channels?: IGLTFAnimationChannel[];
-        parameters?: Object;
-        samplers?: Object;
+        parameters?: {
+            [key: string]: string;
+        };
+        samplers?: {
+            [key: string]: IGLTFAnimationSampler;
+        };
     }
     interface IGLTFNodeInstanceSkin {
         skeletons: string[];
@@ -328,25 +342,61 @@ declare module BABYLON.GLTF1 {
     * Runtime
     */
     interface IGLTFRuntime {
-        extensions: Object;
-        accessors: Object;
-        buffers: Object;
-        bufferViews: Object;
-        meshes: Object;
-        lights: Object;
-        cameras: Object;
-        nodes: Object;
-        images: Object;
-        textures: Object;
-        shaders: Object;
-        programs: Object;
-        samplers: Object;
-        techniques: Object;
-        materials: Object;
-        animations: Object;
-        skins: Object;
+        extensions: {
+            [key: string]: any;
+        };
+        accessors: {
+            [key: string]: IGLTFAccessor;
+        };
+        buffers: {
+            [key: string]: IGLTFBuffer;
+        };
+        bufferViews: {
+            [key: string]: IGLTFBufferView;
+        };
+        meshes: {
+            [key: string]: IGLTFMesh;
+        };
+        lights: {
+            [key: string]: IGLTFLight;
+        };
+        cameras: {
+            [key: string]: IGLTFCamera;
+        };
+        nodes: {
+            [key: string]: IGLTFNode;
+        };
+        images: {
+            [key: string]: IGLTFImage;
+        };
+        textures: {
+            [key: string]: IGLTFTexture;
+        };
+        shaders: {
+            [key: string]: IGLTFShader;
+        };
+        programs: {
+            [key: string]: IGLTFProgram;
+        };
+        samplers: {
+            [key: string]: IGLTFSampler;
+        };
+        techniques: {
+            [key: string]: IGLTFTechnique;
+        };
+        materials: {
+            [key: string]: IGLTFMaterial;
+        };
+        animations: {
+            [key: string]: IGLTFAnimation;
+        };
+        skins: {
+            [key: string]: IGLTFSkins;
+        };
         currentScene?: Object;
-        scenes: Object;
+        scenes: {
+            [key: string]: IGLTFScene;
+        };
         extensionsUsed: string[];
         extensionsRequired?: string[];
         buffersCount: number;
@@ -593,7 +643,9 @@ declare module BABYLON.GLTF2 {
     * Interfaces
     */
     interface IGLTFProperty {
-        extensions?: Object;
+        extensions?: {
+            [key: string]: any;
+        };
         extras?: any;
     }
     interface IGLTFChildRootProperty extends IGLTFProperty {

+ 21 - 17
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -859,10 +859,10 @@ var BABYLON;
             }
             var vertexData = new BABYLON.VertexData();
             var geometry = new BABYLON.Geometry(id, gltfRuntime.scene, vertexData, false, newMesh);
-            var verticesStarts = [];
-            var verticesCounts = [];
-            var indexStarts = [];
-            var indexCounts = [];
+            var verticesStarts = new Array();
+            var verticesCounts = new Array();
+            var indexStarts = new Array();
+            var indexCounts = new Array();
             for (var meshIndex = 0; meshIndex < meshes.length; meshIndex++) {
                 var meshID = meshes[meshIndex];
                 var mesh = gltfRuntime.meshes[meshID];
@@ -1654,8 +1654,8 @@ var BABYLON;
                     }
                     // Create nodes
                     _this._createNodes(gltfRuntime);
-                    var meshes = [];
-                    var skeletons = [];
+                    var meshes = new Array();
+                    var skeletons = new Array();
                     // Fill arrays of meshes and skeletons
                     for (var nde in gltfRuntime.nodes) {
                         var node = gltfRuntime.nodes[nde];
@@ -2035,7 +2035,7 @@ var BABYLON;
                     var options = {
                         attributes: ["position"],
                         uniforms: ["worldView", "projection", "u_emission"],
-                        samplers: [],
+                        samplers: new Array(),
                         needAlphaBlending: false
                     };
                     GLTFUtils._DefaultMaterial = new BABYLON.ShaderMaterial("GLTFDefaultMaterial", scene, shaderPath, options);
@@ -2643,7 +2643,7 @@ var BABYLON;
                 return meshes;
             };
             GLTFLoader.prototype._getSkeletons = function () {
-                var skeletons = [];
+                var skeletons = new Array();
                 var skins = this._gltf.skins;
                 if (skins) {
                     skins.forEach(function (skin) {
@@ -2655,7 +2655,7 @@ var BABYLON;
                 return skeletons;
             };
             GLTFLoader.prototype._getAnimationTargets = function () {
-                var targets = [];
+                var targets = new Array();
                 var animations = this._gltf.animations;
                 if (animations) {
                     animations.forEach(function (animation) {
@@ -3098,21 +3098,23 @@ var BABYLON;
                 if (!targetNode) {
                     throw new Error(channelContext + ": Failed to find target node " + channel.target.node);
                 }
-                var targetPath = {
+                var conversion = {
                     "translation": "position",
                     "rotation": "rotationQuaternion",
                     "scale": "scaling",
                     "weights": "influence"
-                }[channel.target.path];
+                };
+                var targetPath = conversion[channel.target.path];
                 if (!targetPath) {
                     throw new Error(channelContext + ": Invalid target path '" + channel.target.path + "'");
                 }
-                var animationType = {
+                var animationConvertion = {
                     "position": BABYLON.Animation.ANIMATIONTYPE_VECTOR3,
                     "rotationQuaternion": BABYLON.Animation.ANIMATIONTYPE_QUATERNION,
                     "scaling": BABYLON.Animation.ANIMATIONTYPE_VECTOR3,
                     "influence": BABYLON.Animation.ANIMATIONTYPE_FLOAT,
-                }[targetPath];
+                };
+                var animationType = animationConvertion[targetPath];
                 var inputData;
                 var outputData;
                 var checkSuccess = function () {
@@ -3120,7 +3122,7 @@ var BABYLON;
                         return;
                     }
                     var outputBufferOffset = 0;
-                    var getNextOutputValue = {
+                    var nextOutputConversion = {
                         "position": function () {
                             var value = BABYLON.Vector3.FromArray(outputData, outputBufferOffset);
                             outputBufferOffset += 3;
@@ -3144,8 +3146,9 @@ var BABYLON;
                             }
                             return value;
                         },
-                    }[targetPath];
-                    var getNextKey = {
+                    };
+                    var getNextOutputValue = nextOutputConversion[targetPath];
+                    var nextKeyConversion = {
                         "LINEAR": function (frameIndex) { return ({
                             frame: inputData[frameIndex],
                             value: getNextOutputValue()
@@ -3156,7 +3159,8 @@ var BABYLON;
                             value: getNextOutputValue(),
                             outTangent: getNextOutputValue()
                         }); },
-                    }[sampler.interpolation];
+                    };
+                    var getNextKey = nextKeyConversion[sampler.interpolation];
                     if (!getNextKey) {
                         throw new Error(samplerContext + ": Invalid interpolation '" + sampler.interpolation + "'");
                     }

Разница между файлами не показана из-за своего большого размера
+ 3 - 3
dist/preview release/loaders/babylon.glTFFileLoader.min.js


+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.js

@@ -702,7 +702,7 @@ var BABYLON;
             }
             //Create a BABYLON.Mesh list
             var babylonMeshesArray = []; //The mesh for babylon
-            var materialToUse = [];
+            var materialToUse = new Array();
             //Set data for each mesh
             for (var j = 0; j < meshesFromObj.length; j++) {
                 //check meshesNames (stlFileLoader)

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js


+ 1 - 1
dist/preview release/loaders/babylon.stlFileLoader.js

@@ -82,7 +82,7 @@ var BABYLON;
             // check characters higher than ASCII to confirm binary
             var fileLength = reader.byteLength;
             for (var index = 0; index < fileLength; index++) {
-                if (reader.getUint8(index, false) > 127) {
+                if (reader.getUint8(index) > 127) {
                     return true;
                 }
             }

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/loaders/babylon.stlFileLoader.min.js


+ 23 - 19
dist/preview release/loaders/babylonjs.loaders.js

@@ -99,7 +99,7 @@ var BABYLON;
             // check characters higher than ASCII to confirm binary
             var fileLength = reader.byteLength;
             for (var index = 0; index < fileLength; index++) {
-                if (reader.getUint8(index, false) > 127) {
+                if (reader.getUint8(index) > 127) {
                     return true;
                 }
             }
@@ -884,7 +884,7 @@ var BABYLON;
             }
             //Create a BABYLON.Mesh list
             var babylonMeshesArray = []; //The mesh for babylon
-            var materialToUse = [];
+            var materialToUse = new Array();
             //Set data for each mesh
             for (var j = 0; j < meshesFromObj.length; j++) {
                 //check meshesNames (stlFileLoader)
@@ -1829,10 +1829,10 @@ var BABYLON;
             }
             var vertexData = new BABYLON.VertexData();
             var geometry = new BABYLON.Geometry(id, gltfRuntime.scene, vertexData, false, newMesh);
-            var verticesStarts = [];
-            var verticesCounts = [];
-            var indexStarts = [];
-            var indexCounts = [];
+            var verticesStarts = new Array();
+            var verticesCounts = new Array();
+            var indexStarts = new Array();
+            var indexCounts = new Array();
             for (var meshIndex = 0; meshIndex < meshes.length; meshIndex++) {
                 var meshID = meshes[meshIndex];
                 var mesh = gltfRuntime.meshes[meshID];
@@ -2624,8 +2624,8 @@ var BABYLON;
                     }
                     // Create nodes
                     _this._createNodes(gltfRuntime);
-                    var meshes = [];
-                    var skeletons = [];
+                    var meshes = new Array();
+                    var skeletons = new Array();
                     // Fill arrays of meshes and skeletons
                     for (var nde in gltfRuntime.nodes) {
                         var node = gltfRuntime.nodes[nde];
@@ -3005,7 +3005,7 @@ var BABYLON;
                     var options = {
                         attributes: ["position"],
                         uniforms: ["worldView", "projection", "u_emission"],
-                        samplers: [],
+                        samplers: new Array(),
                         needAlphaBlending: false
                     };
                     GLTFUtils._DefaultMaterial = new BABYLON.ShaderMaterial("GLTFDefaultMaterial", scene, shaderPath, options);
@@ -3595,7 +3595,7 @@ var BABYLON;
                 return meshes;
             };
             GLTFLoader.prototype._getSkeletons = function () {
-                var skeletons = [];
+                var skeletons = new Array();
                 var skins = this._gltf.skins;
                 if (skins) {
                     skins.forEach(function (skin) {
@@ -3607,7 +3607,7 @@ var BABYLON;
                 return skeletons;
             };
             GLTFLoader.prototype._getAnimationTargets = function () {
-                var targets = [];
+                var targets = new Array();
                 var animations = this._gltf.animations;
                 if (animations) {
                     animations.forEach(function (animation) {
@@ -4050,21 +4050,23 @@ var BABYLON;
                 if (!targetNode) {
                     throw new Error(channelContext + ": Failed to find target node " + channel.target.node);
                 }
-                var targetPath = {
+                var conversion = {
                     "translation": "position",
                     "rotation": "rotationQuaternion",
                     "scale": "scaling",
                     "weights": "influence"
-                }[channel.target.path];
+                };
+                var targetPath = conversion[channel.target.path];
                 if (!targetPath) {
                     throw new Error(channelContext + ": Invalid target path '" + channel.target.path + "'");
                 }
-                var animationType = {
+                var animationConvertion = {
                     "position": BABYLON.Animation.ANIMATIONTYPE_VECTOR3,
                     "rotationQuaternion": BABYLON.Animation.ANIMATIONTYPE_QUATERNION,
                     "scaling": BABYLON.Animation.ANIMATIONTYPE_VECTOR3,
                     "influence": BABYLON.Animation.ANIMATIONTYPE_FLOAT,
-                }[targetPath];
+                };
+                var animationType = animationConvertion[targetPath];
                 var inputData;
                 var outputData;
                 var checkSuccess = function () {
@@ -4072,7 +4074,7 @@ var BABYLON;
                         return;
                     }
                     var outputBufferOffset = 0;
-                    var getNextOutputValue = {
+                    var nextOutputConversion = {
                         "position": function () {
                             var value = BABYLON.Vector3.FromArray(outputData, outputBufferOffset);
                             outputBufferOffset += 3;
@@ -4096,8 +4098,9 @@ var BABYLON;
                             }
                             return value;
                         },
-                    }[targetPath];
-                    var getNextKey = {
+                    };
+                    var getNextOutputValue = nextOutputConversion[targetPath];
+                    var nextKeyConversion = {
                         "LINEAR": function (frameIndex) { return ({
                             frame: inputData[frameIndex],
                             value: getNextOutputValue()
@@ -4108,7 +4111,8 @@ var BABYLON;
                             value: getNextOutputValue(),
                             outTangent: getNextOutputValue()
                         }); },
-                    }[sampler.interpolation];
+                    };
+                    var getNextKey = nextKeyConversion[sampler.interpolation];
                     if (!getNextKey) {
                         throw new Error(samplerContext + ": Invalid interpolation '" + sampler.interpolation + "'");
                     }

Разница между файлами не показана из-за своего большого размера
+ 3 - 3
dist/preview release/loaders/babylonjs.loaders.min.js


+ 78 - 26
dist/preview release/loaders/babylonjs.loaders.module.d.ts

@@ -237,7 +237,9 @@ declare module BABYLON.GLTF1 {
     * Interfaces
     */
     interface IGLTFProperty {
-        extensions?: Object;
+        extensions?: {
+            [key: string]: any;
+        };
         extras?: Object;
     }
     interface IGLTFChildRootProperty extends IGLTFProperty {
@@ -301,10 +303,16 @@ declare module BABYLON.GLTF1 {
         functions: IGLTFTechniqueStatesFunctions;
     }
     interface IGLTFTechnique extends IGLTFChildRootProperty {
-        parameters: Object;
+        parameters: {
+            [key: string]: IGLTFTechniqueParameter;
+        };
         program: string;
-        attributes: Object;
-        uniforms: Object;
+        attributes: {
+            [key: string]: string;
+        };
+        uniforms: {
+            [key: string]: string;
+        };
         states: IGLTFTechniqueStates;
     }
     interface IGLTFMaterial extends IGLTFChildRootProperty {
@@ -312,7 +320,9 @@ declare module BABYLON.GLTF1 {
         values: string[];
     }
     interface IGLTFMeshPrimitive extends IGLTFProperty {
-        attributes: Object;
+        attributes: {
+            [key: string]: string;
+        };
         indices: string;
         material: string;
         mode?: number;
@@ -391,8 +401,12 @@ declare module BABYLON.GLTF1 {
     }
     interface IGLTFAnimation extends IGLTFChildRootProperty {
         channels?: IGLTFAnimationChannel[];
-        parameters?: Object;
-        samplers?: Object;
+        parameters?: {
+            [key: string]: string;
+        };
+        samplers?: {
+            [key: string]: IGLTFAnimationSampler;
+        };
     }
     interface IGLTFNodeInstanceSkin {
         skeletons: string[];
@@ -426,25 +440,61 @@ declare module BABYLON.GLTF1 {
     * Runtime
     */
     interface IGLTFRuntime {
-        extensions: Object;
-        accessors: Object;
-        buffers: Object;
-        bufferViews: Object;
-        meshes: Object;
-        lights: Object;
-        cameras: Object;
-        nodes: Object;
-        images: Object;
-        textures: Object;
-        shaders: Object;
-        programs: Object;
-        samplers: Object;
-        techniques: Object;
-        materials: Object;
-        animations: Object;
-        skins: Object;
+        extensions: {
+            [key: string]: any;
+        };
+        accessors: {
+            [key: string]: IGLTFAccessor;
+        };
+        buffers: {
+            [key: string]: IGLTFBuffer;
+        };
+        bufferViews: {
+            [key: string]: IGLTFBufferView;
+        };
+        meshes: {
+            [key: string]: IGLTFMesh;
+        };
+        lights: {
+            [key: string]: IGLTFLight;
+        };
+        cameras: {
+            [key: string]: IGLTFCamera;
+        };
+        nodes: {
+            [key: string]: IGLTFNode;
+        };
+        images: {
+            [key: string]: IGLTFImage;
+        };
+        textures: {
+            [key: string]: IGLTFTexture;
+        };
+        shaders: {
+            [key: string]: IGLTFShader;
+        };
+        programs: {
+            [key: string]: IGLTFProgram;
+        };
+        samplers: {
+            [key: string]: IGLTFSampler;
+        };
+        techniques: {
+            [key: string]: IGLTFTechnique;
+        };
+        materials: {
+            [key: string]: IGLTFMaterial;
+        };
+        animations: {
+            [key: string]: IGLTFAnimation;
+        };
+        skins: {
+            [key: string]: IGLTFSkins;
+        };
         currentScene?: Object;
-        scenes: Object;
+        scenes: {
+            [key: string]: IGLTFScene;
+        };
         extensionsUsed: string[];
         extensionsRequired?: string[];
         buffersCount: number;
@@ -691,7 +741,9 @@ declare module BABYLON.GLTF2 {
     * Interfaces
     */
     interface IGLTFProperty {
-        extensions?: Object;
+        extensions?: {
+            [key: string]: any;
+        };
         extras?: any;
     }
     interface IGLTFChildRootProperty extends IGLTFProperty {

+ 1 - 1
dist/preview release/materialsLibrary/babylon.cellMaterial.js

@@ -145,7 +145,7 @@ var BABYLON;
                     "vClipPlane", "diffuseMatrix"
                 ];
                 var samplers = ["diffuseSampler"];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/materialsLibrary/babylon.cellMaterial.min.js


+ 1 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.d.ts

@@ -292,7 +292,7 @@ declare module BABYLON {
         constructor();
     }
     class StandardShaderVersions {
-        static Ver3_0: any;
+        static Ver3_0: string;
     }
     class CustomMaterial extends StandardMaterial_OldVer {
         static ShaderIndexer: number;

+ 2 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.js

@@ -1898,6 +1898,7 @@ vColor=color;\n\
     var StandardShaderVersions = (function () {
         function StandardShaderVersions() {
         }
+        StandardShaderVersions.Ver3_0 = "3.0.0";
         return StandardShaderVersions;
     }());
     BABYLON.StandardShaderVersions = StandardShaderVersions;
@@ -1996,7 +1997,7 @@ vColor=color;\n\
                     this._newUniformInstances[kind + "-" + name] = param;
                 }
                 else {
-                    this._newSamplerInstances[kind + "-" + name] = param;
+                    this._newUniformInstances[kind + "-" + name] = param;
                 }
             }
             this._customUniform.push("uniform " + kind + " " + name + ";");

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.min.js


+ 1 - 1
dist/preview release/materialsLibrary/babylon.furMaterial.js

@@ -193,7 +193,7 @@ var BABYLON;
                 var samplers = ["diffuseSampler",
                     "heightTexture", "furTexture"
                 ];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/materialsLibrary/babylon.furMaterial.min.js


+ 1 - 1
dist/preview release/materialsLibrary/babylon.gradientMaterial.js

@@ -164,7 +164,7 @@ var BABYLON;
                     "topColor", "bottomColor", "offset", "smoothness"
                 ];
                 var samplers = ["diffuseSampler"];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js


+ 1 - 1
dist/preview release/materialsLibrary/babylon.lavaMaterial.js

@@ -182,7 +182,7 @@ var BABYLON;
                 var samplers = ["diffuseSampler",
                     "noiseTexture"
                 ];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js


+ 1 - 1
dist/preview release/materialsLibrary/babylon.normalMaterial.js

@@ -172,7 +172,7 @@ var BABYLON;
                     "vClipPlane", "diffuseMatrix"
                 ];
                 var samplers = ["diffuseSampler"];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/materialsLibrary/babylon.normalMaterial.min.js


+ 2 - 2
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js

@@ -127,8 +127,8 @@ var BABYLON;
                     "mBones",
                     "vClipPlane"
                 ];
-                var samplers = [];
-                var uniformBuffers = [];
+                var samplers = new Array();
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js


+ 1 - 1
dist/preview release/materialsLibrary/babylon.simpleMaterial.js

@@ -139,7 +139,7 @@ var BABYLON;
                     "vClipPlane", "diffuseMatrix"
                 ];
                 var samplers = ["diffuseSampler"];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js


+ 1 - 1
dist/preview release/materialsLibrary/babylon.terrainMaterial.js

@@ -148,7 +148,7 @@ var BABYLON;
                 var samplers = ["textureSampler", "diffuse1Sampler", "diffuse2Sampler", "diffuse3Sampler",
                     "bump1Sampler", "bump2Sampler", "bump3Sampler"
                 ];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js


+ 1 - 1
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js

@@ -160,7 +160,7 @@ var BABYLON;
                 var samplers = ["diffuseSamplerX", "diffuseSamplerY", "diffuseSamplerZ",
                     "normalSamplerX", "normalSamplerY", "normalSamplerZ"
                 ];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js


+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.js

@@ -287,7 +287,7 @@ var BABYLON;
                     // Water
                     "refractionSampler", "reflectionSampler"
                 ];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.min.js


+ 13 - 12
dist/preview release/materialsLibrary/babylonjs.materials.js

@@ -130,8 +130,8 @@ var BABYLON;
                     "mBones",
                     "vClipPlane"
                 ];
-                var samplers = [];
-                var uniformBuffers = [];
+                var samplers = new Array();
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,
@@ -374,7 +374,7 @@ var BABYLON;
                     "topColor", "bottomColor", "offset", "smoothness"
                 ];
                 var samplers = ["diffuseSampler"];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,
@@ -658,7 +658,7 @@ var BABYLON;
                     "vClipPlane", "diffuseMatrix"
                 ];
                 var samplers = ["diffuseSampler"];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,
@@ -972,7 +972,7 @@ var BABYLON;
                 var samplers = ["diffuseSampler",
                     "noiseTexture"
                 ];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,
@@ -1278,7 +1278,7 @@ var BABYLON;
                     "vClipPlane", "diffuseMatrix"
                 ];
                 var samplers = ["diffuseSampler"];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,
@@ -1697,7 +1697,7 @@ var BABYLON;
                     // Water
                     "refractionSampler", "reflectionSampler"
                 ];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,
@@ -2510,7 +2510,7 @@ var BABYLON;
                 var samplers = ["diffuseSampler",
                     "heightTexture", "furTexture"
                 ];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,
@@ -2922,7 +2922,7 @@ var BABYLON;
                 var samplers = ["textureSampler", "diffuse1Sampler", "diffuse2Sampler", "diffuse3Sampler",
                     "bump1Sampler", "bump2Sampler", "bump3Sampler"
                 ];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,
@@ -3319,7 +3319,7 @@ var BABYLON;
                 var samplers = ["diffuseSamplerX", "diffuseSamplerY", "diffuseSamplerZ",
                     "normalSamplerX", "normalSamplerY", "normalSamplerZ"
                 ];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,
@@ -5844,6 +5844,7 @@ vColor=color;\n\
     var StandardShaderVersions = (function () {
         function StandardShaderVersions() {
         }
+        StandardShaderVersions.Ver3_0 = "3.0.0";
         return StandardShaderVersions;
     }());
     BABYLON.StandardShaderVersions = StandardShaderVersions;
@@ -5942,7 +5943,7 @@ vColor=color;\n\
                     this._newUniformInstances[kind + "-" + name] = param;
                 }
                 else {
-                    this._newSamplerInstances[kind + "-" + name] = param;
+                    this._newUniformInstances[kind + "-" + name] = param;
                 }
             }
             this._customUniform.push("uniform " + kind + " " + name + ";");
@@ -6134,7 +6135,7 @@ var BABYLON;
                     "vClipPlane", "diffuseMatrix"
                 ];
                 var samplers = ["diffuseSampler"];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array();
                 BABYLON.MaterialHelper.PrepareUniformsAndSamplersList({
                     uniformsNames: uniforms,
                     uniformBuffersNames: uniformBuffers,

Разница между файлами не показана из-за своего большого размера
+ 7 - 7
dist/preview release/materialsLibrary/babylonjs.materials.min.js


+ 1 - 1
dist/preview release/materialsLibrary/babylonjs.materials.module.d.ts

@@ -807,7 +807,7 @@ declare module BABYLON {
         constructor();
     }
     class StandardShaderVersions {
-        static Ver3_0: any;
+        static Ver3_0: string;
     }
     class CustomMaterial extends StandardMaterial_OldVer {
         static ShaderIndexer: number;

+ 1 - 1
gui/src/controls/control.ts

@@ -986,7 +986,7 @@ module BABYLON.GUI {
             return Control._VERTICAL_ALIGNMENT_CENTER;
         }
 
-        private static _FontHeightSizes = {};
+        private static _FontHeightSizes: {[key: string]: {ascent: number, height: number, descent: number}} = {};
 
         public static _GetFontOffset(font: string): {ascent: number, height: number, descent: number} {
 

+ 2 - 1
gui/src/tsconfig.json

@@ -2,6 +2,7 @@
   "compilerOptions": {
     "experimentalDecorators": true,
     "module": "commonjs",
-    "target": "es5"
+    "target": "es5",
+    "noImplicitAny": true
   }
 }

+ 1 - 1
gui/src/valueAndUnit.ts

@@ -5,7 +5,7 @@ module BABYLON.GUI {
         private _value = 1;
         public ignoreAdaptiveScaling = false;
 
-        public constructor(value, public unit = ValueAndUnit.UNITMODE_PIXEL, public negativeValueAllowed = true) {
+        public constructor(value: number, public unit = ValueAndUnit.UNITMODE_PIXEL, public negativeValueAllowed = true) {
             this._value = value;
         }
 

+ 2 - 2
inspector/src/Inspector.ts

@@ -123,7 +123,7 @@ module INSPECTOR {
 
                     // copy style from canvas to wrapper
                     for (let prop in this._canvasStyle) {
-                        this._c2diwrapper.style[prop] = this._canvasStyle[prop];
+                        (<any>this._c2diwrapper.style)[prop] = this._canvasStyle[prop];
                     }
 
                     // Convert wrapper size in % (because getComputedStyle returns px only)
@@ -327,7 +327,7 @@ module INSPECTOR {
 
                 // restore canvas style
                 for (let prop in this._canvasStyle) {
-                    canvas.style[prop] = this._canvasStyle[prop];
+                    (<any>canvas.style)[prop] = this._canvasStyle[prop];
                 }
                 // Get parent of the wrapper 
                 let canvasParent = canvas.parentElement.parentElement;

+ 1 - 1
inspector/src/adapters/TextureAdapter.ts

@@ -28,7 +28,7 @@ module INSPECTOR {
         }
 
         public getTools(): Array<AbstractTreeTool> {
-            let tools = [];
+            let tools = new Array<AbstractTreeTool>();
             // tools.push(new CameraPOV(this));
             return tools;
         }

Разница между файлами не показана из-за своего большого размера
+ 0 - 5250
inspector/src/babylon.canvas2d.d.ts


+ 2 - 2
inspector/src/details/DetailPanel.ts

@@ -80,7 +80,7 @@
                 this._headerRow.querySelector(`#sort-direction-${property}`).classList.add('fa-chevron-down');
             }
 
-            let isString = (s) => {
+            let isString = (s: any) => {
                 return typeof(s) === 'string' || s instanceof String;
             };
 
@@ -88,7 +88,7 @@
                 property.closeDetails();
             })
 
-            this._detailRows.sort((detail1, detail2) : number => {
+            this._detailRows.sort((detail1: any, detail2: any) : number => {
                 let str1 = String(detail1[property]);
                 let str2 = String(detail2[property]);
                 if (!isString(str1)) {

+ 6 - 33
inspector/src/details/PropertyLine.ts

@@ -8,34 +8,7 @@ module INSPECTOR {
         public static format(obj: any, prop: string): string {
             // Get original value;
             let value = obj[prop];
-            // test if type PrimitiveAlignment is available (only included in canvas2d)
-            if (BABYLON.PrimitiveAlignment) {
-                if (obj instanceof BABYLON.PrimitiveAlignment) {
-                    if (prop === 'horizontal') {
-                        switch (value) {
-                            case BABYLON.PrimitiveAlignment.AlignLeft:
-                                return 'left';
-                            case BABYLON.PrimitiveAlignment.AlignRight:
-                                return 'right';
-                            case BABYLON.PrimitiveAlignment.AlignCenter:
-                                return 'center';
-                            case BABYLON.PrimitiveAlignment.AlignStretch:
-                                return 'stretch';
-                        }
-                    } else if (prop === 'vertical') {
-                        switch (value) {
-                            case BABYLON.PrimitiveAlignment.AlignTop:
-                                return 'top';
-                            case BABYLON.PrimitiveAlignment.AlignBottom:
-                                return 'bottom';
-                            case BABYLON.PrimitiveAlignment.AlignCenter:
-                                return 'center';
-                            case BABYLON.PrimitiveAlignment.AlignStretch:
-                                return 'stretch';
-                        }
-                    }
-                }
-            }
+            // test if type PrimitiveAlignment is available (only included in canvas2d)           
             return value;
         }
 
@@ -224,7 +197,7 @@ module INSPECTOR {
         }
 
         /** Replaces the default display with an input */
-        private _displayInput(e) {
+        private _displayInput(e: any) {
             // Remove the displayInput event listener
             this._valueDiv.removeEventListener('click', this._displayInputHandler);
             // Set input value
@@ -420,7 +393,7 @@ module INSPECTOR {
                 this._div.classList.toggle('unfolded');
                 if (this._children.length == 0) {
                     let objToDetail = this.value;
-                    let propToDisplay = PROPERTIES[Helpers.GET_TYPE(objToDetail)].properties.slice().reverse();
+                    let propToDisplay = (<any>PROPERTIES)[Helpers.GET_TYPE(objToDetail)].properties.slice().reverse();
                     let propertyLine = null;
 
                     for (let prop of propToDisplay) {
@@ -514,12 +487,12 @@ module INSPECTOR {
         private _isSliderType() { //Check if property have slider definition
             return this._property  && 
             PROPERTIES.hasOwnProperty(this._property.obj.constructor.name) &&
-            PROPERTIES[this._property.obj.constructor.name].hasOwnProperty('slider') && 
-            PROPERTIES[this._property.obj.constructor.name].slider.hasOwnProperty(this.name);
+            (<any>PROPERTIES)[this._property.obj.constructor.name].hasOwnProperty('slider') && 
+            (<any>PROPERTIES)[this._property.obj.constructor.name].slider.hasOwnProperty(this.name);
         }
 
         private _getSliderProperty() {
-            return PROPERTIES[this._property.obj.constructor.name].slider[this.name]
+            return (<any>PROPERTIES)[this._property.obj.constructor.name].slider[this.name]
         }
     }
 }

+ 1 - 1
inspector/src/gui/BasicElement.ts

@@ -23,7 +23,7 @@
          */
         protected _build(){};
         
-        public abstract update(data?:any);
+        public abstract update(data?:any): void;
         
         /** Default dispose method if needed */
         public dispose() {};

+ 6 - 6
inspector/src/helpers/Helpers.ts

@@ -36,7 +36,7 @@ module INSPECTOR {
          * Check if some properties are defined for the given type.
          */
         private static _CheckIfTypeExists(type: string) {
-            let properties = PROPERTIES[type];
+            let properties = (<any>PROPERTIES)[type];
             if (properties) {
                 return true;
             }
@@ -59,7 +59,7 @@ module INSPECTOR {
          */
         private static _GetTypeFor(obj: any) {
             for (let type in PROPERTIES) {
-                let typeBlock = PROPERTIES[type];
+                let typeBlock = (<any>PROPERTIES)[type];
                 if (typeBlock.type) {
                     if (obj instanceof typeBlock.type) {
                         return type;
@@ -71,7 +71,7 @@ module INSPECTOR {
         /**
          * Returns the name of a function (workaround to get object type for IE11)
          */
-        private static _GetFnName(fn) {
+        private static _GetFnName(fn: any) {
             var f = typeof fn == 'function';
             var s = f && ((fn.name && ['', fn.name]) || fn.toString().match(/function ([^\(]+)/));
             return (!f && 'not a function') || (s && s[1] || 'anonymous');
@@ -90,9 +90,9 @@ module INSPECTOR {
         }
 
         /** Returns the given number with 2 decimal number max if a decimal part exists */
-        public static Trunc(nb): number {
+        public static Trunc(nb: number): number {
             if (Math.round(nb) !== nb) {
-                return nb.toFixed(2);
+                return (<any>nb.toFixed(2));
             }
             return nb;
         };
@@ -140,7 +140,7 @@ module INSPECTOR {
             let div = Helpers.CreateDiv('', Inspector.DOCUMENT.body);
             div.style.display = 'none';
             div.appendChild(clone);
-            let value = Inspector.WINDOW.getComputedStyle(clone)[cssAttribute];
+            let value = (<any>Inspector.WINDOW.getComputedStyle(clone))[cssAttribute];
             div.parentNode.removeChild(div);
             return value;
         }

+ 0 - 23
inspector/src/lib.d.ts

@@ -1,23 +0,0 @@
-/// <reference path="../../dist/preview release/babylon.d.ts"/>
-/// <reference path="babylon.canvas2D.d.ts"/>
-/// <reference path="../../dist/preview release/gui/babylon.gui.d.ts"/>
-
-interface ISplit {
-    setSizes(sizes:Array<number>);
-    collapse(index:number);
-    destroy();
-}
-
-
-declare function Split (element : Array<HTMLElement> | Array<string>, options:{
-    sizes?      : Array<number>,
-    blockDrag?  : boolean, 
-    minSize?    : number,
-    gutterSize? : number,
-    snapOffset? : number,
-    direction?  : string
-    cursor?     : string
-    onDrag?     : Function,
-    onDragStart?: Function,
-    onDragEnd?  : Function,        
-}) : ISplit;

+ 7 - 118
inspector/src/properties.ts

@@ -1,19 +1,21 @@
+/// <reference path="../../dist/preview release/babylon.d.ts"/>
+
 module INSPECTOR {
 
     export var PROPERTIES = {
         /** Format the given object : 
          * If a format function exists, returns the result of this function.
          * If this function doesn't exists, return the object type instead */
-        format: (obj: any) => {
+        format: (obj: any): any => {
             let type = Helpers.GET_TYPE(obj) || 'type_not_defined';
-            if (PROPERTIES[type] && PROPERTIES[type].format) {
-                return PROPERTIES[type].format(obj);
+            if ((<any>PROPERTIES)[type] && (<any>PROPERTIES)[type].format) {
+                return (<any>PROPERTIES)[type].format(obj);
             } else {
                 return Helpers.GET_TYPE(obj);
             }
         },
         'type_not_defined': {
-            properties: [],
+            properties: new Array(),
             format: () => ''
         },
         'Vector2': {
@@ -91,9 +93,6 @@ module INSPECTOR {
         'HDRCubeTexture': {
             type: BABYLON.HDRCubeTexture
         },
-        'FontTexture': {
-            type: BABYLON.FontTexture
-        },
         'Sound': {
             type: BABYLON.Sound,
             properties: [
@@ -278,26 +277,6 @@ module INSPECTOR {
                 alpha: {min: 0, max: 1, step: 0.01}
             }
         },
-        'PrimitiveAlignment': {
-            type: BABYLON.PrimitiveAlignment,
-            properties: ['horizontal', 'vertical']
-        },
-        'PrimitiveThickness': {
-            type: BABYLON.PrimitiveThickness,
-            properties: ['topPixels', 'leftPixels', 'rightPixels', 'bottomPixels']
-        },
-        'BoundingInfo2D': {
-            type: BABYLON.BoundingInfo2D,
-            properties: ['radius', 'center', 'extent']
-        },
-        'SolidColorBrush2D': {
-            type: BABYLON.SolidColorBrush2D,
-            properties: ['color']
-        },
-        'GradientColorBrush2D': {
-            type: BABYLON.GradientColorBrush2D,
-            properties: ['color1', 'color2', 'translation', 'rotation', 'scale']
-        },
         'PBRMaterial': {
             type: BABYLON.PBRMaterial,
             properties: [
@@ -346,97 +325,7 @@ module INSPECTOR {
             slider: {
                 alpha: {min: 0, max: 1, step: 0.01}
             }
-        },
-        'Canvas2D': {
-            type: BABYLON.Canvas2D
-        },
-        'Canvas2DEngineBoundData': {
-            type: BABYLON.Canvas2DEngineBoundData
-        },
-        'Ellipse2D': {
-            type: BABYLON.Ellipse2D
-        },
-        'Ellipse2DInstanceData': {
-            type: BABYLON.Ellipse2DInstanceData
-        },
-        'Ellipse2DRenderCache': {
-            type: BABYLON.Ellipse2DRenderCache
-        },
-        'Group2D': {
-            type: BABYLON.Group2D
-        },
-        'IntersectInfo2D': {
-            type: BABYLON.IntersectInfo2D
-        },
-        'Lines2D': {
-            type: BABYLON.Lines2D
-        },
-        'Lines2DInstanceData': {
-            type: BABYLON.Lines2DInstanceData
-        },
-        'Lines2DRenderCache': {
-            type: BABYLON.Lines2DRenderCache
-        },
-        'PrepareRender2DContext': {
-            type: BABYLON.PrepareRender2DContext
-        },
-        'Prim2DBase': {
-            type: BABYLON.Prim2DBase
-        },
-        'Prim2DClassInfo': {
-            type: BABYLON.Prim2DClassInfo
-        },
-        'Prim2DPropInfo': {
-            type: BABYLON.Prim2DPropInfo
-        },
-        'Rectangle2D': {
-            type: BABYLON.Rectangle2D
-        },
-        'Rectangle2DInstanceData': {
-            type: BABYLON.Rectangle2DInstanceData
-        },
-        'Rectangle2DRenderCache': {
-            type: BABYLON.Rectangle2DRenderCache
-        },
-        'Render2DContext': {
-            type: BABYLON.Render2DContext
-        },
-        'RenderablePrim2D': {
-            type: BABYLON.RenderablePrim2D
-        },
-        'ScreenSpaceCanvas2D': {
-            type: BABYLON.ScreenSpaceCanvas2D
-        },
-        'Shape2D': {
-            type: BABYLON.Shape2D
-        },
-        'Shape2DInstanceData': {
-            type: BABYLON.Shape2DInstanceData
-        },
-        'Sprite2D': {
-            type: BABYLON.Sprite2D
-        },
-        'Sprite2DInstanceData': {
-            type: BABYLON.Sprite2DInstanceData
-        },
-        'Sprite2DRenderCache': {
-            type: BABYLON.Sprite2DRenderCache
-        },
-        'Text2D': {
-            type: BABYLON.Text2D
-        },
-        'Text2DInstanceData': {
-            type: BABYLON.Text2DInstanceData
-        },
-        'Text2DRenderCache': {
-            type: BABYLON.Text2DRenderCache
-        },
-        'WorldSpaceCanvas2D': {
-            type: BABYLON.WorldSpaceCanvas2D
-        },
-        'WorldSpaceCanvas2DNode': {
-            type: BABYLON.WorldSpaceCanvas2DNode
-        },
+        },  
         'PhysicsImpostor': {
             type: BABYLON.PhysicsImpostor,
             properties: [

+ 4 - 2
inspector/src/properties_gui.ts

@@ -1,3 +1,5 @@
+/// <reference path="../../dist/preview release/gui/babylon.gui.d.ts"/>
+
 module INSPECTOR {
     /**
      * Function that add gui objects properties to the variable PROPERTIES
@@ -32,7 +34,7 @@ module INSPECTOR {
             },
             'Button': {
                 type: BABYLON.GUI.Button,
-                properties: [],
+                properties: new Array(),
                 format: (button: BABYLON.GUI.Button) => { return button.name }
             },
             'ColorPicker': {
@@ -110,7 +112,7 @@ module INSPECTOR {
         }
 
         for (let prop in PROPERTIES_GUI) {
-            PROPERTIES[prop] = PROPERTIES_GUI[prop];
+            (<any>PROPERTIES)[prop] = (<any>PROPERTIES_GUI)[prop];
         }
     } 
 }

+ 6 - 5
inspector/src/tabs/ConsoleTab.ts

@@ -1,3 +1,5 @@
+declare function Split(elements: HTMLDivElement[], options: any): void;
+
 module INSPECTOR {
 
     /** 
@@ -29,8 +31,7 @@ module INSPECTOR {
 
             this._panel.appendChild(consolePanel);
             this._panel.appendChild(bjsPanel);
-            
-            
+                        
             Split([consolePanel, bjsPanel], {
                 blockDrag : this._inspector.popupMode,
                 sizes:[50, 50],
@@ -102,7 +103,7 @@ module INSPECTOR {
             
             // Get caller name if not null
             let callerFunc = this._addConsoleLog.caller as Function;
-            let caller = callerFunc==null? "Window" : "Function "+callerFunc['name'] + ": ";
+            let caller = callerFunc==null? "Window" : "Function "+ (<any>callerFunc)['name'] + ": ";
 
             for (var i = 0; i < params.length; i++) {
                 this._message('log', params[i], caller);
@@ -118,7 +119,7 @@ module INSPECTOR {
             
             // Get caller name if not null
             let callerFunc = this._addConsoleLog.caller as Function;
-            let caller = callerFunc==null? "Window" : callerFunc['name'];
+            let caller = callerFunc==null? "Window" : (<any>callerFunc)['name'];
 
             for (var i = 0; i < params.length; i++) {
                 this._message('warn', params[i], caller);
@@ -134,7 +135,7 @@ module INSPECTOR {
             
             // Get caller name if not null
             let callerFunc = this._addConsoleLog.caller as Function;
-            let caller = callerFunc==null? "Window" : callerFunc['name'];
+            let caller = callerFunc==null? "Window" : (<any>callerFunc)['name'];
 
             for (var i = 0; i < params.length; i++) {
                 this._message('error', params[i], caller);

+ 5 - 3
inspector/src/tabs/MeshTab.ts

@@ -1,3 +1,5 @@
+/// <reference path="../../../dist/preview release/babylon.d.ts"/>
+
 module INSPECTOR{
     
     export class MeshTab extends PropertyTab {
@@ -8,9 +10,9 @@ module INSPECTOR{
 
         /* Overrides super */
         protected _getTree() : Array<TreeItem> {
-            let arr = [];
-            // Tab containign mesh already in results
-            let alreadyIn = [];
+            let arr = new Array<TreeItem>();
+            // Tab containing mesh already in results
+            let alreadyIn = new Array<BABYLON.AbstractMesh>();
 
             // Recursive method building the tree panel
             let createNode = (obj : BABYLON.AbstractMesh) => {

+ 1 - 1
inspector/src/tabs/PhysicsTab.ts

@@ -10,7 +10,7 @@ module INSPECTOR{
 
         /* Overrides super */
         protected _getTree() : Array<TreeItem> {
-            let arr = [];
+            let arr = new Array<TreeItem>();
 
             let scene = this._inspector.scene;
             

+ 1 - 0
inspector/src/tabs/PropertyTab.ts

@@ -1,3 +1,4 @@
+declare function Split(elements: HTMLDivElement[], options: any): void;
 module INSPECTOR{
     
     /**

+ 2 - 1
inspector/src/tabs/SceneTab.ts

@@ -1,3 +1,4 @@
+declare function Split(elements: HTMLElement[], options: any): void;
 module INSPECTOR {
     
     export class SceneTab extends Tab {
@@ -169,7 +170,7 @@ module INSPECTOR {
          * the clicked element is set as active, all others elements are deactivated
          */
         private _generateRadioAction(arr:Array<HTMLElement>) {
-            let active = (elem, evt) => {
+            let active = (elem: HTMLElement, evt: any) => {
                 for (let e of arr) {
                     e.classList.remove('active');
                 }

+ 1 - 1
inspector/src/tabs/SoundTab.ts

@@ -7,7 +7,7 @@ module INSPECTOR {
         }
         /* Overrides super */
         protected _getTree(): Array<TreeItem> {
-            let arr = [];
+            let arr = new Array<TreeItem>();
 
             // get all cameras from the first scene
             let instances = this._inspector.scene;

+ 1 - 1
inspector/src/tabs/Tab.ts

@@ -54,7 +54,7 @@ module INSPECTOR {
         public filter(str: string) { };
 
         /** Dispose properly this tab */
-        public abstract dispose();
+        public abstract dispose(): void;
 
         /** Select an item in the tree */
         public select(item: TreeItem) {

+ 1 - 1
inspector/src/tools/AbstractTool.ts

@@ -38,6 +38,6 @@
             this._elem.className = `tool fa ${icon}`;
         }
 
-        public abstract action(); 
+        public abstract action(): void; 
     }
  }

+ 3 - 3
inspector/src/tools/PickTool.ts

@@ -3,7 +3,7 @@ module INSPECTOR {
     export class PickTool extends AbstractTool {
         
         private _isActive : boolean = false;
-        private _pickHandler;
+        private _pickHandler: (evt: PointerEvent) => void;
 
         constructor(parent:HTMLElement, inspector:Inspector) {
             super('fa-mouse-pointer', parent, inspector, 'Select a mesh in the scene');
@@ -33,7 +33,7 @@ module INSPECTOR {
         }
         
         /** Pick a mesh in the scene */
-        private _pickMesh(evt) {
+        private _pickMesh(evt: PointerEvent) {
             let pos = this._updatePointerPosition(evt);
             let pi = this._inspector.scene.pick(pos.x, pos.y, (mesh:BABYLON.AbstractMesh) => {return true});
             
@@ -43,7 +43,7 @@ module INSPECTOR {
             this._deactivate();
         }
         
-        private _updatePointerPosition(evt) : {x:number, y:number}{
+        private _updatePointerPosition(evt: PointerEvent) : {x:number, y:number}{
             let canvasRect =  this._inspector.scene.getEngine().getRenderingCanvasClientRect();
             let pointerX = evt.clientX - canvasRect.left;
             let pointerY = evt.clientY - canvasRect.top;

+ 2 - 1
inspector/src/tsconfig.json

@@ -2,6 +2,7 @@
     "compilerOptions": {
         "experimentalDecorators": true,
         "module": "commonjs", 
-        "target": "es5"
+        "target": "es5",
+        "noImplicitAny": true
     }
 }

+ 1 - 1
loaders/src/OBJ/babylon.objFileLoader.ts

@@ -796,7 +796,7 @@ module BABYLON {
 
             //Create a BABYLON.Mesh list
             var babylonMeshesArray: Array<BABYLON.Mesh> = []; //The mesh for babylon
-            var materialToUse = [];
+            var materialToUse = new Array<string>();
 
             //Set data for each mesh
             for (var j = 0; j < meshesFromObj.length; j++) {

+ 1 - 1
loaders/src/STL/babylon.stlFileLoader.ts

@@ -101,7 +101,7 @@ module BABYLON {
             // check characters higher than ASCII to confirm binary
             var fileLength = reader.byteLength;
             for (var index=0; index < fileLength; index++) {
-                if (reader.getUint8( index, false ) > 127) {
+                if (reader.getUint8( index ) > 127) {
                     return true;
                 }
             }

+ 20 - 20
loaders/src/glTF/1.0/babylon.glTFLoader.ts

@@ -93,7 +93,7 @@ module BABYLON.GLTF1 {
     var parseObject = (parsedObjects: any, runtimeProperty: string, gltfRuntime: IGLTFRuntime) => {
         for (var object in parsedObjects) {
             var parsedObject = parsedObjects[object];
-            gltfRuntime[runtimeProperty][object] = parsedObject;
+            (<any>gltfRuntime)[runtimeProperty][object] = parsedObject;
         }
     };
 
@@ -608,10 +608,10 @@ module BABYLON.GLTF1 {
         var vertexData = new VertexData();
         var geometry = new Geometry(id, gltfRuntime.scene, vertexData, false, newMesh);
 
-        var verticesStarts = [];
-        var verticesCounts = [];
-        var indexStarts = [];
-        var indexCounts = [];
+        var verticesStarts = new Array<number>();
+        var verticesCounts = new Array<number>();
+        var indexStarts = new Array<number>();
+        var indexCounts = new Array<number>();
 
         for (var meshIndex = 0; meshIndex < meshes.length; meshIndex++) {
             var meshID = meshes[meshIndex];
@@ -828,7 +828,7 @@ module BABYLON.GLTF1 {
 
             if (light) {
                 if (light.type === "ambient") {
-                    var ambienLight: IGLTFAmbienLight = light[light.type];
+                    var ambienLight: IGLTFAmbienLight = (<any>light)[light.type];
                     var hemiLight = new HemisphericLight(node.light, Vector3.Zero(), gltfRuntime.scene);
                     hemiLight.name = node.name;
 
@@ -839,7 +839,7 @@ module BABYLON.GLTF1 {
                     lastNode = hemiLight;
                 }
                 else if (light.type === "directional") {
-                    var directionalLight: IGLTFDirectionalLight = light[light.type];
+                    var directionalLight: IGLTFDirectionalLight = (<any>light)[light.type];
                     var dirLight = new DirectionalLight(node.light, Vector3.Zero(), gltfRuntime.scene);
                     dirLight.name = node.name;
 
@@ -850,7 +850,7 @@ module BABYLON.GLTF1 {
                     lastNode = dirLight;
                 }
                 else if (light.type === "point") {
-                    var pointLight: IGLTFPointLight = light[light.type];
+                    var pointLight: IGLTFPointLight = (<any>light)[light.type];
                     var ptLight = new PointLight(node.light, Vector3.Zero(), gltfRuntime.scene);
                     ptLight.name = node.name;
 
@@ -861,7 +861,7 @@ module BABYLON.GLTF1 {
                     lastNode = ptLight;
                 }
                 else if (light.type === "spot") {
-                    var spotLight: IGLTFSpotLight = light[light.type];
+                    var spotLight: IGLTFSpotLight = (<any>light)[light.type];
                     var spLight = new SpotLight(node.light, Vector3.Zero(), Vector3.Zero(), 0, 0, gltfRuntime.scene);
                     spLight.name = node.name;
 
@@ -887,7 +887,7 @@ module BABYLON.GLTF1 {
 
             if (camera) {
                 if (camera.type === "orthographic") {
-                    var orthographicCamera: IGLTFCameraOrthographic = camera[camera.type];
+                    var orthographicCamera: IGLTFCameraOrthographic = (<any>camera)[camera.type];
                     var orthoCamera = new FreeCamera(node.camera, Vector3.Zero(), gltfRuntime.scene);
 
                     orthoCamera.name = node.name;
@@ -897,7 +897,7 @@ module BABYLON.GLTF1 {
                     lastNode = orthoCamera;
                 }
                 else if (camera.type === "perspective") {
-                    var perspectiveCamera: IGLTFCameraPerspective = camera[camera.type];
+                    var perspectiveCamera: IGLTFCameraPerspective = (<any>camera)[camera.type];
                     var persCamera = new FreeCamera(node.camera, Vector3.Zero(), gltfRuntime.scene);
 
                     persCamera.name = node.name;
@@ -1016,7 +1016,7 @@ module BABYLON.GLTF1 {
     /**
     * onBind shaderrs callback to set uniforms and matrices
     */
-    var onBindShaderMaterial = (mesh: Mesh, gltfRuntime: IGLTFRuntime, unTreatedUniforms: Object, shaderMaterial: ShaderMaterial, technique: IGLTFTechnique, material: IGLTFMaterial, onSuccess: (shaderMaterial: ShaderMaterial) => void) => {
+    var onBindShaderMaterial = (mesh: Mesh, gltfRuntime: IGLTFRuntime, unTreatedUniforms: {[key: string]: IGLTFTechniqueParameter}, shaderMaterial: ShaderMaterial, technique: IGLTFTechnique, material: IGLTFMaterial, onSuccess: (shaderMaterial: ShaderMaterial) => void) => {
         var materialValues = material.values || technique.parameters;
 
         for (var unif in unTreatedUniforms) {
@@ -1040,7 +1040,7 @@ module BABYLON.GLTF1 {
                 }
             }
             else {
-                var value = materialValues[technique.uniforms[unif]];
+                var value = (<any>materialValues)[technique.uniforms[unif]];
                 if (!value) {
                     continue;
                 }
@@ -1067,7 +1067,7 @@ module BABYLON.GLTF1 {
     * Prepare uniforms to send the only one time
     * Loads the appropriate textures
     */
-    var prepareShaderMaterialUniforms = (gltfRuntime: IGLTFRuntime, shaderMaterial: ShaderMaterial, technique: IGLTFTechnique, material: IGLTFMaterial, unTreatedUniforms: Object) => {
+    var prepareShaderMaterialUniforms = (gltfRuntime: IGLTFRuntime, shaderMaterial: ShaderMaterial, technique: IGLTFTechnique, material: IGLTFMaterial, unTreatedUniforms: {[key: string]: IGLTFTechniqueParameter}) => {
         var materialValues = material.values || technique.parameters;
         var techniqueUniforms = technique.uniforms;
 
@@ -1077,7 +1077,7 @@ module BABYLON.GLTF1 {
         for (var unif in unTreatedUniforms) {
             var uniform: IGLTFTechniqueParameter = unTreatedUniforms[unif];
             var type = uniform.type;
-            var value = materialValues[techniqueUniforms[unif]];
+            var value = (<any>materialValues)[techniqueUniforms[unif]];
 
             if (value === undefined) {
                 // In case the value is the same for all materials
@@ -1125,7 +1125,7 @@ module BABYLON.GLTF1 {
     /**
     * Shader compilation success
     */
-    var onShaderCompileSuccess = (gltfRuntime: IGLTFRuntime, shaderMaterial: ShaderMaterial, technique: IGLTFTechnique, material: IGLTFMaterial, unTreatedUniforms: Object, onSuccess: (shaderMaterial: ShaderMaterial) => void) => {
+    var onShaderCompileSuccess = (gltfRuntime: IGLTFRuntime, shaderMaterial: ShaderMaterial, technique: IGLTFTechnique, material: IGLTFMaterial, unTreatedUniforms: {[key: string]: IGLTFTechniqueParameter}, onSuccess: (shaderMaterial: ShaderMaterial) => void) => {
         return (_: Effect) => {
             prepareShaderMaterialUniforms(gltfRuntime, shaderMaterial, technique, material, unTreatedUniforms);
 
@@ -1138,7 +1138,7 @@ module BABYLON.GLTF1 {
     /**
     * Returns the appropriate uniform if already handled by babylon
     */
-    var parseShaderUniforms = (tokenizer: Tokenizer, technique: IGLTFTechnique, unTreatedUniforms: Object): string => {
+    var parseShaderUniforms = (tokenizer: Tokenizer, technique: IGLTFTechnique, unTreatedUniforms: {[key: string]: IGLTFTechniqueParameter}): string => {
         for (var unif in technique.uniforms) {
             var uniform = technique.uniforms[unif];
             var uniformParameter: IGLTFTechniqueParameter = technique.parameters[uniform];
@@ -1399,7 +1399,7 @@ module BABYLON.GLTF1 {
             var vertexTokenizer = new Tokenizer(vertexShader);
             var pixelTokenizer = new Tokenizer(pixelShader);
 
-            var unTreatedUniforms: Object = {};
+            var unTreatedUniforms: {[key: string]: IGLTFTechniqueParameter} = {};
             var uniforms = [];
             var attributes = [];
             var samplers = [];
@@ -1569,8 +1569,8 @@ module BABYLON.GLTF1 {
                 // Create nodes
                 this._createNodes(gltfRuntime);
 
-                var meshes = [];
-                var skeletons = [];
+                var meshes = new Array<AbstractMesh>();
+                var skeletons = new Array<Skeleton>();
 
                 // Fill arrays of meshes and skeletons
                 for (var nde in gltfRuntime.nodes) {

+ 25 - 25
loaders/src/glTF/1.0/babylon.glTFLoaderInterfaces.ts

@@ -92,7 +92,7 @@ module BABYLON.GLTF1 {
     * Interfaces
     */
     export interface IGLTFProperty {
-        extensions?: Object;
+        extensions?: {[key: string]: any};
         extras?: Object;
     }
 
@@ -173,11 +173,11 @@ module BABYLON.GLTF1 {
     }
 
     export interface IGLTFTechnique extends IGLTFChildRootProperty {
-        parameters: Object;
+        parameters: {[key: string]: IGLTFTechniqueParameter};
         program: string;
 
-        attributes: Object;
-        uniforms: Object;
+        attributes: {[key: string]: string};
+        uniforms: {[key: string]: string};
         states: IGLTFTechniqueStates;
     }
 
@@ -187,7 +187,7 @@ module BABYLON.GLTF1 {
     }
 
     export interface IGLTFMeshPrimitive extends IGLTFProperty {
-        attributes: Object;
+        attributes: {[key: string]: string};
         indices: string;
         material: string;
 
@@ -287,8 +287,8 @@ module BABYLON.GLTF1 {
 
     export interface IGLTFAnimation extends IGLTFChildRootProperty {
         channels?: IGLTFAnimationChannel[];
-        parameters?: Object;
-        samplers?: Object;
+        parameters?:  {[key: string]: string};
+        samplers?: {[key: string]: IGLTFAnimationSampler};
     }
 
     export interface IGLTFNodeInstanceSkin {
@@ -330,26 +330,26 @@ module BABYLON.GLTF1 {
     * Runtime
     */
     export interface IGLTFRuntime {
-        extensions: Object;
-        accessors: Object;
-        buffers: Object;
-        bufferViews: Object;
-        meshes: Object;
-        lights: Object;
-        cameras: Object;
-        nodes: Object;
-        images: Object;
-        textures: Object;
-        shaders: Object;
-        programs: Object;
-        samplers: Object;
-        techniques: Object;
-        materials: Object;
-        animations: Object;
-        skins: Object;
+        extensions: {[key: string]: any};
+        accessors: {[key: string]: IGLTFAccessor};
+        buffers: {[key: string]: IGLTFBuffer};
+        bufferViews: {[key: string]: IGLTFBufferView};
+        meshes: {[key: string]: IGLTFMesh};
+        lights: {[key: string]: IGLTFLight};
+        cameras: {[key: string]: IGLTFCamera};
+        nodes: {[key: string]: IGLTFNode};
+        images: {[key: string]: IGLTFImage};
+        textures: {[key: string]: IGLTFTexture};
+        shaders: {[key: string]: IGLTFShader};
+        programs: {[key: string]: IGLTFProgram};
+        samplers: {[key: string]: IGLTFSampler};
+        techniques: {[key: string]: IGLTFTechnique};
+        materials: {[key: string]: IGLTFMaterial};
+        animations: {[key: string]: IGLTFAnimation};
+        skins: {[key: string]: IGLTFSkins};
 
         currentScene?: Object;
-        scenes: Object; // v1.1
+        scenes: {[key: string]: IGLTFScene}; // v1.1
 
         extensionsUsed: string[];
         extensionsRequired?: string[]; // v1.1

+ 2 - 2
loaders/src/glTF/1.0/babylon.glTFLoaderUtils.ts

@@ -192,7 +192,7 @@ module BABYLON.GLTF1 {
             var length = view.byteLength;
 
             for (var i = 0; i < length; ++i) {
-                result += String.fromCharCode(view[i]);
+                result += String.fromCharCode((<any>view)[i]);
             }
 
             return result;
@@ -238,7 +238,7 @@ module BABYLON.GLTF1 {
                 var options = {
                     attributes: ["position"],
                     uniforms: ["worldView", "projection", "u_emission"],
-                    samplers: [],
+                    samplers: new Array<string>(),
                     needAlphaBlending: false
                 };
 

+ 4 - 4
loaders/src/glTF/1.0/babylon.glTFMaterialsCommonExtension.ts

@@ -18,7 +18,7 @@ module BABYLON.GLTF1 {
     };
 
     interface IGLTFRuntimeCommonExtension {
-        lights: Object;
+        lights: {[key: string]: IGLTFLightCommonExtension};
     }
 
     interface IGLTFLightCommonExtension {
@@ -64,11 +64,11 @@ module BABYLON.GLTF1 {
         public loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean {
             if (!gltfRuntime.extensions) return false;
 
-            var extension = gltfRuntime.extensions[this.name];
+            var extension: IGLTFRuntimeCommonExtension = gltfRuntime.extensions[this.name];
             if (!extension) return false;
 
             // Create lights
-            var lights: IGLTFRuntimeCommonExtension = extension.lights;
+            var lights = extension.lights;
             if (lights) {
                 for (var thing in lights) {
                     var light: IGLTFLightCommonExtension = lights[thing];
@@ -162,7 +162,7 @@ module BABYLON.GLTF1 {
             // Create buffer from texture url
             GLTFLoaderBase.LoadTextureBufferAsync(gltfRuntime, id, (buffer) => {
                 // Create texture from buffer
-                GLTFLoaderBase.CreateTextureAsync(gltfRuntime, id, buffer, (texture) => material[propertyPath] = texture, onError);
+                GLTFLoaderBase.CreateTextureAsync(gltfRuntime, id, buffer, (texture) => (<any>material)[propertyPath] = texture, onError);
             }, onError);
         }
     }

+ 20 - 14
loaders/src/glTF/2.0/babylon.glTFLoader.ts

@@ -226,7 +226,7 @@ module BABYLON.GLTF2 {
         }
 
         private _getSkeletons(): Skeleton[] {
-            var skeletons = [];
+            var skeletons = new Array<Skeleton>();
 
             var skins = this._gltf.skins;
             if (skins) {
@@ -241,7 +241,7 @@ module BABYLON.GLTF2 {
         }
 
         private _getAnimationTargets(): any[] {
-            var targets = [];
+            var targets = new Array();
 
             var animations = this._gltf.animations;
             if (animations) {
@@ -430,7 +430,7 @@ module BABYLON.GLTF2 {
             this._loadVertexDataAsync(context, mesh, primitive, vertexData => {
                 this._loadMorphTargetsData(context, mesh, primitive, vertexData, node.babylonMesh);
 
-                var loadMaterial = index => {
+                var loadMaterial = (index: number) => {
                     if (primitive.material == null) {
                         subMaterials[index] = this._getDefaultMaterial();
                     }
@@ -756,22 +756,24 @@ module BABYLON.GLTF2 {
                 throw new Error(channelContext + ": Failed to find target node " + channel.target.node);
             }
 
-            var targetPath = {
+            var conversion:any = {
                 "translation": "position",
                 "rotation": "rotationQuaternion",
                 "scale": "scaling",
                 "weights": "influence"
-            }[channel.target.path];
+            }
+            var targetPath = conversion[channel.target.path];
             if (!targetPath) {
                 throw new Error(channelContext + ": Invalid target path '" + channel.target.path + "'");
             }
 
-            var animationType = {
+            var animationConvertion: any = {
                 "position": Animation.ANIMATIONTYPE_VECTOR3,
                 "rotationQuaternion": Animation.ANIMATIONTYPE_QUATERNION,
                 "scaling": Animation.ANIMATIONTYPE_VECTOR3,
                 "influence": Animation.ANIMATIONTYPE_FLOAT,
-            }[targetPath];
+            }
+            var animationType = animationConvertion[targetPath];
 
             var inputData: Float32Array;
             var outputData: Float32Array;
@@ -782,7 +784,8 @@ module BABYLON.GLTF2 {
                 }
 
                 var outputBufferOffset = 0;
-                var getNextOutputValue: () => any = {
+
+                var nextOutputConversion: any = {
                     "position": () => {
                         var value = Vector3.FromArray(outputData, outputBufferOffset);
                         outputBufferOffset += 3;
@@ -806,20 +809,23 @@ module BABYLON.GLTF2 {
                         }
                         return value;
                     },
-                }[targetPath];
+                };
+                
+                var getNextOutputValue: () => any = nextOutputConversion[targetPath];
 
-                var getNextKey: (frameIndex) => any = {
-                    "LINEAR": frameIndex => ({
+                var nextKeyConversion: any = {
+                    "LINEAR": (frameIndex: number) => ({
                         frame: inputData[frameIndex],
                         value: getNextOutputValue()
                     }),
-                    "CUBICSPLINE": frameIndex => ({
+                    "CUBICSPLINE": (frameIndex: number) => ({
                         frame: inputData[frameIndex],
                         inTangent: getNextOutputValue(),
                         value: getNextOutputValue(),
                         outTangent: getNextOutputValue()
                     }),
-                }[sampler.interpolation];
+                };
+                var getNextKey: (frameIndex: number) => any = nextKeyConversion[sampler.interpolation];
                 if (!getNextKey) {
                     throw new Error(samplerContext + ": Invalid interpolation '" + sampler.interpolation + "'");
                 }
@@ -1038,7 +1044,7 @@ module BABYLON.GLTF2 {
 
                 while (targetIndex < targetLength) {
                     for (var componentIndex = 0; componentIndex < numComponents; componentIndex++) {
-                        targetBuffer[targetIndex] = sourceBuffer[sourceIndex + componentIndex];
+                        (<any>targetBuffer)[targetIndex] = (<any>sourceBuffer)[sourceIndex + componentIndex];
                         targetIndex++;
                     }
                     sourceIndex += elementStride;

+ 1 - 1
loaders/src/glTF/2.0/babylon.glTFLoaderInterfaces.ts

@@ -47,7 +47,7 @@ module BABYLON.GLTF2 {
     * Interfaces
     */
     export interface IGLTFProperty {
-        extensions?: Object;
+        extensions?: {[key: string]: any};
         extras?: any;
     }
 

+ 1 - 1
loaders/src/glTF/2.0/babylon.glTFLoaderUtils.ts

@@ -115,7 +115,7 @@ module BABYLON.GLTF2 {
             var length = view.byteLength;
 
             for (var i = 0; i < length; ++i) {
-                result += String.fromCharCode(view[i]);
+                result += String.fromCharCode((<any>view)[i]);
             }
 
             return result;

+ 2 - 2
loaders/src/glTF/babylon.glTFFileLoader.ts

@@ -146,7 +146,7 @@ module BABYLON {
                 }
             }
 
-            var createLoaders = {
+            var createLoaders:{[key: number]: (parent: GLTFFileLoader) => IGLTFLoader} = {
                 1: GLTFFileLoader.CreateGLTFLoaderV1,
                 2: GLTFFileLoader.CreateGLTFLoaderV2
             };
@@ -301,7 +301,7 @@ module BABYLON {
             var length = view.byteLength;
 
             for (var i = 0; i < length; ++i) {
-                result += String.fromCharCode(view[i]);
+                result += String.fromCharCode((<any>view)[i]);
             }
 
             return result;

+ 2 - 1
loaders/src/tsconfig.json

@@ -5,6 +5,7 @@
     "module": "commonjs",
     "target": "es5",
     "sourceMap": true,
-    "lib": ["dom", "es2015.promise", "es5"]
+    "lib": ["dom", "es2015.promise", "es5"],
+    "noImplicitAny": true
   }
 }

+ 1 - 1
materialsLibrary/src/cell/babylon.cellMaterial.ts

@@ -171,7 +171,7 @@ module BABYLON {
                                 "vClipPlane", "diffuseMatrix"
                 ];
                 var samplers = ["diffuseSampler"];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array<string>()
 
                 MaterialHelper.PrepareUniformsAndSamplersList(<EffectCreationOptions>{
                     uniformsNames: uniforms, 

+ 11 - 11
materialsLibrary/src/custom/babylon.customMaterial.ts

@@ -91,7 +91,7 @@ module BABYLON {
                         ];
 
             for (var mode of modes) {
-                this[mode] = (mode === modeToEnable);
+                (<any>this)[mode] = (mode === modeToEnable);
             }
         }
     }
@@ -440,11 +440,11 @@ module BABYLON {
                 this._renderTargets.reset();
 
                 if (StandardMaterial_OldVer.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
-                    this._renderTargets.push(this._reflectionTexture);
+                    this._renderTargets.push(<RenderTargetTexture>this._reflectionTexture);
                 }
 
                 if (StandardMaterial_OldVer.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {
-                    this._renderTargets.push(this._refractionTexture);
+                    this._renderTargets.push(<RenderTargetTexture>this._refractionTexture);
                 }
 
                 return this._renderTargets;
@@ -822,7 +822,7 @@ module BABYLON {
                     "mBones",
                     "vClipPlane", "diffuseMatrix", "ambientMatrix", "opacityMatrix", "reflectionMatrix", "emissiveMatrix", "specularMatrix", "bumpMatrix", "lightmapMatrix", "refractionMatrix",
                     "diffuseLeftColor", "diffuseRightColor", "opacityParts", "reflectionLeftColor", "reflectionRightColor", "emissiveLeftColor", "emissiveRightColor", "refractionLeftColor", "refractionRightColor",
-                    "logarithmicDepthConstant", "vTangentSpaceParams"
+                    "logarithmicDepthConstant", "vTangentSpaceParams"
                 ];
 
                 var samplers = ["diffuseSampler", "ambientSampler", "opacitySampler", "reflectionCubeSampler", "reflection2DSampler", "emissiveSampler", "specularSampler", "bumpSampler", "lightmapSampler", "refractionCubeSampler", "refraction2DSampler"]
@@ -899,7 +899,7 @@ module BABYLON {
             this._uniformBuffer.addUniform("lightmapMatrix", 16);
             this._uniformBuffer.addUniform("specularMatrix", 16);
             this._uniformBuffer.addUniform("bumpMatrix", 16);
-            this._uniformBuffer.addUniform("vTangentSpaceParams", 2);
+            this._uniformBuffer.addUniform("vTangentSpaceParams", 2);
             this._uniformBuffer.addUniform("refractionMatrix", 16);
             this._uniformBuffer.addUniform("vRefractionInfos", 4);
             this._uniformBuffer.addUniform("vSpecularColor", 4);
@@ -1015,10 +1015,10 @@ module BABYLON {
                             this._uniformBuffer.updateMatrix("bumpMatrix", this._bumpTexture.getTextureMatrix());
 
                             if (scene._mirroredCameraPosition) {
-                                this._uniformBuffer.updateFloat2("vTangentSpaceParams", this.invertNormalMapX ? 1.0 : -1.0, this.invertNormalMapY ? 1.0 : -1.0);
+                                this._uniformBuffer.updateFloat2("vTangentSpaceParams", this.invertNormalMapX ? 1.0 : -1.0, this.invertNormalMapY ? 1.0 : -1.0);
                             } else {
                                 this._uniformBuffer.updateFloat2("vTangentSpaceParams", this.invertNormalMapX ? -1.0 : 1.0, this.invertNormalMapY ? -1.0 : 1.0);
-                            }
+                            }
                         }
 
                         if (this._refractionTexture && StandardMaterial_OldVer.RefractionTextureEnabled) {
@@ -1977,7 +1977,7 @@ vColor=color;\n\
  
    export class StandardShaderVersions{
 
-        public static Ver3_0;
+        public static Ver3_0 = "3.0.0";
 
    } 
 
@@ -2032,7 +2032,7 @@ vColor=color;\n\
               this._isCreatedShader  = false;
             
             CustomMaterial.ShaderIndexer++;
-            var name = name+"custom_"+CustomMaterial.ShaderIndexer;
+            var name: string = name + "custom_" + CustomMaterial.ShaderIndexer;
 
             this.ReviewUniform("uniform",uniforms);
             this.ReviewUniform("sampler",samplers);
@@ -2089,10 +2089,10 @@ vColor=color;\n\
               }
               if(param){
               if(kind.indexOf("sampler") == -1) {
-                    this._newUniformInstances[kind+"-"+name] = param;
+                    (<any>this._newUniformInstances)[kind+"-"+name] = param;
               }
               else{
-                  this._newSamplerInstances[kind+"-"+name] = param;
+                (<any>this._newUniformInstances)[kind+"-"+name] = param;
               }
              }
 

+ 1 - 1
materialsLibrary/src/fur/babylon.furMaterial.ts

@@ -247,7 +247,7 @@ module BABYLON {
                     "heightTexture", "furTexture"
                 ];
                 
-                var uniformBuffers = [];
+                var uniformBuffers = new Array<string>()
 
                 MaterialHelper.PrepareUniformsAndSamplersList(<EffectCreationOptions>{
                     uniformsNames: uniforms, 

+ 1 - 1
materialsLibrary/src/gradient/babylon.gradientMaterial.ts

@@ -192,7 +192,7 @@ module BABYLON {
                     "topColor", "bottomColor", "offset", "smoothness"
                 ];
                 var samplers = ["diffuseSampler"];
-                var uniformBuffers = [];
+                var uniformBuffers = new Array<string>();
 
                 MaterialHelper.PrepareUniformsAndSamplersList(<EffectCreationOptions>{
                     uniformsNames: uniforms, 

+ 0 - 0
materialsLibrary/src/lava/babylon.lavaMaterial.ts


Некоторые файлы не были показаны из-за большого количества измененных файлов