Browse Source

Merge remote-tracking branch 'BabylonJS/master'

MackeyK24 8 năm trước cách đây
mục cha
commit
024c3222ad
80 tập tin đã thay đổi với 8512 bổ sung7909 xóa
  1. 2 2
      Tools/Gulp/readme.md
  2. 1 7
      canvas2D/src/Engine/babylon.renderablePrim2d.ts
  3. 5153 5131
      dist/preview release/babylon.d.ts
  4. 175 175
      dist/preview release/canvas2D/babylon.canvas2d.d.ts
  5. 1586 1528
      dist/preview release/canvas2D/babylon.canvas2d.js
  6. 10 10
      dist/preview release/canvas2D/babylon.canvas2d.min.js
  7. 4 4
      dist/preview release/inspector/babylon.inspector.bundle.js
  8. 1 1
      dist/preview release/inspector/babylon.inspector.css
  9. 24 6
      dist/preview release/inspector/babylon.inspector.d.ts
  10. 274 54
      dist/preview release/inspector/babylon.inspector.js
  11. 3 3
      dist/preview release/inspector/babylon.inspector.min.js
  12. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.d.ts
  13. 27 27
      dist/preview release/loaders/babylon.glTFFileLoader.js
  14. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  15. 1 1
      dist/preview release/loaders/babylon.objFileLoader.js
  16. 1 1
      dist/preview release/loaders/babylon.objFileLoader.min.js
  17. 38 36
      dist/preview release/materialsLibrary/babylon.fireMaterial.js
  18. 1 1
      dist/preview release/materialsLibrary/babylon.fireMaterial.min.js
  19. 82 80
      dist/preview release/materialsLibrary/babylon.furMaterial.js
  20. 1 1
      dist/preview release/materialsLibrary/babylon.furMaterial.min.js
  21. 84 82
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js
  22. 1 1
      dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js
  23. 34 32
      dist/preview release/materialsLibrary/babylon.gridMaterial.js
  24. 1 1
      dist/preview release/materialsLibrary/babylon.gridMaterial.min.js
  25. 94 92
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js
  26. 1 1
      dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js
  27. 67 65
      dist/preview release/materialsLibrary/babylon.normalMaterial.js
  28. 1 1
      dist/preview release/materialsLibrary/babylon.normalMaterial.min.js
  29. 38 36
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js
  30. 1 1
      dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js
  31. 53 51
      dist/preview release/materialsLibrary/babylon.skyMaterial.js
  32. 1 1
      dist/preview release/materialsLibrary/babylon.skyMaterial.min.js
  33. 65 63
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js
  34. 1 1
      dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js
  35. 71 69
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js
  36. 1 1
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js
  37. 3 3
      dist/preview release/materialsLibrary/babylon.waterMaterial.d.ts
  38. 109 107
      dist/preview release/materialsLibrary/babylon.waterMaterial.js
  39. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  40. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.d.ts
  41. 32 31
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js
  42. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  43. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.d.ts
  44. 32 31
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.js
  45. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  46. 7 6
      dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.js
  47. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.min.js
  48. 5 4
      dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.js
  49. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.min.js
  50. 4 4
      dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.d.ts
  51. 8 7
      dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.js
  52. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.min.js
  53. 8 7
      dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.js
  54. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.min.js
  55. 7 6
      dist/preview release/proceduralTexturesLibrary/babylon.marbleProceduralTexture.js
  56. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.marbleProceduralTexture.min.js
  57. 4 3
      dist/preview release/proceduralTexturesLibrary/babylon.roadProceduralTexture.js
  58. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.roadProceduralTexture.min.js
  59. 14 13
      dist/preview release/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.js
  60. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.min.js
  61. 5 4
      dist/preview release/proceduralTexturesLibrary/babylon.woodProceduralTexture.js
  62. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.woodProceduralTexture.min.js
  63. 16 9
      inspector/index.html
  64. 2 6
      inspector/sass/_tooltip.scss
  65. 11 7
      inspector/src/Inspector.ts
  66. 3 5
      inspector/src/details/PropertyLine.ts
  67. 5 3
      inspector/src/gui/Tooltip.ts
  68. 19 0
      inspector/src/helpers/Helpers.ts
  69. 70 4
      inspector/src/properties.ts
  70. 5 7
      inspector/src/tabs/Canvas2DTab.ts
  71. 29 3
      inspector/src/tabs/MeshTab.ts
  72. 5 0
      inspector/src/tabs/PropertyTab.ts
  73. 154 27
      inspector/src/tools/LabelTool.ts
  74. 10 10
      inspector/src/tree/TreeItem.ts
  75. 1 1
      inspector/src/treetools/Info.ts
  76. 2 4
      inspector/test/index.js
  77. 5 1
      readme.md
  78. 1 1
      src/Rendering/babylon.renderingManager.ts
  79. 9 3
      src/babylon.engine.ts
  80. 14 11
      src/babylon.scene.ts

+ 2 - 2
Tools/Gulp/readme.md

@@ -3,7 +3,7 @@ Build Babylon.js with Gulp
 
 Build Babylon.js with [gulp](http://gulpjs.com/ "gulp") and npm ([nodejs](http://nodejs.org/ "nodejs")), easy and cross-platform
 
-(Paths in this file are relative to this file location.)
+**Paths in this file are relative to this file location, currently [Tools/Gulp](https://github.com/BabylonJS/Babylon.js/tree/master/Tools/Gulp).**
 
 # How to use it
 
@@ -53,7 +53,7 @@ Will be generated :
 - babylon.noworker.js (minified version without collisions workers)
 - babylon.max.js (unminified)
 
-Be aware that all js files content will be overwrite.
+Be aware that all js files content will be overwritten.
 
 ### Build Babylon.js when you save a typescript file:
 ```

+ 1 - 7
canvas2D/src/Engine/babylon.renderablePrim2d.ts

@@ -928,7 +928,7 @@
          */
         protected updateInstanceDataPart(part: InstanceDataBase, positionOffset: Vector2 = null) {
             let t = this._globalTransform.multiply(this.renderGroup.invGlobalTransform);    // Compute the transformation into the renderGroup's space
-            let rgScale = this._areSomeFlagsSet(SmartPropertyPrim.flagDontInheritParentScale) ? RenderablePrim2D._uV : this.renderGroup.actualScale;         // We still need to apply the scale of the renderGroup to our rendering, so get it.
+            let rgScale = (this._areSomeFlagsSet(SmartPropertyPrim.flagDontInheritParentScale) || !this.applyActualScaleOnTransform()) ? RenderablePrim2D._uV : this.renderGroup.actualScale;         // We still need to apply the scale of the renderGroup to our rendering, so get it.
             let size = (<Size>this.renderGroup.viewportSize);
             let zBias = this.actualZOffset;
 
@@ -952,12 +952,6 @@
             let tx = new Vector4(t.m[0] * rgScale.x * 2 / w, t.m[4] * 2 / w, 0/*t.m[8]*/, ((t.m[12] + offX) * rgScale.x * 2 / w) - 1);
             let ty = new Vector4(t.m[1] * 2 / h, t.m[5] * rgScale.y * 2 / h, 0/*t.m[9]*/, ((t.m[13] + offY) * rgScale.y * 2 / h) - 1);
 
-            if (!this.applyActualScaleOnTransform()) {
-                let las = this.actualScale;
-                tx.x /= las.x;
-                ty.y /= las.y;
-            }
-
             part.transformX = tx;
             part.transformY = ty;
             part.opacity = this.actualOpacity;

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 5153 - 5131
dist/preview release/babylon.d.ts


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 175 - 175
dist/preview release/canvas2D/babylon.canvas2d.d.ts


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1586 - 1528
dist/preview release/canvas2D/babylon.canvas2d.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 10 - 10
dist/preview release/canvas2D/babylon.canvas2d.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 4 - 4
dist/preview release/inspector/babylon.inspector.bundle.js


+ 1 - 1
dist/preview release/inspector/babylon.inspector.css

@@ -63,7 +63,7 @@
             background-color: #454545; }
   .insp-wrapper .tooltip {
     position: absolute;
-    top: 0;
+    top: 32px;
     right: 0;
     color: #f29766;
     display: none;

+ 24 - 6
dist/preview release/inspector/babylon.inspector.d.ts

@@ -88,8 +88,10 @@ declare module INSPECTOR {
         'Texture': {
             type: typeof BABYLON.Texture;
             properties: string[];
+            format: (tex: BABYLON.Texture) => string;
         };
         'ArcRotateCamera': {
+            type: typeof BABYLON.ArcRotateCamera;
             properties: string[];
         };
         'Scene': {
@@ -503,7 +505,7 @@ declare module INSPECTOR {
         private _elem;
         /** The tooltip div */
         private _infoDiv;
-        constructor(elem: HTMLElement, tip: string);
+        constructor(elem: HTMLElement, tip: string, attachTo?: HTMLElement);
     }
 }
 
@@ -545,7 +547,12 @@ declare module INSPECTOR {
          * Removes all children of the given div.
          */
         static CleanDiv(div: HTMLElement): void;
+        /**
+         * Returns the true value of the given CSS Attribute from the given element (in percentage or in pixel, as it was specified in the css)
+         */
+        static Css(elem: HTMLElement, cssAttribute: string): string;
         static LoadScript(): void;
+        static IsSystemName(name: string): boolean;
     }
 }
 
@@ -826,12 +833,23 @@ declare module INSPECTOR {
     class LabelTool extends AbstractTool {
         /** True if label are displayed, false otherwise */
         private _isDisplayed;
-        private _labels;
-        private _camera;
-        private _transformationMatrix;
+        private _canvas;
+        private _labelInitialized;
+        private _scene;
+        private _canvas2DLoaded;
+        private _newMeshObserver;
+        private _removedMeshObserver;
+        private _newLightObserver;
+        private _removedLightObserver;
+        private _newCameraObserver;
+        private _removedCameraObserver;
         constructor(parent: HTMLElement, inspector: Inspector);
+        dispose(): void;
+        private _checkC2DLoaded();
+        private _initializeLabels();
+        private _createLabel(node);
+        private _removeLabel(node);
         action(): void;
-        private _update();
     }
 }
 
@@ -866,7 +884,7 @@ declare module INSPECTOR {
         private _tab;
         private _adapter;
         private _tools;
-        private _children;
+        children: Array<TreeItem>;
         private _lineContent;
         constructor(tab: PropertyTab, obj: Adapter);
         /** Returns the item ID == its adapter ID */

+ 274 - 54
dist/preview release/inspector/babylon.inspector.js

@@ -14,6 +14,10 @@ var INSPECTOR;
             // Save HTML document and window
             Inspector.DOCUMENT = window.document;
             Inspector.WINDOW = window;
+            // Load the Canvas2D library if it's not already done
+            if (!BABYLON.Canvas2D) {
+                BABYLON.Tools.LoadScript("http://www.babylonjs.com/babylon.canvas2d.js", function () { });
+            }
             // POPUP MODE
             if (popup) {
                 // Build the inspector in the given parent
@@ -24,13 +28,11 @@ var INSPECTOR;
                 var canvas = this._scene.getEngine().getRenderingCanvas();
                 var canvasParent = canvas.parentElement;
                 var canvasParentComputedStyle = Inspector.WINDOW.getComputedStyle(canvasParent);
-                // resize canvas
-                // canvas.style.width = 'calc(100% - 750px - 12px)';
                 // get canvas style                
                 var canvasComputedStyle = Inspector.WINDOW.getComputedStyle(canvas);
                 this._canvasStyle = {
-                    width: canvasComputedStyle.width,
-                    height: canvasComputedStyle.height,
+                    width: INSPECTOR.Helpers.Css(canvas, 'width'),
+                    height: INSPECTOR.Helpers.Css(canvas, 'height'),
                     position: canvasComputedStyle.position,
                     top: canvasComputedStyle.top,
                     bottom: canvasComputedStyle.bottom,
@@ -203,9 +205,9 @@ var INSPECTOR;
                 for (var prop in this._canvasStyle) {
                     canvas.style[prop] = this._canvasStyle[prop];
                 }
-                // Get parent of the wrapper           
+                // Get parent of the wrapper 
                 var canvasParent = canvas.parentElement.parentElement;
-                canvasParent.appendChild(canvas);
+                canvasParent.insertBefore(canvas, this._c2diwrapper);
                 // Remove wrapper
                 INSPECTOR.Helpers.CleanDiv(this._c2diwrapper);
                 this._c2diwrapper.remove();
@@ -321,14 +323,56 @@ var INSPECTOR;
                 'uOffset',
                 'vOffset'
             ],
+            format: function (tex) { return tex.name; }
         },
         'ArcRotateCamera': {
-            // type: BABYLON.ArcRotateCamera,
-            properties: ['alpha', 'beta', 'radius']
+            type: BABYLON.ArcRotateCamera,
+            properties: [
+                'alpha',
+                'beta',
+                'radius',
+                'angularSensibilityX',
+                'angularSensibilityY',
+                'target',
+                'lowerAlphaLimit',
+                'lowerBetaLimit',
+                'upperAlphaLimit',
+                'upperBetaLimit',
+                'lowerRadiusLimit',
+                'upperRadiusLimit',
+                'pinchPrecision',
+                'wheelPrecision',
+                'allowUpsideDown',
+                'checkCollisions'
+            ]
         },
         'Scene': {
             type: BABYLON.Scene,
-            properties: ['actionManager', 'activeCamera', 'ambientColor', 'clearColor']
+            properties: [
+                'actionManager',
+                'activeCamera',
+                'ambientColor',
+                'clearColor',
+                'forceWireframe',
+                'forcePointsCloud',
+                'forceShowBoundingBoxes',
+                'useRightHandedSystem',
+                'hoverCursor',
+                'cameraToUseForPointers',
+                'fogEnabled',
+                'fogColor',
+                'fogDensity',
+                'fogStart',
+                'fogEnd',
+                'shadowsEnabled',
+                'lightsEnabled',
+                'collisionsEnabled',
+                'gravity',
+                'meshUnderPointer',
+                'pointerX',
+                'pointerY',
+                'uid'
+            ]
         },
         'Mesh': {
             type: BABYLON.Mesh,
@@ -338,7 +382,29 @@ var INSPECTOR;
                 'rotation',
                 'rotationQuaternion',
                 'absolutePosition',
-                'material'
+                'material',
+                'actionManager',
+                'visibility',
+                'isVisible',
+                'isPickable',
+                'renderingGroupId',
+                'receiveShadows',
+                'renderOutline',
+                'outlineColor',
+                'outlineWidth',
+                'renderOverlay',
+                'overlayColor',
+                'overlayAlpha',
+                'hasVertexAlpha',
+                'useVertexColors',
+                'layerMask',
+                'alwaysSelectAsActiveMesh',
+                'ellipsoid',
+                'ellipsoidOffset',
+                'edgesWidth',
+                'edgesColor',
+                'checkCollisions',
+                'hasLODLevels'
             ],
             format: function (m) { return m.name; }
         },
@@ -1196,12 +1262,10 @@ var INSPECTOR;
          * (example : mesh.position = new BABYLON.Vector3 ; the original vector3 object is deleted from the mesh).
         */
         PropertyLine.prototype.updateObject = function () {
-            if (!this._parent) {
-                return this._property.value;
-            }
-            else {
+            if (this._parent) {
                 this._property.obj = this._parent.updateObject();
             }
+            return this._property.value;
         };
         Object.defineProperty(PropertyLine.prototype, "name", {
             // Returns the property name
@@ -1672,10 +1736,13 @@ var INSPECTOR;
      * Creates a tooltip for the parent of the given html element
      */
     var Tooltip = (function () {
-        function Tooltip(elem, tip) {
+        function Tooltip(elem, tip, attachTo) {
             var _this = this;
             this._elem = elem;
-            this._infoDiv = INSPECTOR.Helpers.CreateDiv('tooltip', this._elem.parentElement);
+            if (!attachTo) {
+                attachTo = this._elem.parentElement;
+            }
+            this._infoDiv = INSPECTOR.Helpers.CreateDiv('tooltip', attachTo);
             this._elem.addEventListener('mouseover', function () {
                 _this._infoDiv.textContent = tip;
                 _this._infoDiv.style.display = 'block';
@@ -1802,6 +1869,18 @@ var INSPECTOR;
                 div.removeChild(div.firstChild);
             }
         };
+        /**
+         * Returns the true value of the given CSS Attribute from the given element (in percentage or in pixel, as it was specified in the css)
+         */
+        Helpers.Css = function (elem, cssAttribute) {
+            var clone = elem.cloneNode(true);
+            var div = Helpers.CreateDiv('', INSPECTOR.Inspector.DOCUMENT.body);
+            div.style.display = 'none';
+            div.appendChild(clone);
+            var value = INSPECTOR.Inspector.WINDOW.getComputedStyle(clone)[cssAttribute];
+            div.remove();
+            return value;
+        };
         Helpers.LoadScript = function () {
             BABYLON.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js", function (elem) {
                 var script = Helpers.CreateElement('script', '', INSPECTOR.Inspector.DOCUMENT.body);
@@ -1822,6 +1901,12 @@ var INSPECTOR;
                 console.log("erreur");
             });
         };
+        Helpers.IsSystemName = function (name) {
+            if (name == null) {
+                return false;
+            }
+            return name.indexOf("###") === 0 && name.lastIndexOf("###") === (name.length - 3);
+        };
         return Helpers;
     }());
     INSPECTOR.Helpers = Helpers;
@@ -2056,6 +2141,12 @@ var INSPECTOR;
                 if (item.id.toLowerCase().indexOf(filter.toLowerCase()) != -1) {
                     items.push(item);
                 }
+                for (var _b = 0, _c = item.children; _b < _c.length; _b++) {
+                    var child = _c[_b];
+                    if (child.id.toLowerCase().indexOf(filter.toLowerCase()) != -1) {
+                        items.push(item);
+                    }
+                }
             }
             this.update(items);
         };
@@ -2082,17 +2173,13 @@ var INSPECTOR;
             var arr = [];
             // get all canvas2D
             var instances = BABYLON.Canvas2D.instances || [];
-            // Returns true if the id of the given object starts and ends with '###'
-            var shouldExcludeThisPrim = function (obj) {
-                return (obj.id && obj.id.indexOf('###') == 0 && obj.id.lastIndexOf('###', 0) === 0);
-            };
             // Recursive method building the tree panel
             var createNode = function (obj) {
                 if (obj.children && obj.children.length > 0) {
                     var node = new INSPECTOR.TreeItem(_this, new INSPECTOR.Canvas2DAdapter(obj));
                     for (var _i = 0, _a = obj.children; _i < _a.length; _i++) {
                         var child = _a[_i];
-                        if (!shouldExcludeThisPrim(child)) {
+                        if (!INSPECTOR.Helpers.IsSystemName(child.id)) {
                             var n = createNode(child);
                             node.add(n);
                         }
@@ -2106,6 +2193,9 @@ var INSPECTOR;
             };
             for (var _i = 0, instances_1 = instances; _i < instances_1.length; _i++) {
                 var inst = instances_1[_i];
+                if (INSPECTOR.Helpers.IsSystemName(inst.id)) {
+                    continue;
+                }
                 var c2d = inst;
                 var nodes = createNode(c2d);
                 arr.push(nodes);
@@ -2187,17 +2277,44 @@ var INSPECTOR;
         }
         /* Overrides super */
         MeshTab.prototype._getTree = function () {
+            var _this = this;
             var arr = [];
+            // Tab containign mesh already in results
+            var alreadyIn = [];
             // Returns true if the id of the given object starts and ends with '###'
             var shouldExcludeThisMesh = function (obj) {
                 return (obj.name && obj.name.indexOf('###') == 0 && obj.name.lastIndexOf('###', 0) === 0);
             };
+            // Recursive method building the tree panel
+            var createNode = function (obj) {
+                var descendants = obj.getDescendants(true);
+                if (descendants.length > 0) {
+                    var node = new INSPECTOR.TreeItem(_this, new INSPECTOR.MeshAdapter(obj));
+                    alreadyIn.push(node);
+                    for (var _i = 0, descendants_1 = descendants; _i < descendants_1.length; _i++) {
+                        var child = descendants_1[_i];
+                        if (child instanceof BABYLON.AbstractMesh) {
+                            if (!INSPECTOR.Helpers.IsSystemName(child.name)) {
+                                var n = createNode(child);
+                                node.add(n);
+                            }
+                        }
+                    }
+                    node.update();
+                    return node;
+                }
+                else {
+                    alreadyIn.push(obj);
+                    return new INSPECTOR.TreeItem(_this, new INSPECTOR.MeshAdapter(obj));
+                }
+            };
             // get all meshes from the first scene
             var instances = this._inspector.scene;
             for (var _i = 0, _a = instances.meshes; _i < _a.length; _i++) {
                 var mesh = _a[_i];
-                if (!shouldExcludeThisMesh(mesh)) {
-                    arr.push(new INSPECTOR.TreeItem(this, new INSPECTOR.MeshAdapter(mesh)));
+                if (alreadyIn.indexOf(mesh) == -1) {
+                    var node = createNode(mesh);
+                    arr.push(node);
                 }
             }
             return arr;
@@ -3179,32 +3296,135 @@ var INSPECTOR;
             var _this = _super.call(this, 'fa-tags', parent, inspector, 'Display mesh names on the canvas') || this;
             /** True if label are displayed, false otherwise */
             _this._isDisplayed = false;
-            _this._labels = [];
-            _this._transformationMatrix = BABYLON.Matrix.Identity();
+            _this._canvas = null;
+            _this._labelInitialized = false;
+            _this._scene = null;
+            _this._canvas2DLoaded = false;
+            _this._newMeshObserver = null;
+            _this._removedMeshObserver = null;
+            _this._newLightObserver = null;
+            _this._removedLightObserver = null;
+            _this._newCameraObserver = null;
+            _this._removedCameraObserver = null;
+            _this._scene = inspector.scene;
             return _this;
         }
+        LabelTool.prototype.dispose = function () {
+            if (this._newMeshObserver) {
+                this._scene.onNewMeshAddedObservable.remove(this._newMeshObserver);
+                this._scene.onMeshRemovedObservable.remove(this._removedMeshObserver);
+                this._scene.onNewLightAddedObservable.remove(this._newLightObserver);
+                this._scene.onLightRemovedObservable.remove(this._removedLightObserver);
+                this._scene.onNewCameraAddedObservable.remove(this._newCameraObserver);
+                this._scene.onCameraRemovedObservable.remove(this._removedCameraObserver);
+                this._newMeshObserver = this._newLightObserver = this._newCameraObserver = this._removedMeshObserver = this._removedLightObserver = this._removedCameraObserver = null;
+            }
+            this._canvas.dispose();
+            this._canvas = null;
+        };
+        LabelTool.prototype._checkC2DLoaded = function () {
+            if (this._canvas2DLoaded === true) {
+                return true;
+            }
+            if (BABYLON.Canvas2D) {
+                this._canvas2DLoaded = true;
+            }
+            return this._canvas2DLoaded;
+        };
+        LabelTool.prototype._initializeLabels = function () {
+            var _this = this;
+            // Check if the label are already initialized and quit if it's the case
+            if (this._labelInitialized) {
+                return;
+            }
+            // Can't initialize them if the Canvas2D lib is not loaded yet
+            if (!this._checkC2DLoaded()) {
+                return;
+            }
+            // Create the canvas that will be used to display the labels
+            this._canvas = new BABYLON.ScreenSpaceCanvas2D(this._scene, { id: "###Label Canvas###" /*, cachingStrategy: BABYLON.Canvas2D.CACHESTRATEGY_TOPLEVELGROUPS*/ });
+            // Create label for all the Meshes, Lights and Cameras
+            // Those that will be created/removed after this method is called will be taken care by the event handlers added below
+            for (var _i = 0, _a = this._scene.meshes; _i < _a.length; _i++) {
+                var m = _a[_i];
+                this._createLabel(m);
+            }
+            for (var _b = 0, _c = this._scene.lights; _b < _c.length; _b++) {
+                var l = _c[_b];
+                this._createLabel(l);
+            }
+            for (var _d = 0, _e = this._scene.cameras; _d < _e.length; _d++) {
+                var c = _e[_d];
+                this._createLabel(c);
+            }
+            // Add handlers for new/removed meshes, camera and lights
+            this._newMeshObserver = this._scene.onNewMeshAddedObservable.add(function (e, s) {
+                _this._createLabel(e);
+            });
+            this._removedMeshObserver = this._scene.onMeshRemovedObservable.add(function (e, s) {
+                _this._removeLabel(e);
+            });
+            this._newLightObserver = this._scene.onNewLightAddedObservable.add(function (e, s) {
+                _this._createLabel(e);
+            });
+            this._removedLightObserver = this._scene.onLightRemovedObservable.add(function (e, s) {
+                _this._removeLabel(e);
+            });
+            this._newCameraObserver = this._scene.onNewCameraAddedObservable.add(function (e, s) {
+                _this._createLabel(e);
+            });
+            this._removedCameraObserver = this._scene.onCameraRemovedObservable.add(function (e, s) {
+                _this._removeLabel(e);
+            });
+            this._labelInitialized = true;
+        };
+        LabelTool.prototype._createLabel = function (node) {
+            // Don't create label for "system nodes" (starting and ending with ###)
+            var name = node.name;
+            if (INSPECTOR.Helpers.IsSystemName(name)) {
+                return;
+            }
+            var labelGroup = new BABYLON.Group2D({ parent: this._canvas, id: "Label of " + node.name, trackNode: node, origin: BABYLON.Vector2.Zero(),
+                children: [
+                    new BABYLON.Rectangle2D({ id: "LabelRect", x: 0, y: 0, width: 100, height: 30, origin: BABYLON.Vector2.Zero(), border: "#FFFFFFFF", fill: "#808080B0", children: [
+                            new BABYLON.Text2D(node.name, { x: 10, y: 4, fontName: "bold 16px Arial", fontSignedDistanceField: true })
+                        ]
+                    })
+                ] });
+            var r = labelGroup.children[0];
+            var t = r.children[0];
+            var ts = t.textSize.width;
+            r.width = ts + 20;
+            r.height = t.textSize.height + 12;
+            labelGroup.addExternalData("owner", node);
+            return labelGroup;
+        };
+        LabelTool.prototype._removeLabel = function (node) {
+            for (var _i = 0, _a = this._canvas.children; _i < _a.length; _i++) {
+                var g = _a[_i];
+                var ed = g.getExternalData("owner");
+                if (ed === node) {
+                    g.dispose();
+                    break;
+                }
+            }
+        };
         // Action : Display/hide mesh names on the canvas
         LabelTool.prototype.action = function () {
+            // Don't toggle if the script is not loaded
+            if (!this._checkC2DLoaded()) {
+                return;
+            }
+            // Toggle the label display state
+            this._isDisplayed = !this._isDisplayed;
+            // Check if we have to display the labels
             if (this._isDisplayed) {
+                this._initializeLabels();
+                this._canvas.levelVisible = true;
+            }
+            else {
+                this._canvas.levelVisible = false;
             }
-        };
-        LabelTool.prototype._update = function () {
-            this._camera = this._inspector.scene.activeCamera;
-            var engine = this._inspector.scene.getEngine();
-            var viewport = this._camera.viewport;
-            var globalViewport = viewport.toGlobal(engine.getRenderWidth(), engine.getRenderHeight());
-            this._camera.getViewMatrix().multiplyToRef(this._camera.getProjectionMatrix(), this._transformationMatrix);
-            // Old method
-            // let meshes = this._camera.getActiveMeshes();
-            // let projectedPosition: BABYLON.Vector3;
-            // for (let index = 0; index < meshes.length; index++) {
-            //     let mesh = meshes.data[index];
-            //     let position = mesh.getBoundingInfo().boundingSphere.center;
-            //     projectedPosition = BABYLON.Vector3.Project(position, mesh.getWorldMatrix(), this._transformationMatrix, globalViewport);
-            //     this._renderLabel(mesh.name, projectedPosition, 12,
-            //         () => { mesh.renderOverlay = !mesh.renderOverlay },
-            //         () => { return mesh.renderOverlay ? 'red' : 'black'; });
-            // }
         };
         return LabelTool;
     }(INSPECTOR.AbstractTool));
@@ -3304,7 +3524,7 @@ var INSPECTOR;
         __extends(TreeItem, _super);
         function TreeItem(tab, obj) {
             var _this = _super.call(this) || this;
-            _this._children = [];
+            _this.children = [];
             _this._tab = tab;
             _this._adapter = obj;
             _this._tools = _this._adapter.getTools();
@@ -3321,7 +3541,7 @@ var INSPECTOR;
         });
         /** Add the given item as a child of this one */
         TreeItem.prototype.add = function (child) {
-            this._children.push(child);
+            this.children.push(child);
             this.update();
         };
         /**
@@ -3340,8 +3560,8 @@ var INSPECTOR;
         /** hide all children of this item */
         TreeItem.prototype.fold = function () {
             // Do nothing id no children
-            if (this._children.length > 0) {
-                for (var _i = 0, _a = this._children; _i < _a.length; _i++) {
+            if (this.children.length > 0) {
+                for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
                     var elem = _a[_i];
                     elem.toHtml().style.display = 'none';
                 }
@@ -3352,8 +3572,8 @@ var INSPECTOR;
         /** Show all children of this item */
         TreeItem.prototype.unfold = function () {
             // Do nothing id no children
-            if (this._children.length > 0) {
-                for (var _i = 0, _a = this._children; _i < _a.length; _i++) {
+            if (this.children.length > 0) {
+                for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
                     var elem = _a[_i];
                     elem.toHtml().style.display = 'block';
                 }
@@ -3391,12 +3611,12 @@ var INSPECTOR;
         TreeItem.prototype.update = function () {
             // Clean division holding all children
             INSPECTOR.Helpers.CleanDiv(this._lineContent);
-            for (var _i = 0, _a = this._children; _i < _a.length; _i++) {
+            for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
                 var child = _a[_i];
                 var elem = child.toHtml();
                 this._lineContent.appendChild(elem);
             }
-            if (this._children.length > 0) {
+            if (this.children.length > 0) {
                 // Check if folded or not
                 if (!this._div.classList.contains('folded') && !this._div.classList.contains('unfolded')) {
                     this._div.classList.add('folded');
@@ -3436,7 +3656,7 @@ var INSPECTOR;
         TreeItem.prototype.highlight = function (b) {
             // Remove highlight for all children 
             if (!b) {
-                for (var _i = 0, _a = this._children; _i < _a.length; _i++) {
+                for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
                     var child = _a[_i];
                     child._adapter.highlight(b);
                 }
@@ -3451,7 +3671,7 @@ var INSPECTOR;
         /** Set this item as active (background lighter) in the tree panel */
         TreeItem.prototype.active = function (b) {
             this._div.classList.remove('active');
-            for (var _i = 0, _a = this._children; _i < _a.length; _i++) {
+            for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
                 var child = _a[_i];
                 child.active(false);
             }
@@ -3634,7 +3854,7 @@ var INSPECTOR;
             var _this = _super.call(this) || this;
             _this._obj = obj;
             _this._elem.classList.add('fa-info-circle');
-            _this._tooltip = new INSPECTOR.Tooltip(_this._elem, _this._obj.getInfo());
+            _this._tooltip = new INSPECTOR.Tooltip(_this._elem, _this._obj.getInfo(), _this._elem);
             return _this;
         }
         // Nothing to do on click

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
dist/preview release/inspector/babylon.inspector.min.js


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

@@ -431,7 +431,7 @@ declare module BABYLON {
     abstract class GLTFFileLoaderExtension {
         private _name;
         constructor(name: string);
-        name: string;
+        readonly name: string;
         /**
         * Defines an override for loading the runtime
         * Return true to stop further extensions from loading the runtime

+ 27 - 27
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -4,19 +4,20 @@ var BABYLON;
     /**
     * Enums
     */
+    var EComponentType;
     (function (EComponentType) {
         EComponentType[EComponentType["BYTE"] = 5120] = "BYTE";
         EComponentType[EComponentType["UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE";
         EComponentType[EComponentType["SHORT"] = 5122] = "SHORT";
         EComponentType[EComponentType["UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
         EComponentType[EComponentType["FLOAT"] = 5126] = "FLOAT";
-    })(BABYLON.EComponentType || (BABYLON.EComponentType = {}));
-    var EComponentType = BABYLON.EComponentType;
+    })(EComponentType = BABYLON.EComponentType || (BABYLON.EComponentType = {}));
+    var EShaderType;
     (function (EShaderType) {
         EShaderType[EShaderType["FRAGMENT"] = 35632] = "FRAGMENT";
         EShaderType[EShaderType["VERTEX"] = 35633] = "VERTEX";
-    })(BABYLON.EShaderType || (BABYLON.EShaderType = {}));
-    var EShaderType = BABYLON.EShaderType;
+    })(EShaderType = BABYLON.EShaderType || (BABYLON.EShaderType = {}));
+    var EParameterType;
     (function (EParameterType) {
         EParameterType[EParameterType["BYTE"] = 5120] = "BYTE";
         EParameterType[EParameterType["UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE";
@@ -39,14 +40,14 @@ var BABYLON;
         EParameterType[EParameterType["FLOAT_MAT3"] = 35675] = "FLOAT_MAT3";
         EParameterType[EParameterType["FLOAT_MAT4"] = 35676] = "FLOAT_MAT4";
         EParameterType[EParameterType["SAMPLER_2D"] = 35678] = "SAMPLER_2D";
-    })(BABYLON.EParameterType || (BABYLON.EParameterType = {}));
-    var EParameterType = BABYLON.EParameterType;
+    })(EParameterType = BABYLON.EParameterType || (BABYLON.EParameterType = {}));
+    var ETextureWrapMode;
     (function (ETextureWrapMode) {
         ETextureWrapMode[ETextureWrapMode["CLAMP_TO_EDGE"] = 33071] = "CLAMP_TO_EDGE";
         ETextureWrapMode[ETextureWrapMode["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
         ETextureWrapMode[ETextureWrapMode["REPEAT"] = 10497] = "REPEAT";
-    })(BABYLON.ETextureWrapMode || (BABYLON.ETextureWrapMode = {}));
-    var ETextureWrapMode = BABYLON.ETextureWrapMode;
+    })(ETextureWrapMode = BABYLON.ETextureWrapMode || (BABYLON.ETextureWrapMode = {}));
+    var ETextureFilterType;
     (function (ETextureFilterType) {
         ETextureFilterType[ETextureFilterType["NEAREST"] = 9728] = "NEAREST";
         ETextureFilterType[ETextureFilterType["LINEAR"] = 9728] = "LINEAR";
@@ -54,22 +55,22 @@ var BABYLON;
         ETextureFilterType[ETextureFilterType["LINEAR_MIPMAP_NEAREST"] = 9985] = "LINEAR_MIPMAP_NEAREST";
         ETextureFilterType[ETextureFilterType["NEAREST_MIPMAP_LINEAR"] = 9986] = "NEAREST_MIPMAP_LINEAR";
         ETextureFilterType[ETextureFilterType["LINEAR_MIPMAP_LINEAR"] = 9987] = "LINEAR_MIPMAP_LINEAR";
-    })(BABYLON.ETextureFilterType || (BABYLON.ETextureFilterType = {}));
-    var ETextureFilterType = BABYLON.ETextureFilterType;
+    })(ETextureFilterType = BABYLON.ETextureFilterType || (BABYLON.ETextureFilterType = {}));
+    var ETextureFormat;
     (function (ETextureFormat) {
         ETextureFormat[ETextureFormat["ALPHA"] = 6406] = "ALPHA";
         ETextureFormat[ETextureFormat["RGB"] = 6407] = "RGB";
         ETextureFormat[ETextureFormat["RGBA"] = 6408] = "RGBA";
         ETextureFormat[ETextureFormat["LUMINANCE"] = 6409] = "LUMINANCE";
         ETextureFormat[ETextureFormat["LUMINANCE_ALPHA"] = 6410] = "LUMINANCE_ALPHA";
-    })(BABYLON.ETextureFormat || (BABYLON.ETextureFormat = {}));
-    var ETextureFormat = BABYLON.ETextureFormat;
+    })(ETextureFormat = BABYLON.ETextureFormat || (BABYLON.ETextureFormat = {}));
+    var ECullingType;
     (function (ECullingType) {
         ECullingType[ECullingType["FRONT"] = 1028] = "FRONT";
         ECullingType[ECullingType["BACK"] = 1029] = "BACK";
         ECullingType[ECullingType["FRONT_AND_BACK"] = 1032] = "FRONT_AND_BACK";
-    })(BABYLON.ECullingType || (BABYLON.ECullingType = {}));
-    var ECullingType = BABYLON.ECullingType;
+    })(ECullingType = BABYLON.ECullingType || (BABYLON.ECullingType = {}));
+    var EBlendingFunction;
     (function (EBlendingFunction) {
         EBlendingFunction[EBlendingFunction["ZERO"] = 0] = "ZERO";
         EBlendingFunction[EBlendingFunction["ONE"] = 1] = "ONE";
@@ -86,8 +87,7 @@ var BABYLON;
         EBlendingFunction[EBlendingFunction["CONSTANT_ALPHA"] = 32771] = "CONSTANT_ALPHA";
         EBlendingFunction[EBlendingFunction["ONE_MINUS_CONSTANT_ALPHA"] = 32772] = "ONE_MINUS_CONSTANT_ALPHA";
         EBlendingFunction[EBlendingFunction["SRC_ALPHA_SATURATE"] = 776] = "SRC_ALPHA_SATURATE";
-    })(BABYLON.EBlendingFunction || (BABYLON.EBlendingFunction = {}));
-    var EBlendingFunction = BABYLON.EBlendingFunction;
+    })(EBlendingFunction = BABYLON.EBlendingFunction || (BABYLON.EBlendingFunction = {}));
 })(BABYLON || (BABYLON = {}));
 
 //# sourceMappingURL=babylon.glTFFileLoaderInterfaces.js.map
@@ -1503,18 +1503,18 @@ var BABYLON;
                 traverseNodes(gltfRuntime, currentScene.nodes[i], null);
             }
         };
-        /**
-        * Private members
-        */
-        // None
-        /**
-        * Static members
-        */
-        GLTFFileLoader.MakeYUP = false;
-        GLTFFileLoader.HomogeneousCoordinates = false;
-        GLTFFileLoader.Extensions = {};
         return GLTFFileLoader;
     }());
+    /**
+    * Private members
+    */
+    // None
+    /**
+    * Static members
+    */
+    GLTFFileLoader.MakeYUP = false;
+    GLTFFileLoader.HomogeneousCoordinates = false;
+    GLTFFileLoader.Extensions = {};
     BABYLON.GLTFFileLoader = GLTFFileLoader;
     ;
     BABYLON.SceneLoader.RegisterPlugin(new GLTFFileLoader());
@@ -1867,7 +1867,7 @@ var BABYLON;
     var GLTFBinaryExtension = (function (_super) {
         __extends(GLTFBinaryExtension, _super);
         function GLTFBinaryExtension() {
-            _super.call(this, "KHR_binary_glTF");
+            return _super.call(this, "KHR_binary_glTF") || this;
         }
         GLTFBinaryExtension.prototype.loadRuntimeAsync = function (scene, data, rootUrl, onSuccess, onError) {
             var _this = this;

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.min.js


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

@@ -732,9 +732,9 @@ var BABYLON;
             //Return an array with all BABYLON.Mesh
             return babylonMeshesArray;
         };
-        OBJFileLoader.OPTIMIZE_WITH_UV = false;
         return OBJFileLoader;
     }());
+    OBJFileLoader.OPTIMIZE_WITH_UV = false;
     BABYLON.OBJFileLoader = OBJFileLoader;
     //Add this loader into the register plugin
     BABYLON.SceneLoader.RegisterPlugin(new OBJFileLoader());

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js


+ 38 - 36
dist/preview release/materialsLibrary/babylon.fireMaterial.js

@@ -16,33 +16,35 @@ var BABYLON;
     var FireMaterialDefines = (function (_super) {
         __extends(FireMaterialDefines, _super);
         function FireMaterialDefines() {
-            _super.call(this);
-            this.DIFFUSE = false;
-            this.CLIPPLANE = false;
-            this.ALPHATEST = false;
-            this.POINTSIZE = false;
-            this.FOG = false;
-            this.UV1 = false;
-            this.VERTEXCOLOR = false;
-            this.VERTEXALPHA = false;
-            this.BonesPerMesh = 0;
-            this.NUM_BONE_INFLUENCERS = 0;
-            this.INSTANCES = false;
-            this._keys = Object.keys(this);
+            var _this = _super.call(this) || this;
+            _this.DIFFUSE = false;
+            _this.CLIPPLANE = false;
+            _this.ALPHATEST = false;
+            _this.POINTSIZE = false;
+            _this.FOG = false;
+            _this.UV1 = false;
+            _this.VERTEXCOLOR = false;
+            _this.VERTEXALPHA = false;
+            _this.BonesPerMesh = 0;
+            _this.NUM_BONE_INFLUENCERS = 0;
+            _this.INSTANCES = false;
+            _this._keys = Object.keys(_this);
+            return _this;
         }
         return FireMaterialDefines;
     }(BABYLON.MaterialDefines));
     var FireMaterial = (function (_super) {
         __extends(FireMaterial, _super);
         function FireMaterial(name, scene) {
-            _super.call(this, name, scene);
-            this.diffuseColor = new BABYLON.Color3(1, 1, 1);
-            this.speed = 1.0;
-            this._scaledDiffuse = new BABYLON.Color3();
-            this._defines = new FireMaterialDefines();
-            this._cachedDefines = new FireMaterialDefines();
-            this._lastTime = 0;
-            this._cachedDefines.BonesPerMesh = -1;
+            var _this = _super.call(this, name, scene) || this;
+            _this.diffuseColor = new BABYLON.Color3(1, 1, 1);
+            _this.speed = 1.0;
+            _this._scaledDiffuse = new BABYLON.Color3();
+            _this._defines = new FireMaterialDefines();
+            _this._cachedDefines = new FireMaterialDefines();
+            _this._lastTime = 0;
+            _this._cachedDefines.BonesPerMesh = -1;
+            return _this;
         }
         FireMaterial.prototype.needAlphaBlending = function () {
             return (this.alpha < 1.0);
@@ -290,23 +292,23 @@ var BABYLON;
             }
             return material;
         };
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], FireMaterial.prototype, "diffuseTexture", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], FireMaterial.prototype, "distortionTexture", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], FireMaterial.prototype, "opacityTexture", void 0);
-        __decorate([
-            BABYLON.serialize("diffuseColor")
-        ], FireMaterial.prototype, "diffuseColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], FireMaterial.prototype, "speed", void 0);
         return FireMaterial;
     }(BABYLON.Material));
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], FireMaterial.prototype, "diffuseTexture", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], FireMaterial.prototype, "distortionTexture", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], FireMaterial.prototype, "opacityTexture", void 0);
+    __decorate([
+        BABYLON.serialize("diffuseColor")
+    ], FireMaterial.prototype, "diffuseColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], FireMaterial.prototype, "speed", void 0);
     BABYLON.FireMaterial = FireMaterial;
 })(BABYLON || (BABYLON = {}));
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.fireMaterial.min.js


+ 82 - 80
dist/preview release/materialsLibrary/babylon.furMaterial.js

@@ -16,47 +16,49 @@ var BABYLON;
     var FurMaterialDefines = (function (_super) {
         __extends(FurMaterialDefines, _super);
         function FurMaterialDefines() {
-            _super.call(this);
-            this.DIFFUSE = false;
-            this.HEIGHTMAP = false;
-            this.CLIPPLANE = false;
-            this.ALPHATEST = false;
-            this.POINTSIZE = false;
-            this.FOG = false;
-            this.NORMAL = false;
-            this.UV1 = false;
-            this.UV2 = false;
-            this.VERTEXCOLOR = false;
-            this.VERTEXALPHA = false;
-            this.NUM_BONE_INFLUENCERS = 0;
-            this.BonesPerMesh = 0;
-            this.INSTANCES = false;
-            this.HIGHLEVEL = false;
-            this.rebuild();
+            var _this = _super.call(this) || this;
+            _this.DIFFUSE = false;
+            _this.HEIGHTMAP = false;
+            _this.CLIPPLANE = false;
+            _this.ALPHATEST = false;
+            _this.POINTSIZE = false;
+            _this.FOG = false;
+            _this.NORMAL = false;
+            _this.UV1 = false;
+            _this.UV2 = false;
+            _this.VERTEXCOLOR = false;
+            _this.VERTEXALPHA = false;
+            _this.NUM_BONE_INFLUENCERS = 0;
+            _this.BonesPerMesh = 0;
+            _this.INSTANCES = false;
+            _this.HIGHLEVEL = false;
+            _this.rebuild();
+            return _this;
         }
         return FurMaterialDefines;
     }(BABYLON.MaterialDefines));
     var FurMaterial = (function (_super) {
         __extends(FurMaterial, _super);
         function FurMaterial(name, scene) {
-            _super.call(this, name, scene);
-            this.diffuseColor = new BABYLON.Color3(1, 1, 1);
-            this.furLength = 1;
-            this.furAngle = 0;
-            this.furColor = new BABYLON.Color3(0.44, 0.21, 0.02);
-            this.furOffset = 0.0;
-            this.furSpacing = 12;
-            this.furGravity = new BABYLON.Vector3(0, 0, 0);
-            this.furSpeed = 100;
-            this.furDensity = 20;
-            this.disableLighting = false;
-            this.highLevelFur = true;
-            this.maxSimultaneousLights = 4;
-            this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
-            this._furTime = 0;
-            this._defines = new FurMaterialDefines();
-            this._cachedDefines = new FurMaterialDefines();
-            this._cachedDefines.BonesPerMesh = -1;
+            var _this = _super.call(this, name, scene) || this;
+            _this.diffuseColor = new BABYLON.Color3(1, 1, 1);
+            _this.furLength = 1;
+            _this.furAngle = 0;
+            _this.furColor = new BABYLON.Color3(0.44, 0.21, 0.02);
+            _this.furOffset = 0.0;
+            _this.furSpacing = 12;
+            _this.furGravity = new BABYLON.Vector3(0, 0, 0);
+            _this.furSpeed = 100;
+            _this.furDensity = 20;
+            _this.disableLighting = false;
+            _this.highLevelFur = true;
+            _this.maxSimultaneousLights = 4;
+            _this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
+            _this._furTime = 0;
+            _this._defines = new FurMaterialDefines();
+            _this._cachedDefines = new FurMaterialDefines();
+            _this._cachedDefines.BonesPerMesh = -1;
+            return _this;
         }
         Object.defineProperty(FurMaterial.prototype, "furTime", {
             get: function () {
@@ -408,53 +410,53 @@ var BABYLON;
             sourceMesh.material._meshes = meshes;
             return meshes;
         };
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], FurMaterial.prototype, "diffuseTexture", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], FurMaterial.prototype, "heightTexture", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], FurMaterial.prototype, "diffuseColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], FurMaterial.prototype, "furLength", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], FurMaterial.prototype, "furAngle", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], FurMaterial.prototype, "furColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], FurMaterial.prototype, "furOffset", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], FurMaterial.prototype, "furSpacing", void 0);
-        __decorate([
-            BABYLON.serializeAsVector3()
-        ], FurMaterial.prototype, "furGravity", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], FurMaterial.prototype, "furSpeed", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], FurMaterial.prototype, "furDensity", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], FurMaterial.prototype, "disableLighting", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], FurMaterial.prototype, "highLevelFur", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], FurMaterial.prototype, "maxSimultaneousLights", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], FurMaterial.prototype, "furTime", null);
         return FurMaterial;
     }(BABYLON.Material));
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], FurMaterial.prototype, "diffuseTexture", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], FurMaterial.prototype, "heightTexture", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], FurMaterial.prototype, "diffuseColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], FurMaterial.prototype, "furLength", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], FurMaterial.prototype, "furAngle", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], FurMaterial.prototype, "furColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], FurMaterial.prototype, "furOffset", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], FurMaterial.prototype, "furSpacing", void 0);
+    __decorate([
+        BABYLON.serializeAsVector3()
+    ], FurMaterial.prototype, "furGravity", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], FurMaterial.prototype, "furSpeed", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], FurMaterial.prototype, "furDensity", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], FurMaterial.prototype, "disableLighting", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], FurMaterial.prototype, "highLevelFur", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], FurMaterial.prototype, "maxSimultaneousLights", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], FurMaterial.prototype, "furTime", null);
     BABYLON.FurMaterial = FurMaterial;
 })(BABYLON || (BABYLON = {}));
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.furMaterial.min.js


+ 84 - 82
dist/preview release/materialsLibrary/babylon.gradientMaterial.js

@@ -16,76 +16,78 @@ var BABYLON;
     var GradientMaterialDefines = (function (_super) {
         __extends(GradientMaterialDefines, _super);
         function GradientMaterialDefines() {
-            _super.call(this);
-            this.DIFFUSE = false;
-            this.CLIPPLANE = false;
-            this.ALPHATEST = false;
-            this.POINTSIZE = false;
-            this.FOG = false;
-            this.LIGHT0 = false;
-            this.LIGHT1 = false;
-            this.LIGHT2 = false;
-            this.LIGHT3 = false;
-            this.SPOTLIGHT0 = false;
-            this.SPOTLIGHT1 = false;
-            this.SPOTLIGHT2 = false;
-            this.SPOTLIGHT3 = false;
-            this.HEMILIGHT0 = false;
-            this.HEMILIGHT1 = false;
-            this.HEMILIGHT2 = false;
-            this.HEMILIGHT3 = false;
-            this.DIRLIGHT0 = false;
-            this.DIRLIGHT1 = false;
-            this.DIRLIGHT2 = false;
-            this.DIRLIGHT3 = false;
-            this.POINTLIGHT0 = false;
-            this.POINTLIGHT1 = false;
-            this.POINTLIGHT2 = false;
-            this.POINTLIGHT3 = false;
-            this.SHADOW0 = false;
-            this.SHADOW1 = false;
-            this.SHADOW2 = false;
-            this.SHADOW3 = false;
-            this.SHADOWS = false;
-            this.SHADOWVSM0 = false;
-            this.SHADOWVSM1 = false;
-            this.SHADOWVSM2 = false;
-            this.SHADOWVSM3 = false;
-            this.SHADOWPCF0 = false;
-            this.SHADOWPCF1 = false;
-            this.SHADOWPCF2 = false;
-            this.SHADOWPCF3 = false;
-            this.NORMAL = false;
-            this.UV1 = false;
-            this.UV2 = false;
-            this.VERTEXCOLOR = false;
-            this.VERTEXALPHA = false;
-            this.NUM_BONE_INFLUENCERS = 0;
-            this.BonesPerMesh = 0;
-            this.INSTANCES = false;
-            this._keys = Object.keys(this);
+            var _this = _super.call(this) || this;
+            _this.DIFFUSE = false;
+            _this.CLIPPLANE = false;
+            _this.ALPHATEST = false;
+            _this.POINTSIZE = false;
+            _this.FOG = false;
+            _this.LIGHT0 = false;
+            _this.LIGHT1 = false;
+            _this.LIGHT2 = false;
+            _this.LIGHT3 = false;
+            _this.SPOTLIGHT0 = false;
+            _this.SPOTLIGHT1 = false;
+            _this.SPOTLIGHT2 = false;
+            _this.SPOTLIGHT3 = false;
+            _this.HEMILIGHT0 = false;
+            _this.HEMILIGHT1 = false;
+            _this.HEMILIGHT2 = false;
+            _this.HEMILIGHT3 = false;
+            _this.DIRLIGHT0 = false;
+            _this.DIRLIGHT1 = false;
+            _this.DIRLIGHT2 = false;
+            _this.DIRLIGHT3 = false;
+            _this.POINTLIGHT0 = false;
+            _this.POINTLIGHT1 = false;
+            _this.POINTLIGHT2 = false;
+            _this.POINTLIGHT3 = false;
+            _this.SHADOW0 = false;
+            _this.SHADOW1 = false;
+            _this.SHADOW2 = false;
+            _this.SHADOW3 = false;
+            _this.SHADOWS = false;
+            _this.SHADOWVSM0 = false;
+            _this.SHADOWVSM1 = false;
+            _this.SHADOWVSM2 = false;
+            _this.SHADOWVSM3 = false;
+            _this.SHADOWPCF0 = false;
+            _this.SHADOWPCF1 = false;
+            _this.SHADOWPCF2 = false;
+            _this.SHADOWPCF3 = false;
+            _this.NORMAL = false;
+            _this.UV1 = false;
+            _this.UV2 = false;
+            _this.VERTEXCOLOR = false;
+            _this.VERTEXALPHA = false;
+            _this.NUM_BONE_INFLUENCERS = 0;
+            _this.BonesPerMesh = 0;
+            _this.INSTANCES = false;
+            _this._keys = Object.keys(_this);
+            return _this;
         }
         return GradientMaterialDefines;
     }(BABYLON.MaterialDefines));
     var GradientMaterial = (function (_super) {
         __extends(GradientMaterial, _super);
         function GradientMaterial(name, scene) {
-            _super.call(this, name, scene);
+            var _this = _super.call(this, name, scene) || this;
             // The gradient top color, red by default
-            this.topColor = new BABYLON.Color3(1, 0, 0);
-            this.topColorAlpha = 1.0;
+            _this.topColor = new BABYLON.Color3(1, 0, 0);
+            _this.topColorAlpha = 1.0;
             // The gradient top color, blue by default
-            this.bottomColor = new BABYLON.Color3(0, 0, 1);
-            this.bottomColorAlpha = 1.0;
+            _this.bottomColor = new BABYLON.Color3(0, 0, 1);
+            _this.bottomColorAlpha = 1.0;
             // Gradient offset
-            this.offset = 0;
-            this.smoothness = 1.0;
-            this.disableLighting = false;
-            this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
-            this._scaledDiffuse = new BABYLON.Color3();
-            this._defines = new GradientMaterialDefines();
-            this._cachedDefines = new GradientMaterialDefines();
-            this._cachedDefines.BonesPerMesh = -1;
+            _this.offset = 0;
+            _this.smoothness = 1.0;
+            _this.disableLighting = false;
+            _this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
+            _this._scaledDiffuse = new BABYLON.Color3();
+            _this._defines = new GradientMaterialDefines();
+            _this._cachedDefines = new GradientMaterialDefines();
+            _this._cachedDefines.BonesPerMesh = -1;
+            return _this;
         }
         GradientMaterial.prototype.needAlphaBlending = function () {
             return (this.alpha < 1.0 || this.topColorAlpha < 1.0 || this.bottomColorAlpha < 1.0);
@@ -288,29 +290,29 @@ var BABYLON;
         GradientMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new GradientMaterial(source.name, scene); }, source, scene, rootUrl);
         };
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], GradientMaterial.prototype, "topColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], GradientMaterial.prototype, "topColorAlpha", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], GradientMaterial.prototype, "bottomColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], GradientMaterial.prototype, "bottomColorAlpha", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], GradientMaterial.prototype, "offset", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], GradientMaterial.prototype, "smoothness", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], GradientMaterial.prototype, "disableLighting", void 0);
         return GradientMaterial;
     }(BABYLON.Material));
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], GradientMaterial.prototype, "topColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], GradientMaterial.prototype, "topColorAlpha", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], GradientMaterial.prototype, "bottomColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], GradientMaterial.prototype, "bottomColorAlpha", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], GradientMaterial.prototype, "offset", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], GradientMaterial.prototype, "smoothness", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], GradientMaterial.prototype, "disableLighting", void 0);
     BABYLON.GradientMaterial = GradientMaterial;
 })(BABYLON || (BABYLON = {}));
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js


+ 34 - 32
dist/preview release/materialsLibrary/babylon.gridMaterial.js

@@ -15,10 +15,11 @@ var BABYLON;
     var GRIDMaterialDefines = (function (_super) {
         __extends(GRIDMaterialDefines, _super);
         function GRIDMaterialDefines() {
-            _super.call(this);
-            this.TRANSPARENT = false;
-            this.FOG = false;
-            this._keys = Object.keys(this);
+            var _this = _super.call(this) || this;
+            _this.TRANSPARENT = false;
+            _this.FOG = false;
+            _this._keys = Object.keys(_this);
+            return _this;
         }
         return GRIDMaterialDefines;
     }(BABYLON.MaterialDefines));
@@ -34,34 +35,35 @@ var BABYLON;
          * @param scene The scene the material is used in.
          */
         function GridMaterial(name, scene) {
-            _super.call(this, name, scene);
+            var _this = _super.call(this, name, scene) || this;
             /**
              * Main color of the grid (e.g. between lines)
              */
-            this.mainColor = BABYLON.Color3.White();
+            _this.mainColor = BABYLON.Color3.White();
             /**
              * Color of the grid lines.
              */
-            this.lineColor = BABYLON.Color3.Black();
+            _this.lineColor = BABYLON.Color3.Black();
             /**
              * The scale of the grid compared to unit.
              */
-            this.gridRatio = 1.0;
+            _this.gridRatio = 1.0;
             /**
              * The frequency of thicker lines.
              */
-            this.majorUnitFrequency = 10;
+            _this.majorUnitFrequency = 10;
             /**
              * The visibility of minor units in the grid.
              */
-            this.minorUnitVisibility = 0.33;
+            _this.minorUnitVisibility = 0.33;
             /**
              * The grid opacity outside of the lines.
              */
-            this.opacity = 1.0;
-            this._gridControl = new BABYLON.Vector4(this.gridRatio, this.majorUnitFrequency, this.minorUnitVisibility, this.opacity);
-            this._defines = new GRIDMaterialDefines();
-            this._cachedDefines = new GRIDMaterialDefines();
+            _this.opacity = 1.0;
+            _this._gridControl = new BABYLON.Vector4(_this.gridRatio, _this.majorUnitFrequency, _this.minorUnitVisibility, _this.opacity);
+            _this._defines = new GRIDMaterialDefines();
+            _this._cachedDefines = new GRIDMaterialDefines();
+            return _this;
         }
         /**
          * Returns wehter or not the grid requires alpha blending.
@@ -164,26 +166,26 @@ var BABYLON;
         GridMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new GridMaterial(source.name, scene); }, source, scene, rootUrl);
         };
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], GridMaterial.prototype, "mainColor", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], GridMaterial.prototype, "lineColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], GridMaterial.prototype, "gridRatio", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], GridMaterial.prototype, "majorUnitFrequency", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], GridMaterial.prototype, "minorUnitVisibility", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], GridMaterial.prototype, "opacity", void 0);
         return GridMaterial;
     }(BABYLON.Material));
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], GridMaterial.prototype, "mainColor", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], GridMaterial.prototype, "lineColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], GridMaterial.prototype, "gridRatio", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], GridMaterial.prototype, "majorUnitFrequency", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], GridMaterial.prototype, "minorUnitVisibility", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], GridMaterial.prototype, "opacity", void 0);
     BABYLON.GridMaterial = GridMaterial;
 })(BABYLON || (BABYLON = {}));
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.gridMaterial.min.js


+ 94 - 92
dist/preview release/materialsLibrary/babylon.lavaMaterial.js

@@ -15,74 +15,76 @@ var BABYLON;
     var LavaMaterialDefines = (function (_super) {
         __extends(LavaMaterialDefines, _super);
         function LavaMaterialDefines() {
-            _super.call(this);
-            this.DIFFUSE = false;
-            this.CLIPPLANE = false;
-            this.ALPHATEST = false;
-            this.POINTSIZE = false;
-            this.FOG = false;
-            this.LIGHT0 = false;
-            this.LIGHT1 = false;
-            this.LIGHT2 = false;
-            this.LIGHT3 = false;
-            this.SPOTLIGHT0 = false;
-            this.SPOTLIGHT1 = false;
-            this.SPOTLIGHT2 = false;
-            this.SPOTLIGHT3 = false;
-            this.HEMILIGHT0 = false;
-            this.HEMILIGHT1 = false;
-            this.HEMILIGHT2 = false;
-            this.HEMILIGHT3 = false;
-            this.DIRLIGHT0 = false;
-            this.DIRLIGHT1 = false;
-            this.DIRLIGHT2 = false;
-            this.DIRLIGHT3 = false;
-            this.POINTLIGHT0 = false;
-            this.POINTLIGHT1 = false;
-            this.POINTLIGHT2 = false;
-            this.POINTLIGHT3 = false;
-            this.SHADOW0 = false;
-            this.SHADOW1 = false;
-            this.SHADOW2 = false;
-            this.SHADOW3 = false;
-            this.SHADOWS = false;
-            this.SHADOWVSM0 = false;
-            this.SHADOWVSM1 = false;
-            this.SHADOWVSM2 = false;
-            this.SHADOWVSM3 = false;
-            this.SHADOWPCF0 = false;
-            this.SHADOWPCF1 = false;
-            this.SHADOWPCF2 = false;
-            this.SHADOWPCF3 = false;
-            this.NORMAL = false;
-            this.UV1 = false;
-            this.UV2 = false;
-            this.VERTEXCOLOR = false;
-            this.VERTEXALPHA = false;
-            this.NUM_BONE_INFLUENCERS = 0;
-            this.BonesPerMesh = 0;
-            this.INSTANCES = false;
-            this._keys = Object.keys(this);
+            var _this = _super.call(this) || this;
+            _this.DIFFUSE = false;
+            _this.CLIPPLANE = false;
+            _this.ALPHATEST = false;
+            _this.POINTSIZE = false;
+            _this.FOG = false;
+            _this.LIGHT0 = false;
+            _this.LIGHT1 = false;
+            _this.LIGHT2 = false;
+            _this.LIGHT3 = false;
+            _this.SPOTLIGHT0 = false;
+            _this.SPOTLIGHT1 = false;
+            _this.SPOTLIGHT2 = false;
+            _this.SPOTLIGHT3 = false;
+            _this.HEMILIGHT0 = false;
+            _this.HEMILIGHT1 = false;
+            _this.HEMILIGHT2 = false;
+            _this.HEMILIGHT3 = false;
+            _this.DIRLIGHT0 = false;
+            _this.DIRLIGHT1 = false;
+            _this.DIRLIGHT2 = false;
+            _this.DIRLIGHT3 = false;
+            _this.POINTLIGHT0 = false;
+            _this.POINTLIGHT1 = false;
+            _this.POINTLIGHT2 = false;
+            _this.POINTLIGHT3 = false;
+            _this.SHADOW0 = false;
+            _this.SHADOW1 = false;
+            _this.SHADOW2 = false;
+            _this.SHADOW3 = false;
+            _this.SHADOWS = false;
+            _this.SHADOWVSM0 = false;
+            _this.SHADOWVSM1 = false;
+            _this.SHADOWVSM2 = false;
+            _this.SHADOWVSM3 = false;
+            _this.SHADOWPCF0 = false;
+            _this.SHADOWPCF1 = false;
+            _this.SHADOWPCF2 = false;
+            _this.SHADOWPCF3 = false;
+            _this.NORMAL = false;
+            _this.UV1 = false;
+            _this.UV2 = false;
+            _this.VERTEXCOLOR = false;
+            _this.VERTEXALPHA = false;
+            _this.NUM_BONE_INFLUENCERS = 0;
+            _this.BonesPerMesh = 0;
+            _this.INSTANCES = false;
+            _this._keys = Object.keys(_this);
+            return _this;
         }
         return LavaMaterialDefines;
     }(BABYLON.MaterialDefines));
     var LavaMaterial = (function (_super) {
         __extends(LavaMaterial, _super);
         function LavaMaterial(name, scene) {
-            _super.call(this, name, scene);
-            this.speed = 1;
-            this.movingSpeed = 1;
-            this.lowFrequencySpeed = 1;
-            this.fogDensity = 0.15;
-            this._lastTime = 0;
-            this.diffuseColor = new BABYLON.Color3(1, 1, 1);
-            this.disableLighting = false;
-            this.maxSimultaneousLights = 4;
-            this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
-            this._scaledDiffuse = new BABYLON.Color3();
-            this._defines = new LavaMaterialDefines();
-            this._cachedDefines = new LavaMaterialDefines();
-            this._cachedDefines.BonesPerMesh = -1;
+            var _this = _super.call(this, name, scene) || this;
+            _this.speed = 1;
+            _this.movingSpeed = 1;
+            _this.lowFrequencySpeed = 1;
+            _this.fogDensity = 0.15;
+            _this._lastTime = 0;
+            _this.diffuseColor = new BABYLON.Color3(1, 1, 1);
+            _this.disableLighting = false;
+            _this.maxSimultaneousLights = 4;
+            _this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
+            _this._scaledDiffuse = new BABYLON.Color3();
+            _this._defines = new LavaMaterialDefines();
+            _this._cachedDefines = new LavaMaterialDefines();
+            _this._cachedDefines.BonesPerMesh = -1;
+            return _this;
         }
         LavaMaterial.prototype.needAlphaBlending = function () {
             return (this.alpha < 1.0);
@@ -323,38 +325,38 @@ var BABYLON;
         LavaMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new LavaMaterial(source.name, scene); }, source, scene, rootUrl);
         };
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], LavaMaterial.prototype, "diffuseTexture", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], LavaMaterial.prototype, "noiseTexture", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], LavaMaterial.prototype, "fogColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], LavaMaterial.prototype, "speed", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], LavaMaterial.prototype, "movingSpeed", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], LavaMaterial.prototype, "lowFrequencySpeed", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], LavaMaterial.prototype, "fogDensity", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], LavaMaterial.prototype, "diffuseColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], LavaMaterial.prototype, "disableLighting", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], LavaMaterial.prototype, "maxSimultaneousLights", void 0);
         return LavaMaterial;
     }(BABYLON.Material));
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], LavaMaterial.prototype, "diffuseTexture", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], LavaMaterial.prototype, "noiseTexture", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], LavaMaterial.prototype, "fogColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], LavaMaterial.prototype, "speed", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], LavaMaterial.prototype, "movingSpeed", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], LavaMaterial.prototype, "lowFrequencySpeed", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], LavaMaterial.prototype, "fogDensity", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], LavaMaterial.prototype, "diffuseColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], LavaMaterial.prototype, "disableLighting", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], LavaMaterial.prototype, "maxSimultaneousLights", void 0);
     BABYLON.LavaMaterial = LavaMaterial;
 })(BABYLON || (BABYLON = {}));
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js


+ 67 - 65
dist/preview release/materialsLibrary/babylon.normalMaterial.js

@@ -15,68 +15,70 @@ var BABYLON;
     var NormalMaterialDefines = (function (_super) {
         __extends(NormalMaterialDefines, _super);
         function NormalMaterialDefines() {
-            _super.call(this);
-            this.DIFFUSE = false;
-            this.CLIPPLANE = false;
-            this.ALPHATEST = false;
-            this.POINTSIZE = false;
-            this.FOG = false;
-            this.LIGHT0 = false;
-            this.LIGHT1 = false;
-            this.LIGHT2 = false;
-            this.LIGHT3 = false;
-            this.SPOTLIGHT0 = false;
-            this.SPOTLIGHT1 = false;
-            this.SPOTLIGHT2 = false;
-            this.SPOTLIGHT3 = false;
-            this.HEMILIGHT0 = false;
-            this.HEMILIGHT1 = false;
-            this.HEMILIGHT2 = false;
-            this.HEMILIGHT3 = false;
-            this.DIRLIGHT0 = false;
-            this.DIRLIGHT1 = false;
-            this.DIRLIGHT2 = false;
-            this.DIRLIGHT3 = false;
-            this.POINTLIGHT0 = false;
-            this.POINTLIGHT1 = false;
-            this.POINTLIGHT2 = false;
-            this.POINTLIGHT3 = false;
-            this.SHADOW0 = false;
-            this.SHADOW1 = false;
-            this.SHADOW2 = false;
-            this.SHADOW3 = false;
-            this.SHADOWS = false;
-            this.SHADOWVSM0 = false;
-            this.SHADOWVSM1 = false;
-            this.SHADOWVSM2 = false;
-            this.SHADOWVSM3 = false;
-            this.SHADOWPCF0 = false;
-            this.SHADOWPCF1 = false;
-            this.SHADOWPCF2 = false;
-            this.SHADOWPCF3 = false;
-            this.NORMAL = false;
-            this.UV1 = false;
-            this.UV2 = false;
-            this.VERTEXCOLOR = false;
-            this.VERTEXALPHA = false;
-            this.NUM_BONE_INFLUENCERS = 0;
-            this.BonesPerMesh = 0;
-            this.INSTANCES = false;
-            this._keys = Object.keys(this);
+            var _this = _super.call(this) || this;
+            _this.DIFFUSE = false;
+            _this.CLIPPLANE = false;
+            _this.ALPHATEST = false;
+            _this.POINTSIZE = false;
+            _this.FOG = false;
+            _this.LIGHT0 = false;
+            _this.LIGHT1 = false;
+            _this.LIGHT2 = false;
+            _this.LIGHT3 = false;
+            _this.SPOTLIGHT0 = false;
+            _this.SPOTLIGHT1 = false;
+            _this.SPOTLIGHT2 = false;
+            _this.SPOTLIGHT3 = false;
+            _this.HEMILIGHT0 = false;
+            _this.HEMILIGHT1 = false;
+            _this.HEMILIGHT2 = false;
+            _this.HEMILIGHT3 = false;
+            _this.DIRLIGHT0 = false;
+            _this.DIRLIGHT1 = false;
+            _this.DIRLIGHT2 = false;
+            _this.DIRLIGHT3 = false;
+            _this.POINTLIGHT0 = false;
+            _this.POINTLIGHT1 = false;
+            _this.POINTLIGHT2 = false;
+            _this.POINTLIGHT3 = false;
+            _this.SHADOW0 = false;
+            _this.SHADOW1 = false;
+            _this.SHADOW2 = false;
+            _this.SHADOW3 = false;
+            _this.SHADOWS = false;
+            _this.SHADOWVSM0 = false;
+            _this.SHADOWVSM1 = false;
+            _this.SHADOWVSM2 = false;
+            _this.SHADOWVSM3 = false;
+            _this.SHADOWPCF0 = false;
+            _this.SHADOWPCF1 = false;
+            _this.SHADOWPCF2 = false;
+            _this.SHADOWPCF3 = false;
+            _this.NORMAL = false;
+            _this.UV1 = false;
+            _this.UV2 = false;
+            _this.VERTEXCOLOR = false;
+            _this.VERTEXALPHA = false;
+            _this.NUM_BONE_INFLUENCERS = 0;
+            _this.BonesPerMesh = 0;
+            _this.INSTANCES = false;
+            _this._keys = Object.keys(_this);
+            return _this;
         }
         return NormalMaterialDefines;
     }(BABYLON.MaterialDefines));
     var NormalMaterial = (function (_super) {
         __extends(NormalMaterial, _super);
         function NormalMaterial(name, scene) {
-            _super.call(this, name, scene);
-            this.diffuseColor = new BABYLON.Color3(1, 1, 1);
-            this.disableLighting = false;
-            this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
-            this._scaledDiffuse = new BABYLON.Color3();
-            this._defines = new NormalMaterialDefines();
-            this._cachedDefines = new NormalMaterialDefines();
-            this._cachedDefines.BonesPerMesh = -1;
+            var _this = _super.call(this, name, scene) || this;
+            _this.diffuseColor = new BABYLON.Color3(1, 1, 1);
+            _this.disableLighting = false;
+            _this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
+            _this._scaledDiffuse = new BABYLON.Color3();
+            _this._defines = new NormalMaterialDefines();
+            _this._cachedDefines = new NormalMaterialDefines();
+            _this._cachedDefines.BonesPerMesh = -1;
+            return _this;
         }
         NormalMaterial.prototype.needAlphaBlending = function () {
             return (this.alpha < 1.0);
@@ -299,17 +301,17 @@ var BABYLON;
         NormalMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new NormalMaterial(source.name, scene); }, source, scene, rootUrl);
         };
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], NormalMaterial.prototype, "diffuseTexture", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], NormalMaterial.prototype, "diffuseColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], NormalMaterial.prototype, "disableLighting", void 0);
         return NormalMaterial;
     }(BABYLON.Material));
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], NormalMaterial.prototype, "diffuseTexture", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], NormalMaterial.prototype, "diffuseColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], NormalMaterial.prototype, "disableLighting", void 0);
     BABYLON.NormalMaterial = NormalMaterial;
 })(BABYLON || (BABYLON = {}));
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.normalMaterial.min.js


+ 38 - 36
dist/preview release/materialsLibrary/babylon.simpleMaterial.js

@@ -15,36 +15,38 @@ var BABYLON;
     var SimpleMaterialDefines = (function (_super) {
         __extends(SimpleMaterialDefines, _super);
         function SimpleMaterialDefines() {
-            _super.call(this);
-            this.DIFFUSE = false;
-            this.CLIPPLANE = false;
-            this.ALPHATEST = false;
-            this.POINTSIZE = false;
-            this.FOG = false;
-            this.NORMAL = false;
-            this.UV1 = false;
-            this.UV2 = false;
-            this.VERTEXCOLOR = false;
-            this.VERTEXALPHA = false;
-            this.NUM_BONE_INFLUENCERS = 0;
-            this.BonesPerMesh = 0;
-            this.INSTANCES = false;
-            this.rebuild();
+            var _this = _super.call(this) || this;
+            _this.DIFFUSE = false;
+            _this.CLIPPLANE = false;
+            _this.ALPHATEST = false;
+            _this.POINTSIZE = false;
+            _this.FOG = false;
+            _this.NORMAL = false;
+            _this.UV1 = false;
+            _this.UV2 = false;
+            _this.VERTEXCOLOR = false;
+            _this.VERTEXALPHA = false;
+            _this.NUM_BONE_INFLUENCERS = 0;
+            _this.BonesPerMesh = 0;
+            _this.INSTANCES = false;
+            _this.rebuild();
+            return _this;
         }
         return SimpleMaterialDefines;
     }(BABYLON.MaterialDefines));
     var SimpleMaterial = (function (_super) {
         __extends(SimpleMaterial, _super);
         function SimpleMaterial(name, scene) {
-            _super.call(this, name, scene);
-            this.diffuseColor = new BABYLON.Color3(1, 1, 1);
-            this.disableLighting = false;
-            this.maxSimultaneousLights = 4;
-            this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
-            this._scaledDiffuse = new BABYLON.Color3();
-            this._defines = new SimpleMaterialDefines();
-            this._cachedDefines = new SimpleMaterialDefines();
-            this._cachedDefines.BonesPerMesh = -1;
+            var _this = _super.call(this, name, scene) || this;
+            _this.diffuseColor = new BABYLON.Color3(1, 1, 1);
+            _this.disableLighting = false;
+            _this.maxSimultaneousLights = 4;
+            _this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
+            _this._scaledDiffuse = new BABYLON.Color3();
+            _this._defines = new SimpleMaterialDefines();
+            _this._cachedDefines = new SimpleMaterialDefines();
+            _this._cachedDefines.BonesPerMesh = -1;
+            return _this;
         }
         SimpleMaterial.prototype.needAlphaBlending = function () {
             return (this.alpha < 1.0);
@@ -262,20 +264,20 @@ var BABYLON;
         SimpleMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new SimpleMaterial(source.name, scene); }, source, scene, rootUrl);
         };
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], SimpleMaterial.prototype, "diffuseTexture", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3("diffuseColor")
-        ], SimpleMaterial.prototype, "diffuseColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], SimpleMaterial.prototype, "disableLighting", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], SimpleMaterial.prototype, "maxSimultaneousLights", void 0);
         return SimpleMaterial;
     }(BABYLON.Material));
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], SimpleMaterial.prototype, "diffuseTexture", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3("diffuseColor")
+    ], SimpleMaterial.prototype, "diffuseColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], SimpleMaterial.prototype, "disableLighting", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], SimpleMaterial.prototype, "maxSimultaneousLights", void 0);
     BABYLON.SimpleMaterial = SimpleMaterial;
 })(BABYLON || (BABYLON = {}));
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js


+ 53 - 51
dist/preview release/materialsLibrary/babylon.skyMaterial.js

@@ -15,35 +15,37 @@ var BABYLON;
     var SkyMaterialDefines = (function (_super) {
         __extends(SkyMaterialDefines, _super);
         function SkyMaterialDefines() {
-            _super.call(this);
-            this.CLIPPLANE = false;
-            this.POINTSIZE = false;
-            this.FOG = false;
-            this.VERTEXCOLOR = false;
-            this.VERTEXALPHA = false;
-            this._keys = Object.keys(this);
+            var _this = _super.call(this) || this;
+            _this.CLIPPLANE = false;
+            _this.POINTSIZE = false;
+            _this.FOG = false;
+            _this.VERTEXCOLOR = false;
+            _this.VERTEXALPHA = false;
+            _this._keys = Object.keys(_this);
+            return _this;
         }
         return SkyMaterialDefines;
     }(BABYLON.MaterialDefines));
     var SkyMaterial = (function (_super) {
         __extends(SkyMaterial, _super);
         function SkyMaterial(name, scene) {
-            _super.call(this, name, scene);
+            var _this = _super.call(this, name, scene) || this;
             // Public members
-            this.luminance = 1.0;
-            this.turbidity = 10.0;
-            this.rayleigh = 2.0;
-            this.mieCoefficient = 0.005;
-            this.mieDirectionalG = 0.8;
-            this.distance = 500;
-            this.inclination = 0.49;
-            this.azimuth = 0.25;
-            this.sunPosition = new BABYLON.Vector3(0, 100, 0);
-            this.useSunPosition = false;
+            _this.luminance = 1.0;
+            _this.turbidity = 10.0;
+            _this.rayleigh = 2.0;
+            _this.mieCoefficient = 0.005;
+            _this.mieDirectionalG = 0.8;
+            _this.distance = 500;
+            _this.inclination = 0.49;
+            _this.azimuth = 0.25;
+            _this.sunPosition = new BABYLON.Vector3(0, 100, 0);
+            _this.useSunPosition = false;
             // Private members
-            this._cameraPosition = BABYLON.Vector3.Zero();
-            this._defines = new SkyMaterialDefines();
-            this._cachedDefines = new SkyMaterialDefines();
+            _this._cameraPosition = BABYLON.Vector3.Zero();
+            _this._defines = new SkyMaterialDefines();
+            _this._cachedDefines = new SkyMaterialDefines();
+            return _this;
         }
         SkyMaterial.prototype.needAlphaBlending = function () {
             return (this.alpha < 1.0);
@@ -207,38 +209,38 @@ var BABYLON;
         SkyMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new SkyMaterial(source.name, scene); }, source, scene, rootUrl);
         };
-        __decorate([
-            BABYLON.serialize()
-        ], SkyMaterial.prototype, "luminance", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], SkyMaterial.prototype, "turbidity", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], SkyMaterial.prototype, "rayleigh", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], SkyMaterial.prototype, "mieCoefficient", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], SkyMaterial.prototype, "mieDirectionalG", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], SkyMaterial.prototype, "distance", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], SkyMaterial.prototype, "inclination", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], SkyMaterial.prototype, "azimuth", void 0);
-        __decorate([
-            BABYLON.serializeAsVector3()
-        ], SkyMaterial.prototype, "sunPosition", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], SkyMaterial.prototype, "useSunPosition", void 0);
         return SkyMaterial;
     }(BABYLON.Material));
+    __decorate([
+        BABYLON.serialize()
+    ], SkyMaterial.prototype, "luminance", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], SkyMaterial.prototype, "turbidity", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], SkyMaterial.prototype, "rayleigh", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], SkyMaterial.prototype, "mieCoefficient", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], SkyMaterial.prototype, "mieDirectionalG", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], SkyMaterial.prototype, "distance", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], SkyMaterial.prototype, "inclination", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], SkyMaterial.prototype, "azimuth", void 0);
+    __decorate([
+        BABYLON.serializeAsVector3()
+    ], SkyMaterial.prototype, "sunPosition", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], SkyMaterial.prototype, "useSunPosition", void 0);
     BABYLON.SkyMaterial = SkyMaterial;
 })(BABYLON || (BABYLON = {}));
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.skyMaterial.min.js


+ 65 - 63
dist/preview release/materialsLibrary/babylon.terrainMaterial.js

@@ -16,39 +16,41 @@ var BABYLON;
     var TerrainMaterialDefines = (function (_super) {
         __extends(TerrainMaterialDefines, _super);
         function TerrainMaterialDefines() {
-            _super.call(this);
-            this.DIFFUSE = false;
-            this.BUMP = false;
-            this.CLIPPLANE = false;
-            this.ALPHATEST = false;
-            this.POINTSIZE = false;
-            this.FOG = false;
-            this.SPECULARTERM = false;
-            this.NORMAL = false;
-            this.UV1 = false;
-            this.UV2 = false;
-            this.VERTEXCOLOR = false;
-            this.VERTEXALPHA = false;
-            this.NUM_BONE_INFLUENCERS = 0;
-            this.BonesPerMesh = 0;
-            this.INSTANCES = false;
-            this.rebuild();
+            var _this = _super.call(this) || this;
+            _this.DIFFUSE = false;
+            _this.BUMP = false;
+            _this.CLIPPLANE = false;
+            _this.ALPHATEST = false;
+            _this.POINTSIZE = false;
+            _this.FOG = false;
+            _this.SPECULARTERM = false;
+            _this.NORMAL = false;
+            _this.UV1 = false;
+            _this.UV2 = false;
+            _this.VERTEXCOLOR = false;
+            _this.VERTEXALPHA = false;
+            _this.NUM_BONE_INFLUENCERS = 0;
+            _this.BonesPerMesh = 0;
+            _this.INSTANCES = false;
+            _this.rebuild();
+            return _this;
         }
         return TerrainMaterialDefines;
     }(BABYLON.MaterialDefines));
     var TerrainMaterial = (function (_super) {
         __extends(TerrainMaterial, _super);
         function TerrainMaterial(name, scene) {
-            _super.call(this, name, scene);
-            this.diffuseColor = new BABYLON.Color3(1, 1, 1);
-            this.specularColor = new BABYLON.Color3(0, 0, 0);
-            this.specularPower = 64;
-            this.disableLighting = false;
-            this.maxSimultaneousLights = 4;
-            this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
-            this._defines = new TerrainMaterialDefines();
-            this._cachedDefines = new TerrainMaterialDefines();
-            this._cachedDefines.BonesPerMesh = -1;
+            var _this = _super.call(this, name, scene) || this;
+            _this.diffuseColor = new BABYLON.Color3(1, 1, 1);
+            _this.specularColor = new BABYLON.Color3(0, 0, 0);
+            _this.specularPower = 64;
+            _this.disableLighting = false;
+            _this.maxSimultaneousLights = 4;
+            _this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
+            _this._defines = new TerrainMaterialDefines();
+            _this._cachedDefines = new TerrainMaterialDefines();
+            _this._cachedDefines.BonesPerMesh = -1;
+            return _this;
         }
         TerrainMaterial.prototype.needAlphaBlending = function () {
             return (this.alpha < 1.0);
@@ -303,44 +305,44 @@ var BABYLON;
         TerrainMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new TerrainMaterial(source.name, scene); }, source, scene, rootUrl);
         };
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TerrainMaterial.prototype, "mixTexture", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TerrainMaterial.prototype, "diffuseTexture1", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TerrainMaterial.prototype, "diffuseTexture2", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TerrainMaterial.prototype, "diffuseTexture3", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TerrainMaterial.prototype, "bumpTexture1", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TerrainMaterial.prototype, "bumpTexture2", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TerrainMaterial.prototype, "bumpTexture3", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], TerrainMaterial.prototype, "diffuseColor", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], TerrainMaterial.prototype, "specularColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], TerrainMaterial.prototype, "specularPower", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], TerrainMaterial.prototype, "disableLighting", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], TerrainMaterial.prototype, "maxSimultaneousLights", void 0);
         return TerrainMaterial;
     }(BABYLON.Material));
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TerrainMaterial.prototype, "mixTexture", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TerrainMaterial.prototype, "diffuseTexture1", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TerrainMaterial.prototype, "diffuseTexture2", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TerrainMaterial.prototype, "diffuseTexture3", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TerrainMaterial.prototype, "bumpTexture1", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TerrainMaterial.prototype, "bumpTexture2", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TerrainMaterial.prototype, "bumpTexture3", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], TerrainMaterial.prototype, "diffuseColor", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], TerrainMaterial.prototype, "specularColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], TerrainMaterial.prototype, "specularPower", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], TerrainMaterial.prototype, "disableLighting", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], TerrainMaterial.prototype, "maxSimultaneousLights", void 0);
     BABYLON.TerrainMaterial = TerrainMaterial;
 })(BABYLON || (BABYLON = {}));
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js


+ 71 - 69
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js

@@ -16,42 +16,44 @@ var BABYLON;
     var TriPlanarMaterialDefines = (function (_super) {
         __extends(TriPlanarMaterialDefines, _super);
         function TriPlanarMaterialDefines() {
-            _super.call(this);
-            this.DIFFUSEX = false;
-            this.DIFFUSEY = false;
-            this.DIFFUSEZ = false;
-            this.BUMPX = false;
-            this.BUMPY = false;
-            this.BUMPZ = false;
-            this.CLIPPLANE = false;
-            this.ALPHATEST = false;
-            this.POINTSIZE = false;
-            this.FOG = false;
-            this.SPECULARTERM = false;
-            this.NORMAL = false;
-            this.VERTEXCOLOR = false;
-            this.VERTEXALPHA = false;
-            this.NUM_BONE_INFLUENCERS = 0;
-            this.BonesPerMesh = 0;
-            this.INSTANCES = false;
-            this.rebuild();
+            var _this = _super.call(this) || this;
+            _this.DIFFUSEX = false;
+            _this.DIFFUSEY = false;
+            _this.DIFFUSEZ = false;
+            _this.BUMPX = false;
+            _this.BUMPY = false;
+            _this.BUMPZ = false;
+            _this.CLIPPLANE = false;
+            _this.ALPHATEST = false;
+            _this.POINTSIZE = false;
+            _this.FOG = false;
+            _this.SPECULARTERM = false;
+            _this.NORMAL = false;
+            _this.VERTEXCOLOR = false;
+            _this.VERTEXALPHA = false;
+            _this.NUM_BONE_INFLUENCERS = 0;
+            _this.BonesPerMesh = 0;
+            _this.INSTANCES = false;
+            _this.rebuild();
+            return _this;
         }
         return TriPlanarMaterialDefines;
     }(BABYLON.MaterialDefines));
     var TriPlanarMaterial = (function (_super) {
         __extends(TriPlanarMaterial, _super);
         function TriPlanarMaterial(name, scene) {
-            _super.call(this, name, scene);
-            this.tileSize = 1;
-            this.diffuseColor = new BABYLON.Color3(1, 1, 1);
-            this.specularColor = new BABYLON.Color3(0.2, 0.2, 0.2);
-            this.specularPower = 64;
-            this.disableLighting = false;
-            this.maxSimultaneousLights = 4;
-            this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
-            this._defines = new TriPlanarMaterialDefines();
-            this._cachedDefines = new TriPlanarMaterialDefines();
-            this._cachedDefines.BonesPerMesh = -1;
+            var _this = _super.call(this, name, scene) || this;
+            _this.tileSize = 1;
+            _this.diffuseColor = new BABYLON.Color3(1, 1, 1);
+            _this.specularColor = new BABYLON.Color3(0.2, 0.2, 0.2);
+            _this.specularPower = 64;
+            _this.disableLighting = false;
+            _this.maxSimultaneousLights = 4;
+            _this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
+            _this._defines = new TriPlanarMaterialDefines();
+            _this._cachedDefines = new TriPlanarMaterialDefines();
+            _this._cachedDefines.BonesPerMesh = -1;
+            return _this;
         }
         TriPlanarMaterial.prototype.needAlphaBlending = function () {
             return (this.alpha < 1.0);
@@ -293,47 +295,47 @@ var BABYLON;
         TriPlanarMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new TriPlanarMaterial(source.name, scene); }, source, scene, rootUrl);
         };
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TriPlanarMaterial.prototype, "mixTexture", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TriPlanarMaterial.prototype, "diffuseTextureX", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TriPlanarMaterial.prototype, "diffuseTextureY", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TriPlanarMaterial.prototype, "diffuseTextureZ", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TriPlanarMaterial.prototype, "normalTextureX", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TriPlanarMaterial.prototype, "normalTextureY", void 0);
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], TriPlanarMaterial.prototype, "normalTextureZ", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], TriPlanarMaterial.prototype, "tileSize", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], TriPlanarMaterial.prototype, "diffuseColor", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], TriPlanarMaterial.prototype, "specularColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], TriPlanarMaterial.prototype, "specularPower", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], TriPlanarMaterial.prototype, "disableLighting", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], TriPlanarMaterial.prototype, "maxSimultaneousLights", void 0);
         return TriPlanarMaterial;
     }(BABYLON.Material));
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TriPlanarMaterial.prototype, "mixTexture", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TriPlanarMaterial.prototype, "diffuseTextureX", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TriPlanarMaterial.prototype, "diffuseTextureY", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TriPlanarMaterial.prototype, "diffuseTextureZ", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TriPlanarMaterial.prototype, "normalTextureX", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TriPlanarMaterial.prototype, "normalTextureY", void 0);
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], TriPlanarMaterial.prototype, "normalTextureZ", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], TriPlanarMaterial.prototype, "tileSize", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], TriPlanarMaterial.prototype, "diffuseColor", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], TriPlanarMaterial.prototype, "specularColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], TriPlanarMaterial.prototype, "specularPower", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], TriPlanarMaterial.prototype, "disableLighting", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], TriPlanarMaterial.prototype, "maxSimultaneousLights", void 0);
     BABYLON.TriPlanarMaterial = TriPlanarMaterial;
 })(BABYLON || (BABYLON = {}));
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js


+ 3 - 3
dist/preview release/materialsLibrary/babylon.waterMaterial.d.ts

@@ -76,12 +76,12 @@ declare module BABYLON {
         */
         constructor(name: string, scene: Scene, renderTargetSize?: Vector2);
         useLogarithmicDepth: boolean;
-        refractionTexture: RenderTargetTexture;
-        reflectionTexture: RenderTargetTexture;
+        readonly refractionTexture: RenderTargetTexture;
+        readonly reflectionTexture: RenderTargetTexture;
         addToRenderList(node: any): void;
         enableRenderTargets(enable: boolean): void;
         getRenderList(): AbstractMesh[];
-        renderTargetsEnabled: boolean;
+        readonly renderTargetsEnabled: boolean;
         needAlphaBlending(): boolean;
         needAlphaTesting(): boolean;
         getAlphaTestTexture(): BaseTexture;

+ 109 - 107
dist/preview release/materialsLibrary/babylon.waterMaterial.js

@@ -16,27 +16,28 @@ var BABYLON;
     var WaterMaterialDefines = (function (_super) {
         __extends(WaterMaterialDefines, _super);
         function WaterMaterialDefines() {
-            _super.call(this);
-            this.BUMP = false;
-            this.REFLECTION = false;
-            this.CLIPPLANE = false;
-            this.ALPHATEST = false;
-            this.POINTSIZE = false;
-            this.FOG = false;
-            this.NORMAL = false;
-            this.UV1 = false;
-            this.UV2 = false;
-            this.VERTEXCOLOR = false;
-            this.VERTEXALPHA = false;
-            this.NUM_BONE_INFLUENCERS = 0;
-            this.BonesPerMesh = 0;
-            this.INSTANCES = false;
-            this.SPECULARTERM = false;
-            this.LOGARITHMICDEPTH = false;
-            this.FRESNELSEPARATE = false;
-            this.BUMPSUPERIMPOSE = false;
-            this.BUMPAFFECTSREFLECTION = false;
-            this.rebuild();
+            var _this = _super.call(this) || this;
+            _this.BUMP = false;
+            _this.REFLECTION = false;
+            _this.CLIPPLANE = false;
+            _this.ALPHATEST = false;
+            _this.POINTSIZE = false;
+            _this.FOG = false;
+            _this.NORMAL = false;
+            _this.UV1 = false;
+            _this.UV2 = false;
+            _this.VERTEXCOLOR = false;
+            _this.VERTEXALPHA = false;
+            _this.NUM_BONE_INFLUENCERS = 0;
+            _this.BonesPerMesh = 0;
+            _this.INSTANCES = false;
+            _this.SPECULARTERM = false;
+            _this.LOGARITHMICDEPTH = false;
+            _this.FRESNELSEPARATE = false;
+            _this.BUMPSUPERIMPOSE = false;
+            _this.BUMPAFFECTSREFLECTION = false;
+            _this.rebuild();
+            return _this;
         }
         return WaterMaterialDefines;
     }(BABYLON.MaterialDefines));
@@ -47,75 +48,76 @@ var BABYLON;
         */
         function WaterMaterial(name, scene, renderTargetSize) {
             if (renderTargetSize === void 0) { renderTargetSize = new BABYLON.Vector2(512, 512); }
-            _super.call(this, name, scene);
-            this.renderTargetSize = renderTargetSize;
-            this.diffuseColor = new BABYLON.Color3(1, 1, 1);
-            this.specularColor = new BABYLON.Color3(0, 0, 0);
-            this.specularPower = 64;
-            this.disableLighting = false;
-            this.maxSimultaneousLights = 4;
+            var _this = _super.call(this, name, scene) || this;
+            _this.renderTargetSize = renderTargetSize;
+            _this.diffuseColor = new BABYLON.Color3(1, 1, 1);
+            _this.specularColor = new BABYLON.Color3(0, 0, 0);
+            _this.specularPower = 64;
+            _this.disableLighting = false;
+            _this.maxSimultaneousLights = 4;
             /**
             * @param {number}: Represents the wind force
             */
-            this.windForce = 6;
+            _this.windForce = 6;
             /**
             * @param {Vector2}: The direction of the wind in the plane (X, Z)
             */
-            this.windDirection = new BABYLON.Vector2(0, 1);
+            _this.windDirection = new BABYLON.Vector2(0, 1);
             /**
             * @param {number}: Wave height, represents the height of the waves
             */
-            this.waveHeight = 0.4;
+            _this.waveHeight = 0.4;
             /**
             * @param {number}: Bump height, represents the bump height related to the bump map
             */
-            this.bumpHeight = 0.4;
+            _this.bumpHeight = 0.4;
             /**
              * @param {boolean}: Add a smaller moving bump to less steady waves.
              */
-            this.bumpSuperimpose = false;
+            _this.bumpSuperimpose = false;
             /**
              * @param {boolean}: Color refraction and reflection differently with .waterColor2 and .colorBlendFactor2. Non-linear (physically correct) fresnel.
              */
-            this.fresnelSeparate = false;
+            _this.fresnelSeparate = false;
             /**
              * @param {boolean}: bump Waves modify the reflection.
              */
-            this.bumpAffectsReflection = false;
+            _this.bumpAffectsReflection = false;
             /**
             * @param {number}: The water color blended with the refraction (near)
             */
-            this.waterColor = new BABYLON.Color3(0.1, 0.1, 0.6);
+            _this.waterColor = new BABYLON.Color3(0.1, 0.1, 0.6);
             /**
             * @param {number}: The blend factor related to the water color
             */
-            this.colorBlendFactor = 0.2;
+            _this.colorBlendFactor = 0.2;
             /**
              * @param {number}: The water color blended with the reflection (far)
              */
-            this.waterColor2 = new BABYLON.Color3(0.1, 0.1, 0.6);
+            _this.waterColor2 = new BABYLON.Color3(0.1, 0.1, 0.6);
             /**
              * @param {number}: The blend factor related to the water color (reflection, far)
              */
-            this.colorBlendFactor2 = 0.2;
+            _this.colorBlendFactor2 = 0.2;
             /**
             * @param {number}: Represents the maximum length of a wave
             */
-            this.waveLength = 0.1;
+            _this.waveLength = 0.1;
             /**
             * @param {number}: Defines the waves speed
             */
-            this.waveSpeed = 1.0;
+            _this.waveSpeed = 1.0;
             /*
             * Private members
             */
-            this._mesh = null;
-            this._reflectionTransform = BABYLON.Matrix.Zero();
-            this._lastTime = 0;
-            this._defines = new WaterMaterialDefines();
-            this._cachedDefines = new WaterMaterialDefines();
+            _this._mesh = null;
+            _this._reflectionTransform = BABYLON.Matrix.Zero();
+            _this._lastTime = 0;
+            _this._defines = new WaterMaterialDefines();
+            _this._cachedDefines = new WaterMaterialDefines();
             // Create render targets
-            this._createRenderTargets(scene, renderTargetSize);
+            _this._createRenderTargets(scene, renderTargetSize);
+            return _this;
         }
         Object.defineProperty(WaterMaterial.prototype, "useLogarithmicDepth", {
             get: function () {
@@ -516,68 +518,68 @@ var BABYLON;
             var mesh = BABYLON.Mesh.CreateGround(name, 512, 512, 32, scene, false);
             return mesh;
         };
-        __decorate([
-            BABYLON.serializeAsTexture()
-        ], WaterMaterial.prototype, "bumpTexture", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], WaterMaterial.prototype, "diffuseColor", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], WaterMaterial.prototype, "specularColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "specularPower", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "disableLighting", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "maxSimultaneousLights", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "windForce", void 0);
-        __decorate([
-            BABYLON.serializeAsVector2()
-        ], WaterMaterial.prototype, "windDirection", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "waveHeight", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "bumpHeight", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "bumpSuperimpose", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "fresnelSeparate", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "bumpAffectsReflection", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], WaterMaterial.prototype, "waterColor", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "colorBlendFactor", void 0);
-        __decorate([
-            BABYLON.serializeAsColor3()
-        ], WaterMaterial.prototype, "waterColor2", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "colorBlendFactor2", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "waveLength", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "waveSpeed", void 0);
-        __decorate([
-            BABYLON.serialize()
-        ], WaterMaterial.prototype, "useLogarithmicDepth", null);
         return WaterMaterial;
     }(BABYLON.Material));
+    __decorate([
+        BABYLON.serializeAsTexture()
+    ], WaterMaterial.prototype, "bumpTexture", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], WaterMaterial.prototype, "diffuseColor", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], WaterMaterial.prototype, "specularColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "specularPower", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "disableLighting", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "maxSimultaneousLights", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "windForce", void 0);
+    __decorate([
+        BABYLON.serializeAsVector2()
+    ], WaterMaterial.prototype, "windDirection", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "waveHeight", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "bumpHeight", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "bumpSuperimpose", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "fresnelSeparate", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "bumpAffectsReflection", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], WaterMaterial.prototype, "waterColor", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "colorBlendFactor", void 0);
+    __decorate([
+        BABYLON.serializeAsColor3()
+    ], WaterMaterial.prototype, "waterColor2", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "colorBlendFactor2", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "waveLength", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "waveSpeed", void 0);
+    __decorate([
+        BABYLON.serialize()
+    ], WaterMaterial.prototype, "useLogarithmicDepth", null);
     BABYLON.WaterMaterial = WaterMaterial;
 })(BABYLON || (BABYLON = {}));
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.min.js


+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.d.ts

@@ -13,7 +13,7 @@ declare module BABYLON {
         /**
          * Gets the size of one char in the texture (each char fits in size * size space in the texture).
          */
-        charSize: number;
+        readonly charSize: number;
         /**
          * Create a new instance of the Ascii Art FontTexture class
          * @param name the name of the texture

+ 32 - 31
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js

@@ -28,24 +28,24 @@ var BABYLON;
          * @param scene the scene that owns the texture
          */
         function AsciiArtFontTexture(name, font, text, scene) {
-            _super.call(this, scene);
-            this.name = name;
-            this._text == text;
-            this._font == font;
-            this.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
-            this.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+            var _this = _super.call(this, scene) || this;
+            _this.name = name;
+            _this._text == text;
+            _this._font == font;
+            _this.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
+            _this.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
             //this.anisotropicFilteringLevel = 1;
             // Get the font specific info.
-            var maxCharHeight = this.getFontHeight(font);
-            var maxCharWidth = this.getFontWidth(font);
-            this._charSize = Math.max(maxCharHeight.height, maxCharWidth);
+            var maxCharHeight = _this.getFontHeight(font);
+            var maxCharWidth = _this.getFontWidth(font);
+            _this._charSize = Math.max(maxCharHeight.height, maxCharWidth);
             // This is an approximate size, but should always be able to fit at least the maxCharCount.
-            var textureWidth = Math.ceil(this._charSize * text.length);
-            var textureHeight = this._charSize;
+            var textureWidth = Math.ceil(_this._charSize * text.length);
+            var textureHeight = _this._charSize;
             // Create the texture that will store the font characters.
-            this._texture = scene.getEngine().createDynamicTexture(textureWidth, textureHeight, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
+            _this._texture = scene.getEngine().createDynamicTexture(textureWidth, textureHeight, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
             //scene.getEngine().setclamp
-            var textureSize = this.getSize();
+            var textureSize = _this.getSize();
             // Create a canvas with the final size: the one matching the texture.
             var canvas = document.createElement("canvas");
             canvas.width = textureSize.width;
@@ -57,10 +57,11 @@ var BABYLON;
             context.imageSmoothingEnabled = false;
             // Sets the text in the texture.
             for (var i = 0; i < text.length; i++) {
-                context.fillText(text[i], i * this._charSize, -maxCharHeight.offset);
+                context.fillText(text[i], i * _this._charSize, -maxCharHeight.offset);
             }
             // Flush the text in the dynamic texture.
-            this.getScene().getEngine().updateDynamicTexture(this._texture, canvas, false, true);
+            _this.getScene().getEngine().updateDynamicTexture(_this._texture, canvas, false, true);
+            return _this;
         }
         Object.defineProperty(AsciiArtFontTexture.prototype, "charSize", {
             /**
@@ -139,14 +140,14 @@ var BABYLON;
             var texture = BABYLON.SerializationHelper.Parse(function () { return new AsciiArtFontTexture(source.name, source.font, source.text, scene); }, source, scene, null);
             return texture;
         };
-        __decorate([
-            BABYLON.serialize("font")
-        ], AsciiArtFontTexture.prototype, "_font", void 0);
-        __decorate([
-            BABYLON.serialize("text")
-        ], AsciiArtFontTexture.prototype, "_text", void 0);
         return AsciiArtFontTexture;
     }(BABYLON.BaseTexture));
+    __decorate([
+        BABYLON.serialize("font")
+    ], AsciiArtFontTexture.prototype, "_font", void 0);
+    __decorate([
+        BABYLON.serialize("text")
+    ], AsciiArtFontTexture.prototype, "_text", void 0);
     BABYLON.AsciiArtFontTexture = AsciiArtFontTexture;
     /**
      * AsciiArtPostProcess helps rendering everithing in Ascii Art.
@@ -163,21 +164,20 @@ var BABYLON;
          * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
          */
         function AsciiArtPostProcess(name, camera, options) {
-            var _this = this;
-            _super.call(this, name, 'asciiart', ['asciiArtFontInfos', 'asciiArtOptions'], ['asciiArtFont'], {
+            var _this = _super.call(this, name, 'asciiart', ['asciiArtFontInfos', 'asciiArtOptions'], ['asciiArtFont'], {
                 width: camera.getEngine().getRenderWidth(),
                 height: camera.getEngine().getRenderHeight()
-            }, camera, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, camera.getEngine(), true);
+            }, camera, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, camera.getEngine(), true) || this;
             /**
              * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
              * This number is defined between 0 and 1;
              */
-            this.mixToTile = 0;
+            _this.mixToTile = 0;
             /**
              * This defines the amount you want to mix the normal rendering pass in the ascii art.
              * This number is defined between 0 and 1;
              */
-            this.mixToNormal = 0;
+            _this.mixToNormal = 0;
             // Default values.
             var font = "40px Monospace";
             var characterSet = " `-.'_:,\"=^;<+!*?/cL\\zrs7TivJtC{3F)Il(xZfY5S2eajo14[nuyE]P6V9kXpKwGhqAUbOd8#HRDB0$mgMW&Q%N@";
@@ -189,17 +189,18 @@ var BABYLON;
                 else {
                     font = options.font || font;
                     characterSet = options.characterSet || characterSet;
-                    this.mixToTile = options.mixToTile || this.mixToTile;
-                    this.mixToNormal = options.mixToNormal || this.mixToNormal;
+                    _this.mixToTile = options.mixToTile || _this.mixToTile;
+                    _this.mixToNormal = options.mixToNormal || _this.mixToNormal;
                 }
             }
-            this._asciiArtFontTexture = new AsciiArtFontTexture(name, font, characterSet, camera.getScene());
-            var textureSize = this._asciiArtFontTexture.getSize();
-            this.onApply = function (effect) {
+            _this._asciiArtFontTexture = new AsciiArtFontTexture(name, font, characterSet, camera.getScene());
+            var textureSize = _this._asciiArtFontTexture.getSize();
+            _this.onApply = function (effect) {
                 effect.setTexture("asciiArtFont", _this._asciiArtFontTexture);
                 effect.setFloat4("asciiArtFontInfos", _this._asciiArtFontTexture.charSize, characterSet.length, textureSize.width, textureSize.height);
                 effect.setFloat4("asciiArtOptions", _this.width, _this.height, _this.mixToNormal, _this.mixToTile);
             };
+            return _this;
         }
         return AsciiArtPostProcess;
     }(BABYLON.PostProcess));

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.d.ts

@@ -13,7 +13,7 @@ declare module BABYLON {
         /**
          * Gets the size of one char in the texture (each char fits in size * size space in the texture).
          */
-        charSize: number;
+        readonly charSize: number;
         /**
          * Create a new instance of the Digital Rain FontTexture class
          * @param name the name of the texture

+ 32 - 31
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.js

@@ -28,24 +28,24 @@ var BABYLON;
          * @param scene the scene that owns the texture
          */
         function DigitalRainFontTexture(name, font, text, scene) {
-            _super.call(this, scene);
-            this.name = name;
-            this._text == text;
-            this._font == font;
-            this.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
-            this.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+            var _this = _super.call(this, scene) || this;
+            _this.name = name;
+            _this._text == text;
+            _this._font == font;
+            _this.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
+            _this.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
             //this.anisotropicFilteringLevel = 1;
             // Get the font specific info.
-            var maxCharHeight = this.getFontHeight(font);
-            var maxCharWidth = this.getFontWidth(font);
-            this._charSize = Math.max(maxCharHeight.height, maxCharWidth);
+            var maxCharHeight = _this.getFontHeight(font);
+            var maxCharWidth = _this.getFontWidth(font);
+            _this._charSize = Math.max(maxCharHeight.height, maxCharWidth);
             // This is an approximate size, but should always be able to fit at least the maxCharCount.
-            var textureWidth = this._charSize;
-            var textureHeight = Math.ceil(this._charSize * text.length);
+            var textureWidth = _this._charSize;
+            var textureHeight = Math.ceil(_this._charSize * text.length);
             // Create the texture that will store the font characters.
-            this._texture = scene.getEngine().createDynamicTexture(textureWidth, textureHeight, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
+            _this._texture = scene.getEngine().createDynamicTexture(textureWidth, textureHeight, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
             //scene.getEngine().setclamp
-            var textureSize = this.getSize();
+            var textureSize = _this.getSize();
             // Create a canvas with the final size: the one matching the texture.
             var canvas = document.createElement("canvas");
             canvas.width = textureSize.width;
@@ -57,10 +57,11 @@ var BABYLON;
             context.imageSmoothingEnabled = false;
             // Sets the text in the texture.
             for (var i = 0; i < text.length; i++) {
-                context.fillText(text[i], 0, i * this._charSize - maxCharHeight.offset);
+                context.fillText(text[i], 0, i * _this._charSize - maxCharHeight.offset);
             }
             // Flush the text in the dynamic texture.
-            this.getScene().getEngine().updateDynamicTexture(this._texture, canvas, false, true);
+            _this.getScene().getEngine().updateDynamicTexture(_this._texture, canvas, false, true);
+            return _this;
         }
         Object.defineProperty(DigitalRainFontTexture.prototype, "charSize", {
             /**
@@ -139,14 +140,14 @@ var BABYLON;
             var texture = BABYLON.SerializationHelper.Parse(function () { return new DigitalRainFontTexture(source.name, source.font, source.text, scene); }, source, scene, null);
             return texture;
         };
-        __decorate([
-            BABYLON.serialize("font")
-        ], DigitalRainFontTexture.prototype, "_font", void 0);
-        __decorate([
-            BABYLON.serialize("text")
-        ], DigitalRainFontTexture.prototype, "_text", void 0);
         return DigitalRainFontTexture;
     }(BABYLON.BaseTexture));
+    __decorate([
+        BABYLON.serialize("font")
+    ], DigitalRainFontTexture.prototype, "_font", void 0);
+    __decorate([
+        BABYLON.serialize("text")
+    ], DigitalRainFontTexture.prototype, "_text", void 0);
     BABYLON.DigitalRainFontTexture = DigitalRainFontTexture;
     /**
      * DigitalRainPostProcess helps rendering everithing in digital rain.
@@ -163,21 +164,20 @@ var BABYLON;
          * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
          */
         function DigitalRainPostProcess(name, camera, options) {
-            var _this = this;
-            _super.call(this, name, 'digitalrain', ['digitalRainFontInfos', 'digitalRainOptions', 'cosTimeZeroOne', 'matrixSpeed'], ['digitalRainFont'], {
+            var _this = _super.call(this, name, 'digitalrain', ['digitalRainFontInfos', 'digitalRainOptions', 'cosTimeZeroOne', 'matrixSpeed'], ['digitalRainFont'], {
                 width: camera.getEngine().getRenderWidth(),
                 height: camera.getEngine().getRenderHeight()
-            }, camera, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, camera.getEngine(), true);
+            }, camera, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, camera.getEngine(), true) || this;
             /**
              * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
              * This number is defined between 0 and 1;
              */
-            this.mixToTile = 0;
+            _this.mixToTile = 0;
             /**
              * This defines the amount you want to mix the normal rendering pass in the digital rain.
              * This number is defined between 0 and 1;
              */
-            this.mixToNormal = 0;
+            _this.mixToNormal = 0;
             // Default values.
             var font = "15px Monospace";
             var characterSet = "古池や蛙飛び込む水の音ふるいけやかわずとびこむみずのおと初しぐれ猿も小蓑をほしげ也はつしぐれさるもこみのをほしげなり江戸の雨何石呑んだ時鳥えどのあめなんごくのんだほととぎす";
@@ -188,19 +188,19 @@ var BABYLON;
                 }
                 else {
                     font = options.font || font;
-                    this.mixToTile = options.mixToTile || this.mixToTile;
-                    this.mixToNormal = options.mixToNormal || this.mixToNormal;
+                    _this.mixToTile = options.mixToTile || _this.mixToTile;
+                    _this.mixToNormal = options.mixToNormal || _this.mixToNormal;
                 }
             }
-            this._digitalRainFontTexture = new DigitalRainFontTexture(name, font, characterSet, camera.getScene());
-            var textureSize = this._digitalRainFontTexture.getSize();
+            _this._digitalRainFontTexture = new DigitalRainFontTexture(name, font, characterSet, camera.getScene());
+            var textureSize = _this._digitalRainFontTexture.getSize();
             var alpha = 0.0;
             var cosTimeZeroOne = 0.0;
             var matrix = new BABYLON.Matrix();
             for (var i = 0; i < 16; i++) {
                 matrix.m[i] = Math.random();
             }
-            this.onApply = function (effect) {
+            _this.onApply = function (effect) {
                 effect.setTexture("digitalRainFont", _this._digitalRainFontTexture);
                 effect.setFloat4("digitalRainFontInfos", _this._digitalRainFontTexture.charSize, characterSet.length, textureSize.width, textureSize.height);
                 effect.setFloat4("digitalRainOptions", _this.width, _this.height, _this.mixToNormal, _this.mixToTile);
@@ -209,6 +209,7 @@ var BABYLON;
                 cosTimeZeroOne = alpha;
                 effect.setFloat('cosTimeZeroOne', cosTimeZeroOne);
             };
+            return _this;
         }
         return DigitalRainPostProcess;
     }(BABYLON.PostProcess));

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


+ 7 - 6
dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.js

@@ -9,12 +9,13 @@ var BABYLON;
     var BrickProceduralTexture = (function (_super) {
         __extends(BrickProceduralTexture, _super);
         function BrickProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
-            _super.call(this, name, size, "brickProceduralTexture", scene, fallbackTexture, generateMipMaps);
-            this._numberOfBricksHeight = 15;
-            this._numberOfBricksWidth = 5;
-            this._jointColor = new BABYLON.Color3(0.72, 0.72, 0.72);
-            this._brickColor = new BABYLON.Color3(0.77, 0.47, 0.40);
-            this.updateShaderUniforms();
+            var _this = _super.call(this, name, size, "brickProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
+            _this._numberOfBricksHeight = 15;
+            _this._numberOfBricksWidth = 5;
+            _this._jointColor = new BABYLON.Color3(0.72, 0.72, 0.72);
+            _this._brickColor = new BABYLON.Color3(0.77, 0.47, 0.40);
+            _this.updateShaderUniforms();
+            return _this;
         }
         BrickProceduralTexture.prototype.updateShaderUniforms = function () {
             this.setFloat("numberOfBricksHeight", this._numberOfBricksHeight);

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.min.js


+ 5 - 4
dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.js

@@ -9,10 +9,11 @@ var BABYLON;
     var CloudProceduralTexture = (function (_super) {
         __extends(CloudProceduralTexture, _super);
         function CloudProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
-            _super.call(this, name, size, "cloudProceduralTexture", scene, fallbackTexture, generateMipMaps);
-            this._skyColor = new BABYLON.Color4(0.15, 0.68, 1.0, 1.0);
-            this._cloudColor = new BABYLON.Color4(1, 1, 1, 1.0);
-            this.updateShaderUniforms();
+            var _this = _super.call(this, name, size, "cloudProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
+            _this._skyColor = new BABYLON.Color4(0.15, 0.68, 1.0, 1.0);
+            _this._cloudColor = new BABYLON.Color4(1, 1, 1, 1.0);
+            _this.updateShaderUniforms();
+            return _this;
         }
         CloudProceduralTexture.prototype.updateShaderUniforms = function () {
             this.setColor4("skyColor", this._skyColor);

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.min.js


+ 4 - 4
dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.d.ts

@@ -9,10 +9,10 @@ declare module BABYLON {
         constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
         updateShaderUniforms(): void;
         render(useCameraPostProcess?: boolean): void;
-        static PurpleFireColors: Color3[];
-        static GreenFireColors: Color3[];
-        static RedFireColors: Color3[];
-        static BlueFireColors: Color3[];
+        static readonly PurpleFireColors: Color3[];
+        static readonly GreenFireColors: Color3[];
+        static readonly RedFireColors: Color3[];
+        static readonly BlueFireColors: Color3[];
         fireColors: Color3[];
         time: number;
         speed: Vector2;

+ 8 - 7
dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.js

@@ -9,13 +9,14 @@ var BABYLON;
     var FireProceduralTexture = (function (_super) {
         __extends(FireProceduralTexture, _super);
         function FireProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
-            _super.call(this, name, size, "fireProceduralTexture", scene, fallbackTexture, generateMipMaps);
-            this._time = 0.0;
-            this._speed = new BABYLON.Vector2(0.5, 0.3);
-            this._autoGenerateTime = true;
-            this._alphaThreshold = 0.5;
-            this._fireColors = FireProceduralTexture.RedFireColors;
-            this.updateShaderUniforms();
+            var _this = _super.call(this, name, size, "fireProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
+            _this._time = 0.0;
+            _this._speed = new BABYLON.Vector2(0.5, 0.3);
+            _this._autoGenerateTime = true;
+            _this._alphaThreshold = 0.5;
+            _this._fireColors = FireProceduralTexture.RedFireColors;
+            _this.updateShaderUniforms();
+            return _this;
         }
         FireProceduralTexture.prototype.updateShaderUniforms = function () {
             this.setFloat("time", this._time);

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.min.js


+ 8 - 7
dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.js

@@ -9,17 +9,18 @@ var BABYLON;
     var GrassProceduralTexture = (function (_super) {
         __extends(GrassProceduralTexture, _super);
         function GrassProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
-            _super.call(this, name, size, "grassProceduralTexture", scene, fallbackTexture, generateMipMaps);
-            this._herb1 = new BABYLON.Color3(0.29, 0.38, 0.02);
-            this._herb2 = new BABYLON.Color3(0.36, 0.49, 0.09);
-            this._herb3 = new BABYLON.Color3(0.51, 0.6, 0.28);
-            this._groundColor = new BABYLON.Color3(1, 1, 1);
-            this._grassColors = [
+            var _this = _super.call(this, name, size, "grassProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
+            _this._herb1 = new BABYLON.Color3(0.29, 0.38, 0.02);
+            _this._herb2 = new BABYLON.Color3(0.36, 0.49, 0.09);
+            _this._herb3 = new BABYLON.Color3(0.51, 0.6, 0.28);
+            _this._groundColor = new BABYLON.Color3(1, 1, 1);
+            _this._grassColors = [
                 new BABYLON.Color3(0.29, 0.38, 0.02),
                 new BABYLON.Color3(0.36, 0.49, 0.09),
                 new BABYLON.Color3(0.51, 0.6, 0.28)
             ];
-            this.updateShaderUniforms();
+            _this.updateShaderUniforms();
+            return _this;
         }
         GrassProceduralTexture.prototype.updateShaderUniforms = function () {
             this.setColor3("herb1Color", this._grassColors[0]);

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.min.js


+ 7 - 6
dist/preview release/proceduralTexturesLibrary/babylon.marbleProceduralTexture.js

@@ -9,12 +9,13 @@ var BABYLON;
     var MarbleProceduralTexture = (function (_super) {
         __extends(MarbleProceduralTexture, _super);
         function MarbleProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
-            _super.call(this, name, size, "marbleProceduralTexture", scene, fallbackTexture, generateMipMaps);
-            this._numberOfTilesHeight = 3;
-            this._numberOfTilesWidth = 3;
-            this._amplitude = 9.0;
-            this._jointColor = new BABYLON.Color3(0.72, 0.72, 0.72);
-            this.updateShaderUniforms();
+            var _this = _super.call(this, name, size, "marbleProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
+            _this._numberOfTilesHeight = 3;
+            _this._numberOfTilesWidth = 3;
+            _this._amplitude = 9.0;
+            _this._jointColor = new BABYLON.Color3(0.72, 0.72, 0.72);
+            _this.updateShaderUniforms();
+            return _this;
         }
         MarbleProceduralTexture.prototype.updateShaderUniforms = function () {
             this.setFloat("numberOfTilesHeight", this._numberOfTilesHeight);

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.marbleProceduralTexture.min.js


+ 4 - 3
dist/preview release/proceduralTexturesLibrary/babylon.roadProceduralTexture.js

@@ -9,9 +9,10 @@ var BABYLON;
     var RoadProceduralTexture = (function (_super) {
         __extends(RoadProceduralTexture, _super);
         function RoadProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
-            _super.call(this, name, size, "roadProceduralTexture", scene, fallbackTexture, generateMipMaps);
-            this._roadColor = new BABYLON.Color3(0.53, 0.53, 0.53);
-            this.updateShaderUniforms();
+            var _this = _super.call(this, name, size, "roadProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
+            _this._roadColor = new BABYLON.Color3(0.53, 0.53, 0.53);
+            _this.updateShaderUniforms();
+            return _this;
         }
         RoadProceduralTexture.prototype.updateShaderUniforms = function () {
             this.setColor3("roadColor", this._roadColor);

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.roadProceduralTexture.min.js


+ 14 - 13
dist/preview release/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.js

@@ -9,19 +9,20 @@ var BABYLON;
     var StarfieldProceduralTexture = (function (_super) {
         __extends(StarfieldProceduralTexture, _super);
         function StarfieldProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
-            _super.call(this, name, size, "starfieldProceduralTexture", scene, fallbackTexture, generateMipMaps);
-            this._time = 1;
-            this._alpha = 0.5;
-            this._beta = 0.8;
-            this._zoom = 0.8;
-            this._formuparam = 0.53;
-            this._stepsize = 0.1;
-            this._tile = 0.850;
-            this._brightness = 0.0015;
-            this._darkmatter = 0.400;
-            this._distfading = 0.730;
-            this._saturation = 0.850;
-            this.updateShaderUniforms();
+            var _this = _super.call(this, name, size, "starfieldProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
+            _this._time = 1;
+            _this._alpha = 0.5;
+            _this._beta = 0.8;
+            _this._zoom = 0.8;
+            _this._formuparam = 0.53;
+            _this._stepsize = 0.1;
+            _this._tile = 0.850;
+            _this._brightness = 0.0015;
+            _this._darkmatter = 0.400;
+            _this._distfading = 0.730;
+            _this._saturation = 0.850;
+            _this.updateShaderUniforms();
+            return _this;
         }
         StarfieldProceduralTexture.prototype.updateShaderUniforms = function () {
             this.setFloat("time", this._time);

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.min.js


+ 5 - 4
dist/preview release/proceduralTexturesLibrary/babylon.woodProceduralTexture.js

@@ -9,10 +9,11 @@ var BABYLON;
     var WoodProceduralTexture = (function (_super) {
         __extends(WoodProceduralTexture, _super);
         function WoodProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
-            _super.call(this, name, size, "woodProceduralTexture", scene, fallbackTexture, generateMipMaps);
-            this._ampScale = 100.0;
-            this._woodColor = new BABYLON.Color3(0.32, 0.17, 0.09);
-            this.updateShaderUniforms();
+            var _this = _super.call(this, name, size, "woodProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
+            _this._ampScale = 100.0;
+            _this._woodColor = new BABYLON.Color3(0.32, 0.17, 0.09);
+            _this.updateShaderUniforms();
+            return _this;
         }
         WoodProceduralTexture.prototype.updateShaderUniforms = function () {
             this.setFloat("ampScale", this._ampScale);

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.woodProceduralTexture.min.js


+ 16 - 9
inspector/index.html

@@ -19,8 +19,8 @@
             font-family:sans-serif;
         }
 
-        /* First try : PG-like
-        #game-canvas {
+        /* First try : PG-like */
+        /*#game-canvas {
             width:75%;
             height:100%; 
             top:0;
@@ -39,12 +39,19 @@
             background-color: #333;
         }*/
         
+        /*Second : sandbox like*/
         #game-canvas {
             position:absolute;
             width:100%;
-            height:650px; 
+            height:100%; 
             top:0;
-            left : 150px;
+        }
+        .fakeFooter {
+            position:absolute;
+            width:100%;
+            height:50px;
+            background-color: #333;
+            bottom: 0;
         }
 
     </style>
@@ -52,15 +59,15 @@
 </head>
 <body>
     
-    <!-- First try : PG-like
+    <!-- First try : PG-like 
     <div class="fakeToolbar"></div>
     <div class="mini">
         <div class="fakeBarAgain"></div>
         <canvas id="game-canvas"></canvas> 
-    </div>
-    -->
-    <!--Second try : Sandbox-like-->
-    <canvas id="game-canvas"></canvas> 
+    </div>-->
+    <!--Second try : Sandbox-like -->
+    <canvas id="game-canvas"></canvas>
+    <div class="fakeFooter"></div>
 
     <!--Starting the game-->
     <script>

+ 2 - 6
inspector/sass/_tooltip.scss

@@ -2,17 +2,13 @@
 
 .tooltip {
     position        : absolute;
-    top             : 0;
+    top             : $tabbar-height;
     right           : 0;
     color           : $color-top;
     display         : none;
     z-index         : 4;
-    font-family     : $font;
-    
-    
-    // width        : 120px;
+    font-family     : $font;  
     padding         : 2px;
-    // line-height  : 25px;
     background-color: $background;
     border          : 1px solid $background-lighter3;
 }

+ 11 - 7
inspector/src/Inspector.ts

@@ -35,6 +35,11 @@ module INSPECTOR {
             Inspector.DOCUMENT = window.document;   
             Inspector.WINDOW = window;                       
             
+            // Load the Canvas2D library if it's not already done
+            if (!BABYLON.Canvas2D) {
+                BABYLON.Tools.LoadScript("http://www.babylonjs.com/babylon.canvas2d.js", () => {});
+            }
+
             // POPUP MODE
             if (popup) { 
                 // Build the inspector in the given parent
@@ -43,16 +48,14 @@ module INSPECTOR {
                 // Get canvas and its DOM parent
                 let canvas                    = this._scene.getEngine().getRenderingCanvas();            
                 let canvasParent              = canvas.parentElement;            
-                let canvasParentComputedStyle = Inspector.WINDOW.getComputedStyle(canvasParent);            
-                // resize canvas
-                // canvas.style.width = 'calc(100% - 750px - 12px)';
+                let canvasParentComputedStyle = Inspector.WINDOW.getComputedStyle(canvasParent);
 
                 // get canvas style                
                 let canvasComputedStyle  = Inspector.WINDOW.getComputedStyle(canvas);
 
                 this._canvasStyle = { 
-                    width        : canvasComputedStyle.width, 
-                    height       : canvasComputedStyle.height,
+                    width        : Helpers.Css(canvas, 'width'),
+                    height       : Helpers.Css(canvas, 'height'),
 
                     position     : canvasComputedStyle.position,
                     top          : canvasComputedStyle.top,
@@ -242,13 +245,14 @@ module INSPECTOR {
             if (!this._popupMode) {
                 // Get canvas
                 let canvas         = this._scene.getEngine().getRenderingCanvas(); 
+
                 // restore canvas style
                 for (let prop in this._canvasStyle) {
                     canvas.style[prop] = this._canvasStyle[prop];
                 }
-                // Get parent of the wrapper           
+                // Get parent of the wrapper 
                 let canvasParent   = canvas.parentElement.parentElement;  
-                canvasParent.appendChild(canvas);                              
+                canvasParent.insertBefore(canvas, this._c2diwrapper);
                 // Remove wrapper
                 Helpers.CleanDiv(this._c2diwrapper);
                 this._c2diwrapper.remove();                   

+ 3 - 5
inspector/src/details/PropertyLine.ts

@@ -187,12 +187,10 @@ module INSPECTOR {
          * (example : mesh.position = new BABYLON.Vector3 ; the original vector3 object is deleted from the mesh).
         */
         public updateObject() {
-            if (!this._parent) {
-                return this._property.value;
-            }
-            else {
+            if (this._parent) {
                 this._property.obj = this._parent.updateObject();
-            } 
+            }
+            return this._property.value;            
         }
 
         // Returns the property name

+ 5 - 3
inspector/src/gui/Tooltip.ts

@@ -11,11 +11,13 @@ module INSPECTOR {
         /** The tooltip div */
         private _infoDiv : HTMLDivElement;
         
-        constructor(elem: HTMLElement, tip:string) {
+        constructor(elem: HTMLElement, tip:string, attachTo?:HTMLElement) {
             
             this._elem = elem;
-            
-            this._infoDiv = Helpers.CreateDiv('tooltip', this._elem.parentElement) as HTMLDivElement;
+            if (!attachTo) {
+                attachTo = this._elem.parentElement;
+            }
+            this._infoDiv = Helpers.CreateDiv('tooltip', attachTo) as HTMLDivElement;
             
 
             this._elem.addEventListener('mouseover', () => { 

+ 19 - 0
inspector/src/helpers/Helpers.ts

@@ -118,6 +118,19 @@ module INSPECTOR {
                 div.removeChild(div.firstChild);
             }
         }
+
+        /**
+         * Returns the true value of the given CSS Attribute from the given element (in percentage or in pixel, as it was specified in the css)
+         */
+        public static Css(elem:HTMLElement, cssAttribute:string) : string{
+            let clone = elem.cloneNode(true) as HTMLElement;
+            let div = Helpers.CreateDiv('', Inspector.DOCUMENT.body);
+            div.style.display = 'none';
+            div.appendChild(clone);
+            let value = Inspector.WINDOW.getComputedStyle(clone)[cssAttribute];
+            div.remove();
+            return value;
+        }
         
         public static LoadScript() {
             BABYLON.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js", (elem) => {
@@ -144,5 +157,11 @@ module INSPECTOR {
             
         }
 
+        public static IsSystemName(name: string): boolean {
+            if (name==null) {
+                return false;
+            }
+            return name.indexOf("###")===0 && name.lastIndexOf("###")===(name.length-3);
+        }
     }
 }

+ 70 - 4
inspector/src/properties.ts

@@ -57,16 +57,60 @@ module INSPECTOR {
                 'uOffset', 
                 'vOffset'
             ],
+            format: (tex:BABYLON.Texture) => { return tex.name} 
         },
         
         'ArcRotateCamera' : {
-            // type: BABYLON.ArcRotateCamera,
-            properties : ['alpha', 'beta', 'radius']  
+            type: BABYLON.ArcRotateCamera,
+            properties : [
+                'alpha', 
+                'beta', 
+                'radius',
+                'angularSensibilityX',
+                'angularSensibilityY',
+                'target', 
+
+                'lowerAlphaLimit',
+                'lowerBetaLimit',
+                'upperAlphaLimit',
+                'upperBetaLimit',
+                'lowerRadiusLimit',
+                'upperRadiusLimit',
+
+                'pinchPrecision',
+                'wheelPrecision',
+                'allowUpsideDown',
+                'checkCollisions'
+            ]  
         },
         
         'Scene' : {
             type: BABYLON.Scene,
-            properties:['actionManager', 'activeCamera', 'ambientColor', 'clearColor']  
+            properties:[
+                'actionManager', 
+                'activeCamera', 
+                'ambientColor', 
+                'clearColor',
+                'forceWireframe',
+                'forcePointsCloud',
+                'forceShowBoundingBoxes',
+                'useRightHandedSystem',
+                'hoverCursor',
+                'cameraToUseForPointers', 
+                'fogEnabled', 
+                'fogColor', 
+                'fogDensity', 
+                'fogStart', 
+                'fogEnd', 
+                'shadowsEnabled', 
+                'lightsEnabled', 
+                'collisionsEnabled',
+                'gravity',
+                'meshUnderPointer', 
+                'pointerX', 
+                'pointerY', 
+                'uid'
+            ]  
         },
         'Mesh': {
             type: BABYLON.Mesh,
@@ -76,7 +120,29 @@ module INSPECTOR {
                 'rotation', 
                 'rotationQuaternion', 
                 'absolutePosition', 
-                'material'
+                'material',
+                'actionManager', 
+                'visibility', 
+                'isVisible', 
+                'isPickable', 
+                'renderingGroupId',
+                'receiveShadows', 
+                'renderOutline', 
+                'outlineColor',
+                'outlineWidth',
+                'renderOverlay',
+                'overlayColor',
+                'overlayAlpha',
+                'hasVertexAlpha',
+                'useVertexColors',
+                'layerMask',
+                'alwaysSelectAsActiveMesh',
+                'ellipsoid', 
+                'ellipsoidOffset', 
+                'edgesWidth', 
+                'edgesColor', 
+                'checkCollisions',
+                'hasLODLevels'
             ],
             format : (m:BABYLON.Mesh) : string => {return m.name;}
         },        

+ 5 - 7
inspector/src/tabs/Canvas2DTab.ts

@@ -12,18 +12,13 @@ module INSPECTOR{
             
             // get all canvas2D
             let instances = BABYLON.Canvas2D.instances || [];
-                    
-            // Returns true if the id of the given object starts and ends with '###'
-            let shouldExcludeThisPrim = (obj:BABYLON.Prim2DBase) : boolean => {
-                return (obj.id && obj.id.indexOf('###') == 0 && obj.id.lastIndexOf('###', 0) === 0);
-            }
-            
+           
             // Recursive method building the tree panel
             let createNode = (obj : BABYLON.Prim2DBase) => {
                 if (obj.children && obj.children.length > 0) {
                     let node = new TreeItem(this, new Canvas2DAdapter(obj));
                     for (let child of obj.children) {     
-                        if (!shouldExcludeThisPrim(child)) {  
+                        if (!Helpers.IsSystemName(child.id)) {  
                             let n = createNode(child);
                             node.add(n); 
                         }
@@ -36,6 +31,9 @@ module INSPECTOR{
             };
             
             for (let inst of instances) {
+                if (Helpers.IsSystemName(inst.id)) {
+                    continue;
+                }
                 let c2d : BABYLON.Canvas2D = inst as BABYLON.Canvas2D;
                 let nodes = createNode(c2d);
                 arr.push(nodes);

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

@@ -9,17 +9,43 @@ module INSPECTOR{
         /* Overrides super */
         protected _getTree() : Array<TreeItem> {
             let arr = [];
+            // Tab containign mesh already in results
+            let alreadyIn = [];
             
             // Returns true if the id of the given object starts and ends with '###'
-            let shouldExcludeThisMesh = (obj:BABYLON.AbstractMesh) : boolean => {
+            let shouldExcludeThisMesh = (obj:BABYLON.Node) : boolean => {
                 return (obj.name && obj.name.indexOf('###') == 0 && obj.name.lastIndexOf('###', 0) === 0);
             };
+
+            // Recursive method building the tree panel
+            let createNode = (obj : BABYLON.AbstractMesh) => {
+                let descendants = obj.getDescendants(true);
+
+                if (descendants.length > 0) {
+                    let node = new TreeItem(this, new MeshAdapter(obj));
+                    alreadyIn.push(node);
+                    for (let child of descendants) {     
+                        if (child instanceof BABYLON.AbstractMesh) {
+                            if (!Helpers.IsSystemName(child.name)) {  
+                                let n = createNode(child);
+                                node.add(n); 
+                            }
+                        }
+                    }
+                    node.update();
+                    return node;
+                } else {
+                    alreadyIn.push(obj);
+                    return new TreeItem(this, new MeshAdapter(obj));
+                }
+            };
             
             // get all meshes from the first scene
             let instances = this._inspector.scene;
             for (let mesh of instances.meshes) {
-                if (!shouldExcludeThisMesh(mesh)){
-                    arr.push(new TreeItem(this, new MeshAdapter(mesh)));
+                if (alreadyIn.indexOf(mesh) == -1) {
+                    let node = createNode(mesh);
+                    arr.push(node);
                 }
             }
             return arr;

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

@@ -136,6 +136,11 @@ module INSPECTOR{
                 if (item.id.toLowerCase().indexOf(filter.toLowerCase()) != -1) {
                     items.push(item);
                 }
+                for (let child of item.children) {
+                    if (child.id.toLowerCase().indexOf(filter.toLowerCase()) != -1) {
+                        items.push(item);
+                    }
+                }
             }    
             this.update(items);
         }

+ 154 - 27
inspector/src/tools/LabelTool.ts

@@ -4,41 +4,168 @@ module INSPECTOR {
 
         /** True if label are displayed, false otherwise */
         private _isDisplayed         : boolean            = false;
-        private _labels              : Array<HTMLElement> = [];
-        private _camera              : BABYLON.Camera;
-        private _transformationMatrix: BABYLON.Matrix     = BABYLON.Matrix.Identity();
+        private _canvas              : BABYLON.ScreenSpaceCanvas2D = null;
+        private _labelInitialized    : boolean = false;
+        private _scene               : BABYLON.Scene = null;
+        private _canvas2DLoaded      : boolean = false;
 
+        private _newMeshObserver       : BABYLON.Observer<BABYLON.AbstractMesh> = null;
+        private _removedMeshObserver   : BABYLON.Observer<BABYLON.AbstractMesh> = null;
+        private _newLightObserver      : BABYLON.Observer<BABYLON.Light> = null;
+        private _removedLightObserver  : BABYLON.Observer<BABYLON.Light> = null;
+        private _newCameraObserver     : BABYLON.Observer<BABYLON.Camera> = null;
+        private _removedCameraObserver : BABYLON.Observer<BABYLON.Camera> = null;
+        
         constructor(parent:HTMLElement, inspector:Inspector) {
-            super('fa-tags', parent, inspector, 'Display mesh names on the canvas');            
+            super('fa-tags', parent, inspector, 'Display mesh names on the canvas');
+
+            this._scene = inspector.scene;
+        }
+
+        public dispose() {
+            if (this._newMeshObserver) {
+                this._scene.onNewMeshAddedObservable.remove(this._newMeshObserver);
+                this._scene.onMeshRemovedObservable.remove (this._removedMeshObserver);
+
+                this._scene.onNewLightAddedObservable.remove(this._newLightObserver);
+                this._scene.onLightRemovedObservable.remove (this._removedLightObserver);
+
+                this._scene.onNewCameraAddedObservable.remove(this._newCameraObserver);
+                this._scene.onCameraRemovedObservable.remove (this._removedCameraObserver);
+    
+                this._newMeshObserver = this._newLightObserver = this._newCameraObserver = this._removedMeshObserver = this._removedLightObserver = this._removedCameraObserver = null;
+            }
+
+            this._canvas.dispose();
+            this._canvas = null;
+        }
+
+        private _checkC2DLoaded(): boolean {
+            if (this._canvas2DLoaded === true) {
+                return true;
+            }
+            if (BABYLON.Canvas2D) {
+                this._canvas2DLoaded = true;
+            }
+            return this._canvas2DLoaded;
+        }
+
+        private _initializeLabels() {
+            // Check if the label are already initialized and quit if it's the case
+            if (this._labelInitialized) {
+                return;
+            }
+
+            // Can't initialize them if the Canvas2D lib is not loaded yet
+            if (!this._checkC2DLoaded()) {
+                return;
+            }
+
+            // Create the canvas that will be used to display the labels
+            this._canvas = new BABYLON.ScreenSpaceCanvas2D(this._scene, {id: "###Label Canvas###"/*, cachingStrategy: BABYLON.Canvas2D.CACHESTRATEGY_TOPLEVELGROUPS*/});
+
+            // Create label for all the Meshes, Lights and Cameras
+            // Those that will be created/removed after this method is called will be taken care by the event handlers added below
+
+            for (let m of this._scene.meshes) {
+                this._createLabel(m);
+            }
+
+            for (let l of this._scene.lights) {
+                this._createLabel(l);
+            }
+
+            for (let c of this._scene.cameras) {
+                this._createLabel(c);
+            }
+
+            // Add handlers for new/removed meshes, camera and lights
+
+            this._newMeshObserver = this._scene.onNewMeshAddedObservable.add((e, s) => {
+                this._createLabel(e);
+            });
+
+            this._removedMeshObserver = this._scene.onMeshRemovedObservable.add((e, s) => {
+                this._removeLabel(e);
+            });
+
+            this._newLightObserver = this._scene.onNewLightAddedObservable.add((e, s) => {
+                this._createLabel(e);
+            });
+
+            this._removedLightObserver = this._scene.onLightRemovedObservable.add((e, s) => {
+                this._removeLabel(e);
+            });
+
+            this._newCameraObserver = this._scene.onNewCameraAddedObservable.add((e, s) => {
+                this._createLabel(e);
+            });
+
+            this._removedCameraObserver = this._scene.onCameraRemovedObservable.add((e, s) => {
+                this._removeLabel(e);
+            });
+            
+            this._labelInitialized = true;
+        }
+
+        private _createLabel(node: BABYLON.Node): BABYLON.Group2D {
+            // Don't create label for "system nodes" (starting and ending with ###)
+            let name = node.name;
+
+            if (Helpers.IsSystemName(name)) {
+                return;
+            }
+
+            let labelGroup = new BABYLON.Group2D({ parent: this._canvas, id: `Label of ${node.name}`, trackNode: node, origin: BABYLON.Vector2.Zero(), 
+            children: [
+                    new BABYLON.Rectangle2D({ id: "LabelRect", x: 0, y: 0, width: 100, height: 30, origin: BABYLON.Vector2.Zero(), border: "#FFFFFFFF", fill: "#808080B0", children: [
+                            new BABYLON.Text2D(node.name, { x: 10, y: 4, fontName: "bold 16px Arial", fontSignedDistanceField: true })
+                        ]
+                    })
+                ]}
+            );
+
+            let r = labelGroup.children[0] as BABYLON.Rectangle2D;
+            let t = r.children[0] as BABYLON.Text2D;
+            let ts = t.textSize.width;
+            r.width = ts + 20;
+            r.height = t.textSize.height + 12;
+
+            labelGroup.addExternalData("owner", node);
+
+            return labelGroup;
+        }
+
+        private _removeLabel(node: BABYLON.Node) {
+            for (let g of this._canvas.children) {
+                let ed = g.getExternalData("owner");
+                if (ed === node) {
+                    g.dispose();
+                    break;
+                }
+            }
         }
 
         // Action : Display/hide mesh names on the canvas
         public action() {
+            // Don't toggle if the script is not loaded
+            if (!this._checkC2DLoaded()) {
+                return;
+            }
+
+            // Toggle the label display state
+            this._isDisplayed = !this._isDisplayed;
+
+            // Check if we have to display the labels
             if (this._isDisplayed) {
-                // hide all labels
+                this._initializeLabels();
+                this._canvas.levelVisible = true;
+            } 
+            
+            // Or to hide them
+            else {
+                this._canvas.levelVisible = false;
             }
         }
-        
-        private _update() {
-            this._camera       = this._inspector.scene.activeCamera;
-            let engine         = this._inspector.scene.getEngine();
-            let viewport       = this._camera.viewport;
-            let globalViewport = viewport.toGlobal(engine.getRenderWidth(), engine.getRenderHeight());
-            this._camera.getViewMatrix().multiplyToRef(this._camera.getProjectionMatrix(), this._transformationMatrix);
-                    
-            // Old method
-            // let meshes = this._camera.getActiveMeshes();
-            // let projectedPosition: BABYLON.Vector3;
-            // for (let index = 0; index < meshes.length; index++) {
-            //     let mesh = meshes.data[index];
-
-            //     let position = mesh.getBoundingInfo().boundingSphere.center;
-            //     projectedPosition = BABYLON.Vector3.Project(position, mesh.getWorldMatrix(), this._transformationMatrix, globalViewport);
-
-            //     this._renderLabel(mesh.name, projectedPosition, 12,
-            //         () => { mesh.renderOverlay = !mesh.renderOverlay },
-            //         () => { return mesh.renderOverlay ? 'red' : 'black'; });
-            // }
-        }
     }
 }

+ 10 - 10
inspector/src/tree/TreeItem.ts

@@ -7,7 +7,7 @@
         // The object this item is linked to (should be a primitive or a canvas) TODO should be superclass of all primitives
         private _adapter    : Adapter;
         private _tools      : Array<AbstractTreeTool>;
-        private _children   : Array<TreeItem> = [];
+        public children     : Array<TreeItem> = [];
         // Div element that contains all children of this node.
         private _lineContent: HTMLElement;  
 
@@ -29,7 +29,7 @@
 
         /** Add the given item as a child of this one */
         public add(child:TreeItem) {
-            this._children.push(child);
+            this.children.push(child);
             this.update();
         }
 
@@ -51,8 +51,8 @@
         /** hide all children of this item */
         public fold() {
             // Do nothing id no children
-            if (this._children.length > 0) {
-                for (let elem of this._children) {
+            if (this.children.length > 0) {
+                for (let elem of this.children) {
                     elem.toHtml().style.display = 'none';
                 }
                 this._div.classList.add('folded');
@@ -62,8 +62,8 @@
         /** Show all children of this item */
         public unfold() {
             // Do nothing id no children
-            if (this._children.length > 0) {
-                for (let elem of this._children) {
+            if (this.children.length > 0) {
+                for (let elem of this.children) {
                     elem.toHtml().style.display = 'block';
                 }
                 this._div.classList.add('unfolded');
@@ -110,11 +110,11 @@
             // Clean division holding all children
             Helpers.CleanDiv(this._lineContent);
 
-            for (let child of this._children) {
+            for (let child of this.children) {
                 let elem = child.toHtml();
                 this._lineContent.appendChild(elem);
             }
-            if (this._children.length > 0) {
+            if (this.children.length > 0) {
                 // Check if folded or not
                 if (!this._div.classList.contains('folded') && !this._div.classList.contains('unfolded')) {
                     this._div.classList.add('folded');
@@ -155,7 +155,7 @@
         public highlight(b:boolean) {
             // Remove highlight for all children 
             if (!b) {
-                for (let child of this._children) {
+                for (let child of this.children) {
                     child._adapter.highlight(b);
                 }
             }
@@ -171,7 +171,7 @@
         /** Set this item as active (background lighter) in the tree panel */
         public active(b:boolean) {
             this._div.classList.remove('active');
-            for (let child of this._children) {
+            for (let child of this.children) {
                 child.active(false);
             }
             if (b) {

+ 1 - 1
inspector/src/treetools/Info.ts

@@ -20,7 +20,7 @@ module INSPECTOR{
             this._obj = obj;
             this._elem.classList.add('fa-info-circle');
 
-            this._tooltip = new Tooltip(this._elem, this._obj.getInfo());
+            this._tooltip = new Tooltip(this._elem, this._obj.getInfo(), this._elem);
         }
 
         // Nothing to do on click

+ 2 - 4
inspector/test/index.js

@@ -16,10 +16,7 @@ var Test = (function () {
     Test.prototype._run = function () {
         var _this = this;
         this._initScene();
-        // BABYLON.DebugLayer.InspectorURL = 'http://localhost:1338/dist/preview release/inspector/babylon.inspector.js';
-        window.addEventListener('click', () => {
-            this.scene.debugLayer.show();
-        })
+        this.scene.debugLayer.show();
         this.scene.executeWhenReady(function () {
             _this._initGame();
             _this.engine.runRenderLoop(function () {
@@ -92,6 +89,7 @@ var Test = (function () {
     };
     Test.prototype._initGame = function () {
         this._createCanvas();
+        BABYLON.SceneLoader.ImportMesh('', 'test/', 'Rabbit.babylon', this.scene);
     };
     /**
      * Create the canvas2D

+ 5 - 1
readme.md

@@ -18,7 +18,11 @@ You can help by testing or contributing to the next version.
 - **2.6-alpha** can be found [here](https://github.com/BabylonJS/Babylon.js/tree/master/dist/preview%20release)
 - We are not complicated people, but we still have some [coding guidelines](http://doc.babylonjs.com/generals/Approved_Naming_Conventions)
 - Before submitting your PR, just check that everything goes well by [creating the minified version](http://doc.babylonjs.com/generals/Creating_the_Mini-fied_Version)
-- Need help to contribute? We have a [general purpose documentation for you](http://pixelcodr.com/tutos/contribute/contribute.html) and a [Visual Studio specific one](http://doc.babylonjs.com/generals/setup_visualStudio)
+- Need help contributing, here are some links:
+  - [Gulp](https://github.com/BabylonJS/Babylon.js/tree/master/Tools/Gulp) to build from command line.
+  - [VSCode Editor](https://code.visualstudio.com/), Microsoft Code editor, see [Julian Chenard's post](http://pixelcodr.com/tutos/contribute/contribute.html) a Microsoft code editor.
+  - [Visual Studio](http://doc.babylonjs.com/generals/setup_visualStudio), Microsoft's IDE.
+  - [Forum thread](http://www.html5gamedevs.com/topic/20456-contributing-on-babylonjs/) for assistance from our very helpful family.
 
 ## Documentation
 - [Documentation](http://doc.babylonjs.com)

+ 1 - 1
src/Rendering/babylon.renderingManager.ts

@@ -46,7 +46,7 @@
                 return;
             }
 
-            this._scene.getEngine().clear(0, false, depth, stencil);
+            this._scene.getEngine().clear(null, false, depth, stencil);
             this._depthStencilBufferAlreadyCleaned = true;
         }
 

+ 9 - 3
src/babylon.engine.ts

@@ -172,6 +172,9 @@
         public maxCubemapTextureSize: number;
         public maxRenderTextureSize: number;
         public maxVertexAttribs: number;
+        public maxVaryingVectors: number;
+        public maxVertexUniformVectors: number;
+        public maxFragmentUniformVectors: number;
         public standardDerivatives: boolean;
         public s3tc: WEBGL_compressed_texture_s3tc;
         public pvrtc: any; //WEBGL_compressed_texture_pvrtc;
@@ -572,6 +575,9 @@
             this._caps.maxCubemapTextureSize = this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE);
             this._caps.maxRenderTextureSize = this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE);
             this._caps.maxVertexAttribs = this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS);
+            this._caps.maxVaryingVectors = this._gl.getParameter(this._gl.MAX_VARYING_VECTORS);
+            this._caps.maxFragmentUniformVectors = this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS);
+            this._caps.maxVertexUniformVectors = this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS);
 
             // Infos
             this._glVersion = this._gl.getParameter(this._gl.VERSION);
@@ -957,12 +963,12 @@
             }
         }
 
-        public clear(color: any, backBuffer: boolean, depth: boolean, stencil: boolean = false): void {
+        public clear(color: Color4, backBuffer: boolean, depth: boolean, stencil: boolean = false): void {
             this.applyStates();
 
             var mode = 0;
-            if (backBuffer) {
-                this._gl.clearColor(color.r, color.g, color.b, color.a !== undefined ? color.a : 1.0);
+            if (backBuffer && color) {
+                this._gl.clearColor(color.r, color.g, color.b, color.a);
                 mode |= this._gl.COLOR_BUFFER_BIT;
             }
             if (depth) {

+ 14 - 11
src/babylon.scene.ts

@@ -143,7 +143,7 @@
 
         // Members
         public autoClear = true;
-        public clearColor: any = new Color3(0.2, 0.2, 0.3);
+        public clearColor: Color4 = new Color4(0.2, 0.2, 0.3, 1.0);
         public ambientColor = new Color3(0, 0, 0);
 
         public forceWireframe = false;
@@ -509,7 +509,10 @@
 
         private _animationRatio: number;
 
-        private _animationStartDate: number;
+        private _animationTimeLast: number;
+        private _animationTime: number = 0;
+        public animationTimeScale: number = 1;
+
         public _cachedMaterial: Material;
 
         private _renderId = 0;
@@ -1283,19 +1286,19 @@
                 return;
             }
 
-            if (!this._animationStartDate) {
+            // Getting time
+            var now = Tools.Now;
+            if (!this._animationTimeLast) {
                 if (this._pendingData.length > 0) {
                     return;
                 }
-
-                this._animationStartDate = Tools.Now;
+                this._animationTimeLast = now;
             }
-            // Getting time
-            var now = Tools.Now;
-            var delay = now - this._animationStartDate;
-
+            var deltaTime = (now - this._animationTimeLast) * this.animationTimeScale;
+            this._animationTime += deltaTime;
+            this._animationTimeLast = now;
             for (var index = 0; index < this._activeAnimatables.length; index++) {
-                this._activeAnimatables[index]._animate(delay);
+                this._activeAnimatables[index]._animate(this._animationTime);
             }
         }
 
@@ -2464,7 +2467,7 @@
             if (this.activeCameras.length > 0) {
                 for (var cameraIndex = 0; cameraIndex < this.activeCameras.length; cameraIndex++) {
                     if (cameraIndex > 0) {
-                        this._engine.clear(0, false, true, true);
+                        this._engine.clear(null, false, true, true);
                     }
 
                     this._processSubCameras(this.activeCameras[cameraIndex]);