Bläddra i källkod

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

Guide 6 år sedan
förälder
incheckning
ad11a25654
100 ändrade filer med 166808 tillägg och 2859 borttagningar
  1. 69 5
      Playground/babylon.d.txt
  2. 4 1
      Tools/Config/config.js
  3. 32 47
      Tools/Config/config.json
  4. 26 18
      Tools/Gulp/helpers/gulp-validateTypedoc.js
  5. 1 1
      Tools/Gulp/package.json
  6. 3 2
      Tools/Gulp/tasks/gulpTasks-libraries.js
  7. 3 2
      Tools/Gulp/tasks/gulpTasks-librariesES6.js
  8. 1 1
      Tools/Gulp/tasks/gulpTasks-viewerLibraries.js
  9. 1 1
      Tools/Gulp/tasks/gulpTasks-watchCore.js
  10. 7 8
      Tools/Publisher/tasks/processEs6Packages.js
  11. 2 2
      Tools/Publisher/tasks/processUMDPackages.js
  12. 2 2
      Tools/Publisher/tasks/processUMDViewer.js
  13. 1 1
      Viewer/tests/unit/tsconfig.json
  14. 65 4
      dist/preview release/babylon.d.ts
  15. 1 1
      dist/preview release/babylon.js
  16. 198 17
      dist/preview release/babylon.max.js
  17. 1 1
      dist/preview release/babylon.max.js.map
  18. 55882 2415
      dist/preview release/babylon.module.d.ts
  19. 1 1
      dist/preview release/glTF2Interface/package.json
  20. 4 1
      dist/preview release/gui/babylon.gui.d.ts
  21. 10 3
      dist/preview release/gui/babylon.gui.js
  22. 1 1
      dist/preview release/gui/babylon.gui.js.map
  23. 1 1
      dist/preview release/gui/babylon.gui.min.js
  24. 8 2
      dist/preview release/gui/babylon.gui.module.d.ts
  25. 2 2
      dist/preview release/gui/package.json
  26. 31 0
      dist/preview release/gui/readme-es6.md
  27. 6 6
      dist/preview release/inspector/package.json
  28. 27 0
      dist/preview release/inspector/readme-es6.md
  29. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.js.map
  30. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.js.map
  31. 1 1
      dist/preview release/loaders/babylonjs.loaders.js.map
  32. 3 3
      dist/preview release/loaders/package.json
  33. 24 0
      dist/preview release/loaders/readme-es6.md
  34. 6 6
      dist/preview release/materialsLibrary/babylon.cellMaterial.js
  35. 1 1
      dist/preview release/materialsLibrary/babylon.cellMaterial.js.map
  36. 4 4
      dist/preview release/materialsLibrary/babylon.customMaterial.js
  37. 1 1
      dist/preview release/materialsLibrary/babylon.customMaterial.js.map
  38. 6 6
      dist/preview release/materialsLibrary/babylon.fireMaterial.js
  39. 1 1
      dist/preview release/materialsLibrary/babylon.fireMaterial.js.map
  40. 6 6
      dist/preview release/materialsLibrary/babylon.furMaterial.js
  41. 1 1
      dist/preview release/materialsLibrary/babylon.furMaterial.js.map
  42. 6 6
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js
  43. 1 1
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js.map
  44. 6 6
      dist/preview release/materialsLibrary/babylon.gridMaterial.js
  45. 1 1
      dist/preview release/materialsLibrary/babylon.gridMaterial.js.map
  46. 6 6
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js
  47. 1 1
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js.map
  48. 6 6
      dist/preview release/materialsLibrary/babylon.mixMaterial.js
  49. 1 1
      dist/preview release/materialsLibrary/babylon.mixMaterial.js.map
  50. 6 6
      dist/preview release/materialsLibrary/babylon.normalMaterial.js
  51. 1 1
      dist/preview release/materialsLibrary/babylon.normalMaterial.js.map
  52. 6 6
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js
  53. 1 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js.map
  54. 6 6
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js
  55. 1 1
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js.map
  56. 6 6
      dist/preview release/materialsLibrary/babylon.skyMaterial.js
  57. 1 1
      dist/preview release/materialsLibrary/babylon.skyMaterial.js.map
  58. 6 6
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js
  59. 1 1
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js.map
  60. 6 6
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js
  61. 1 1
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js.map
  62. 7 7
      dist/preview release/materialsLibrary/babylon.waterMaterial.js
  63. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.js.map
  64. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  65. 47 47
      dist/preview release/materialsLibrary/babylonjs.materials.js
  66. 1 1
      dist/preview release/materialsLibrary/babylonjs.materials.js.map
  67. 1 1
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  68. 2 2
      dist/preview release/materialsLibrary/package.json
  69. 30 0
      dist/preview release/materialsLibrary/readme-es6.md
  70. 3 3
      dist/preview release/package.json
  71. 2 2
      dist/preview release/postProcessesLibrary/package.json
  72. 31 0
      dist/preview release/postProcessesLibrary/readme-es6.md
  73. 2 2
      dist/preview release/proceduralTexturesLibrary/package.json
  74. 34 0
      dist/preview release/proceduralTexturesLibrary/readme-es6.md
  75. 1 1
      dist/preview release/serializers/babylon.glTF2Serializer.js.map
  76. 1 1
      dist/preview release/serializers/babylonjs.serializers.js.map
  77. 3 3
      dist/preview release/serializers/package.json
  78. 29 0
      dist/preview release/serializers/readme-es6.md
  79. 109391 0
      dist/preview release/viewer/babylon.module.d.ts
  80. 5 1
      dist/preview release/viewer/babylon.viewer.d.ts
  81. 11 7
      dist/preview release/viewer/babylon.viewer.js
  82. 4 4
      dist/preview release/viewer/babylon.viewer.max.js
  83. 6 1
      dist/preview release/viewer/babylon.viewer.module.d.ts
  84. 6 0
      dist/preview release/what's new.md
  85. 6 2
      gui/src/2D/controls/container.ts
  86. 4 1
      gui/src/2D/controls/control.ts
  87. 2 6
      materialsLibrary/src/water/water.fragment.fx
  88. 2 2
      package.json
  89. 122 0
      readme-es6.md
  90. 118 0
      src/Actions/abstractActionManager.ts
  91. 33 1
      src/Actions/action.ts
  92. 19 2
      src/Actions/actionEvent.ts
  93. 7 58
      src/Actions/actionManager.ts
  94. 1 1
      src/Animations/animation.ts
  95. 1 0
      src/Audio/sound.ts
  96. 1 1
      src/Bones/boneLookController.ts
  97. 137 51
      src/Cameras/Inputs/followCameraKeyboardMoveInput.ts
  98. 147 0
      src/Cameras/Inputs/followCameraMouseWheelInput.ts
  99. 73 1
      src/Cameras/followCamera.ts
  100. 0 0
      src/Cameras/followCameraInputsManager.ts

+ 69 - 5
Playground/babylon.d.txt

@@ -1,4 +1,3 @@
-declare module 'babylonjs' { export = BABYLON; }
 declare module BABYLON {
     /** Alias type for value that can be null */
     export type Nullable<T> = T | null;
@@ -18805,6 +18804,7 @@ declare module BABYLON {
          */
         static readonly CAP_ALL: number;
         private _onBeforeRenderObservable;
+        private _onBeforeBindObservable;
         private _onAfterRenderObservable;
         private _onBeforeDrawObservable;
         /**
@@ -18812,6 +18812,10 @@ declare module BABYLON {
          */
         readonly onBeforeRenderObservable: Observable<Mesh>;
         /**
+         * An event triggered before binding the mesh
+         */
+        readonly onBeforeBindObservable: Observable<Mesh>;
+        /**
         * An event triggered after rendering the mesh
         */
         readonly onAfterRenderObservable: Observable<Mesh>;
@@ -23704,7 +23708,7 @@ declare module BABYLON {
          * @example : just set a vertex particle position
          * @returns the updated vertex
          */
-        updateParticleVertex(vertex: Vector3): Vector3;
+        updateParticleVertex(particle: SolidParticle, vertex: Vector3, pt: number): Vector3;
         /**
          * This will be called before any other treatment by `setParticles()` and will be passed three parameters.
          * This does nothing and may be overwritten by the user.
@@ -23712,7 +23716,7 @@ declare module BABYLON {
          * @param stop the particle index in the particle array where to stop to iterate, same than the value passed to setParticle()
          * @param update the boolean update value actually passed to setParticles()
          */
-        beforeUpdateParticles(): void;
+        beforeUpdateParticles(start?: number, stop?: number, update?: boolean): void;
         /**
          * This will be called  by `setParticles()` after all the other treatments and just before the actual mesh update.
          * This will be passed three parameters.
@@ -23721,7 +23725,7 @@ declare module BABYLON {
          * @param stop the particle index in the particle array where to stop to iterate, same than the value passed to setParticle()
          * @param update the boolean update value actually passed to setParticles()
          */
-        afterUpdateParticles(): void;
+        afterUpdateParticles(start?: number, stop?: number, update?: boolean): void;
     }
 }
 declare module BABYLON {
@@ -36498,6 +36502,63 @@ declare module BABYLON {
 }
 declare module BABYLON {
     /**
+     * Manage the mouse wheel inputs to control a follow camera.
+     * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+     */
+    export class FollowCameraMouseWheelInput implements ICameraInput<FollowCamera> {
+        /**
+         * Defines the camera the input is attached to.
+         */
+        camera: FollowCamera;
+        /**
+         * Moue wheel controls zoom. (Moue wheel modifies camera.radius value.)
+         */
+        axisControlRadius: boolean;
+        /**
+         * Moue wheel controls height. (Moue wheel modifies camera.heightOffset value.)
+         */
+        axisControlHeight: boolean;
+        /**
+         * Moue wheel controls angle. (Moue wheel modifies camera.rotationOffset value.)
+         */
+        axisControlRotation: boolean;
+        /**
+         * Gets or Set the mouse wheel precision or how fast is the camera moves in
+         * relation to mouseWheel events.
+         */
+        wheelPrecision: number;
+        /**
+         * wheelDeltaPercentage will be used instead of wheelPrecision if different from 0.
+         * It defines the percentage of current camera.radius to use as delta when wheel is used.
+         */
+        wheelDeltaPercentage: number;
+        private _wheel;
+        private _observer;
+        /**
+         * Attach the input controls to a specific dom element to get the input from.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         */
+        attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
+        /**
+         * Detach the current controls from the specified dom element.
+         * @param element Defines the element to stop listening the inputs from
+         */
+        detachControl(element: Nullable<HTMLElement>): void;
+        /**
+         * Gets the class name of the current intput.
+         * @returns the class name
+         */
+        getClassName(): string;
+        /**
+         * Get the friendly name associated with the input class.
+         * @returns the input friendly name
+         */
+        getSimpleName(): string;
+    }
+}
+declare module BABYLON {
+    /**
      * Default Inputs manager for the FollowCamera.
      * It groups all the default supported inputs for ease of use.
      * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
@@ -53318,7 +53379,10 @@ declare module BABYLON.GUI {
         isPointerBlocker: boolean;
         /** Gets or sets a boolean indicating if the control can be focusable */
         isFocusInvisible: boolean;
-        /** Gets or sets a boolean indicating if the children are clipped to the current control bounds */
+        /**
+         * Gets or sets a boolean indicating if the children are clipped to the current control bounds.
+         * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
+         */
         clipChildren: boolean;
         /**
          * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)

+ 4 - 1
Tools/Config/config.js

@@ -21,6 +21,8 @@ const tempTypingsFileName = tempTypingsAMDFileName.replace(".js", ".d.ts");
 const tempTypingsAMDFilePath = path.join(tempFolder, tempTypingsAMDFileName);
 const tempTypingsFilePath = path.join(tempFolder, tempTypingsFileName);
 
+const tscPath = path.resolve(rootFolder, "node_modules/typescript/bin/tsc");
+
 config.computed = {
     rootFolder,
     tempFolder,
@@ -36,7 +38,8 @@ config.computed = {
     tempTypingsAMDFileName,
     tempTypingsFileName,
     tempTypingsAMDFilePath,
-    tempTypingsFilePath
+    tempTypingsFilePath,
+    tscPath
 }
 
 config.additionalNpmPackages.forEach(package => {

+ 32 - 47
Tools/Config/config.json

@@ -102,29 +102,28 @@
                             "path": "babylonjs/Debug/skeletonViewer",
                             "namespace": "BABYLON.Debug"
                         }
-                    ],
-                    "doNotAppendNamespace": true,
-                    "prependToNamespaceText": "declare module 'babylonjs' { export = BABYLON; }"
+                    ]
                 },
+                "requiredFiles": [
+                    "readme.md"
+                ],
                 "packagesFiles": [
-                    "babylon.d.ts",
+                    "babylon.module.d.ts",
                     "babylon.js",
                     "babylon.max.js",
                     "babylon.max.js.map",
                     "Oimo.js",
                     "readme.md"
                 ],
-                "typings": "babylon.d.ts",
+                "typings": "babylon.module.d.ts",
                 "index": "babylon.js",
                 "dependencies": [],
                 "devDependencies": []
             },
             "es6": {
-                "packageName": "@babylonjs/core"
-            },
-            "requiredFiles": [
-                "readme.md"
-            ]
+                "packageName": "@babylonjs/core",
+                "readme": "readme-es6.md"
+            }
         }
     },
     "materialsLibrary": {
@@ -225,9 +224,7 @@
             },
             "es6": {
                 "packageName": "@babylonjs/materials",
-                "requiredFiles": [
-                    "dist/preview release/materialsLibrary/readme.md"
-                ]
+                "readme": "dist/preview release/materialsLibrary/readme-es6.md"
             }
         }
     },
@@ -264,9 +261,7 @@
             },
             "es6": {
                 "packageName": "@babylonjs/post-processes",
-                "requiredFiles": [
-                    "dist/preview release/postProcessesLibrary/readme.md"
-                ]
+                "readme": "dist/preview release/postProcessesLibrary/readme-es6.md"
             }
         }
     },
@@ -343,9 +338,7 @@
             },
             "es6": {
                 "packageName": "@babylonjs/procedural-textures",
-                "requiredFiles": [
-                    "dist/preview release/proceduralTexturesLibrary/readme.md"
-                ]
+                "readme": "dist/preview release/proceduralTexturesLibrary/readme-es6.md"
             }
         }
     },
@@ -416,9 +409,7 @@
             },
             "es6": {
                 "packageName": "@babylonjs/loaders",
-                "requiredFiles": [
-                    "dist/preview release/loaders/readme.md"
-                ]
+                "readme": "dist/preview release/loaders/readme-es6.md"
             }
         }
     },
@@ -476,9 +467,7 @@
             },
             "es6": {
                 "packageName": "@babylonjs/serializers",
-                "requiredFiles": [
-                    "dist/preview release/serializers/readme.md"
-                ]
+                "readme": "dist/preview release/serializers/readme-es6.md"
             }
         }
     },
@@ -507,9 +496,7 @@
             },
             "es6": {
                 "packageName": "@babylonjs/gui",
-                "requiredFiles": [
-                    "dist/preview release/gui/readme.md"
-                ]
+                "readme": "dist/preview release/gui/readme-es6.md"
             }
         }
     },
@@ -553,9 +540,7 @@
                     ]
                 },
                 "packageName": "@babylonjs/inspector",
-                "requiredFiles": [
-                    "dist/preview release/inspector/readme.md"
-                ],
+                "readme": "dist/preview release/inspector/readme-es6.md",
                 "packagesFiles": [
                     "babylon.inspector.bundle.max.js",
                     "babylon.inspector.bundle.max.js.map",
@@ -591,7 +576,7 @@
                 "processDeclaration": {
                     "moduleName": "BabylonViewer",
                     "doNotAppendNamespace": true,
-                    "prependText": "/// <reference path=\"./babylon.d.ts\"/>\n/// <reference path=\"./babylon.glTF2Interface.d.ts\"/>\n/// <reference path=\"./babylonjs.loaders.d.ts\"/>\ndeclare module \"babylonjs-loaders\"{ export=BABYLON;}\n",
+                    "prependText": "/// <reference path=\"./babylon.module.d.ts\"/>\n/// <reference path=\"./babylon.glTF2Interface.d.ts\"/>\n/// <reference path=\"./babylonjs.loaders.d.ts\"/>\ndeclare module \"babylonjs-loaders\"{ export=BABYLON;}\n",
                     "importsToRemove": [
                         "pep",
                         "babylonjs-loaders"
@@ -600,7 +585,13 @@
                         "babylonjs": "BABYLON",
                         "babylonjs-loaders": "BABYLON"
                     }
-                }
+                },
+                "requiredFiles": [
+                    "dist/preview release/viewer/readme.md",
+                    "dist/preview release/viewer/package.json",
+                    "dist/preview release/viewer/babylon.viewer.js",
+                    "dist/preview release/viewer/babylon.viewer.max.js"
+                ]
             },
             "outputs": [
                 {
@@ -613,7 +604,7 @@
                             "filename": "babylon.viewer.js",
                             "outputDirectory": "/viewer/",
                             "addBabylonDeclaration": [
-                                "babylon.d.ts",
+                                "babylon.module.d.ts",
                                 "loaders/babylonjs.loaders.d.ts",
                                 "glTF2Interface/babylon.glTF2Interface.d.ts"
                             ]
@@ -634,13 +625,7 @@
                     ]
                 }
             ],
-            "legacyPackageOutputDirectory": "../../../Viewer/build/src/",
-            "requiredFiles": [
-                "dist/preview release/viewer/readme.md",
-                "dist/preview release/viewer/package.json",
-                "dist/preview release/viewer/babylon.viewer.js",
-                "dist/preview release/viewer/babylon.viewer.max.js"
-            ]
+            "legacyPackageOutputDirectory": "../../../Viewer/build/src/"
         }
     },
     "viewer-assets": {
@@ -658,7 +643,11 @@
             "webpack": "../../../Viewer/webpack.assets.config.js",
             "distOutputDirectory": "/viewer/",
             "umd": {
-                "packageName": "babylonjs-viewer-assets"
+                "packageName": "babylonjs-viewer-assets",
+                "requiredFiles": [
+                    "Viewer/assets/readme.md",
+                    "Viewer/assets/package.json"
+                ]
             },
             "dtsBundle": {
                 "name": "babylonjs-viewer-assets",
@@ -676,11 +665,7 @@
                     "minified": true
                 }
             ],
-            "legacyPackageOutputDirectory": "../../../Viewer/build/assets/",
-            "requiredFiles": [
-                "Viewer/assets/readme.md",
-                "Viewer/assets/package.json"
-            ]
+            "legacyPackageOutputDirectory": "../../../Viewer/build/assets/"
         }
     }
 }

+ 26 - 18
Tools/Gulp/helpers/gulp-validateTypedoc.js

@@ -305,22 +305,25 @@ Validate.prototype.validateTypedocNamespace = function (namespace) {
                                         "Unrecognized tag " + tags + " at " + signatureNode.name + " (id: " + signatureNode.id + ") in " + containerNode.name + " (id: " + containerNode.id + ")", Validate.position(childNode));
                                 }
 
-                                if (signatureNode.type.name !== "void" && signatureNode.comment && !signatureNode.comment.returns) {
-                                    this.errorCallback(containerNode.name,
-                                        signatureNode.name,
-                                        childNode.kindString,
-                                        "Comments",
-                                        "MissingReturn",
-                                        "No Return Comment at " + signatureNode.name + " (id: " + signatureNode.id + ") in " + containerNode.name + " (id: " + containerNode.id + ")", Validate.position(childNode));
-                                }
-
-                                if (signatureNode.type.name === "void" && signatureNode.comment && signatureNode.comment.returns) {
-                                    this.errorCallback(containerNode.name,
-                                        signatureNode.name,
-                                        childNode.kindString,
-                                        "Comments",
-                                        "UselessReturn",
-                                        "No Return Comment Needed at " + signatureNode.name + " (id: " + signatureNode.id + ") in " + containerNode.name + " (id: " + containerNode.id + ")", Validate.position(childNode));
+                                if (signatureNode.kindString !== "Constructor" && 
+                                    signatureNode.kindString !== "Constructor signature") {
+                                    if (signatureNode.type.name !== "void" && signatureNode.comment && !signatureNode.comment.returns) {
+                                        this.errorCallback(containerNode.name,
+                                            signatureNode.name,
+                                            childNode.kindString,
+                                            "Comments",
+                                            "MissingReturn",
+                                            "No Return Comment at " + signatureNode.name + " (id: " + signatureNode.id + ") in " + containerNode.name + " (id: " + containerNode.id + ")", Validate.position(childNode));
+                                    }
+    
+                                    if (signatureNode.type.name === "void" && signatureNode.comment && signatureNode.comment.returns) {
+                                        this.errorCallback(containerNode.name,
+                                            signatureNode.name,
+                                            childNode.kindString,
+                                            "Comments",
+                                            "UselessReturn",
+                                            "No Return Comment Needed at " + signatureNode.name + " (id: " + signatureNode.id + ") in " + containerNode.name + " (id: " + containerNode.id + ")", Validate.position(childNode));
+                                    }
                                 }
                             }
 
@@ -371,7 +374,6 @@ Validate.prototype.validateTags = function (node) {
  * Validate that a JSON node has the correct TypeDoc comments
  */
 Validate.prototype.validateComment = function (node) {
-
     // Return-only methods are allowed to just have a @return tag
     if ((node.kindString === "Call signature" || node.kindString === "Accessor") && !node.parameters && node.comment && node.comment.returns) {
         return true;
@@ -395,7 +397,7 @@ Validate.prototype.validateComment = function (node) {
     // Check comments.
     if (node.comment) {
         if (node.comment.text || node.comment.shortText) {
-            return true;
+            return node.kindString !== "Constructor";
         }
 
         return false;
@@ -428,6 +430,12 @@ Validate.prototype.validateParameters = function (containerNode, method, signatu
         }
 
         if (this.validateNamingConvention && !Validate.camelCase.test(parametersNode.name)) {
+            if (containerNode.kindString === "Constructor" ||
+                containerNode.kindString !== "Constructor signature") {
+                    if (Validate.underscoreCamelCase.test(parametersNode.name)) {
+                        continue;
+                    }
+                }
             this.errorCallback([containerNode.name, method.kindString, signature.name],
                 parametersNode.name,
                 parametersNode.kindString,

+ 1 - 1
Tools/Gulp/package.json

@@ -12,4 +12,4 @@
         "install": "cd ../../ && npm install && cd Playground/ && npm install && cd ../Viewer && npm install && cd ../Tools/Gulp/",
         "build": "gulp --max-old-space-size=8192 --tsLintFix"
     }
-}
+}

+ 3 - 2
Tools/Gulp/tasks/gulpTasks-libraries.js

@@ -17,7 +17,8 @@ var del = require("del");
 // Parse Command Line.
 var commandLineOptions = minimist(process.argv.slice(2), {
     boolean: ["noNamespace"],
-    string: ["moduleName"]
+    string: ["moduleName"],
+    string: ["tscPath"]
 });
 
 // Import Build Config
@@ -95,7 +96,7 @@ var buildAMDDTSFiles = function(libraries, settings, cb) {
     let library = libraries[0];
     if (!library.preventLoadLibrary) {
         // Generate DTS the old way...
-        cp.execSync(`tsc --module amd --outFile "${config.computed.tempTypingsAMDFilePath}" --emitDeclarationOnly true`, {
+        cp.execSync(`node "${commandLineOptions.tscPath || config.computed.tscPath}" --module amd --outFile "${config.computed.tempTypingsAMDFilePath}" --emitDeclarationOnly true`, {
             cwd: settings.computed.srcDirectory
         });
     }

+ 3 - 2
Tools/Gulp/tasks/gulpTasks-librariesES6.js

@@ -187,7 +187,7 @@ var build = function(settings, cb) {
         verbose: true
     };
 
-    let command = `tsc --inlineSources --sourceMap true -t es5 -m esNext --outDir "${settings.computed.distES6Directory}"`;
+    let command = `node "${config.computed.tscPath}" --skipLibCheck false --inlineSources --sourceMap true -t es5 -m esNext --outDir "${settings.computed.distES6Directory}"`;
     shelljs.exec(command, options, function(code, stdout, stderr) {
         if (stderr) {
             console.log(stderr);
@@ -216,7 +216,8 @@ var buildWebpack = function(settings, module, cb) {
         verbose: true
     };
 
-    let command = `gulp ${module} --noNamespace --moduleName ${settings.build.es6.packageName}`;
+    let command = `gulp ${module} --noNamespace --moduleName ${settings.build.es6.packageName} --tscPath "${config.computed.tscPath}"`;
+    console.log(command)
     shelljs.exec(command, options, function(code, stdout, stderr) {
         if (stderr) {
             console.log(stderr);

+ 1 - 1
Tools/Gulp/tasks/gulpTasks-viewerLibraries.js

@@ -68,7 +68,7 @@ var buildViewerLibrary = function(library, settings) {
             if (dest.addBabylonDeclaration) {
                 // include the babylon declaration
                 if (dest.addBabylonDeclaration === true) {
-                    dest.addBabylonDeclaration = ["babylon.d.ts"];
+                    dest.addBabylonDeclaration = ["babylon.module.d.ts"];
                 }
                 var decsToAdd = dest.addBabylonDeclaration.map(function(dec) {
                     return config.build.outputDirectory + '/' + dec;

+ 1 - 1
Tools/Gulp/tasks/gulpTasks-watchCore.js

@@ -54,7 +54,7 @@ gulp.task("watchCore", gulp.series("watchCore-buildShaders", function watch() {
         async: true,
         verbose: true
     };
-    shelljs.exec(`tsc --importHelpers false --isolatedModules true --declaration false --target es5 --module es2015 --outDir "${outputDirectory}" -w`, options, function(code, stdout, stderr) {
+    shelljs.exec(`node "${config.computed.tscPath}" --importHelpers false --isolatedModules true --declaration false --target es5 --module es2015 --outDir "${outputDirectory}" -w`, options, function(code, stdout, stderr) {
         if (stderr) {
             console.log(stderr);
         }

+ 7 - 8
Tools/Publisher/tasks/processEs6Packages.js

@@ -32,14 +32,6 @@ function processEs6Packages(version) {
         colorConsole.log("    Copy Dist folder " + distPath.cyan + " to " + packagePath.cyan);
         fs.copySync(distPath, packagePath);
 
-        if (module.build.requiredFiles) {
-            module.build.requiredFiles.forEach(file => {
-                let source = path.join(config.computed.rootFolder, file);
-                let destination = path.join(packagePath, path.basename(file));
-                colorConsole.log("    Copy required file: ", source.cyan, destination.cyan);
-                fs.copySync(source, destination);
-            });
-        }
         if (es6Config.requiredFiles) {
             es6Config.requiredFiles.forEach(file => {
                 let source = path.join(config.computed.rootFolder, file);
@@ -49,6 +41,13 @@ function processEs6Packages(version) {
             });
         }
 
+        if (es6Config.readme) {
+            let source = path.join(config.computed.rootFolder, es6Config.readme);
+            let destination = path.join(packagePath, "readme.md");
+            colorConsole.log("    Copy es6 readme file: ", source.cyan, destination.cyan);
+            fs.copySync(source, destination);
+        }
+
         umdPackageJson.name = es6Config.packageName;
         umdPackageJson.version = version;
         umdPackageJson.main = es6Config.index || "index.js";

+ 2 - 2
Tools/Publisher/tasks/processUMDPackages.js

@@ -32,8 +32,8 @@ function processUMDPackages(version) {
                 outputDirectory = module.computed.distDirectory;
             }
 
-            if (module.build.requiredFiles) {
-                module.build.requiredFiles.forEach(file => {
+            if (module.build.umd.requiredFiles) {
+                module.build.umd.requiredFiles.forEach(file => {
                     let source = path.join(config.computed.rootFolder, file);
                     let destination = path.join(outputDirectory, path.basename(file));
                     colorConsole.log("    Copy required file: ", source.cyan, destination.cyan);

+ 2 - 2
Tools/Publisher/tasks/processUMDViewer.js

@@ -19,8 +19,8 @@ function processUMDViewer(module, version) {
     let projectPath = '../../../Viewer';
     let buildPath = path.resolve(__dirname, projectPath + "/build/src/");
 
-    if (module.build.requiredFiles) {
-        module.build.requiredFiles.forEach(file => {
+    if (module.build.umd.requiredFiles) {
+        module.build.umd.requiredFiles.forEach(file => {
             let source = path.join(config.computed.rootFolder, file);
             let destination = path.join(buildPath, path.basename(file));
             colorConsole.log("    Copy required file: ", source.cyan, destination.cyan);

+ 1 - 1
Viewer/tests/unit/tsconfig.json

@@ -23,7 +23,7 @@
         "rootDir": "../../",
         "paths": {
             "babylonjs": [
-                "../../../../dist/preview release/babylon.d.ts"
+                "../../../../dist/preview release/babylon.module.d.ts"
             ],
             "babylonjs-loaders": [
                 "../../../../dist/preview release/loaders/babylonjs.loaders.module.d.ts"

+ 65 - 4
dist/preview release/babylon.d.ts

@@ -1,4 +1,3 @@
-declare module 'babylonjs' { export = BABYLON; }
 declare module BABYLON {
     /** Alias type for value that can be null */
     export type Nullable<T> = T | null;
@@ -19057,6 +19056,7 @@ declare module BABYLON {
          */
         static readonly CAP_ALL: number;
         private _onBeforeRenderObservable;
+        private _onBeforeBindObservable;
         private _onAfterRenderObservable;
         private _onBeforeDrawObservable;
         /**
@@ -19064,6 +19064,10 @@ declare module BABYLON {
          */
         readonly onBeforeRenderObservable: Observable<Mesh>;
         /**
+         * An event triggered before binding the mesh
+         */
+        readonly onBeforeBindObservable: Observable<Mesh>;
+        /**
         * An event triggered after rendering the mesh
         */
         readonly onAfterRenderObservable: Observable<Mesh>;
@@ -24046,7 +24050,7 @@ declare module BABYLON {
          * @example : just set a vertex particle position
          * @returns the updated vertex
          */
-        updateParticleVertex(vertex: Vector3): Vector3;
+        updateParticleVertex(particle: SolidParticle, vertex: Vector3, pt: number): Vector3;
         /**
          * This will be called before any other treatment by `setParticles()` and will be passed three parameters.
          * This does nothing and may be overwritten by the user.
@@ -24054,7 +24058,7 @@ declare module BABYLON {
          * @param stop the particle index in the particle array where to stop to iterate, same than the value passed to setParticle()
          * @param update the boolean update value actually passed to setParticles()
          */
-        beforeUpdateParticles(): void;
+        beforeUpdateParticles(start?: number, stop?: number, update?: boolean): void;
         /**
          * This will be called  by `setParticles()` after all the other treatments and just before the actual mesh update.
          * This will be passed three parameters.
@@ -24063,7 +24067,7 @@ declare module BABYLON {
          * @param stop the particle index in the particle array where to stop to iterate, same than the value passed to setParticle()
          * @param update the boolean update value actually passed to setParticles()
          */
-        afterUpdateParticles(): void;
+        afterUpdateParticles(start?: number, stop?: number, update?: boolean): void;
     }
 }
 declare module BABYLON {
@@ -37087,6 +37091,63 @@ declare module BABYLON {
 }
 declare module BABYLON {
     /**
+     * Manage the mouse wheel inputs to control a follow camera.
+     * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+     */
+    export class FollowCameraMouseWheelInput implements ICameraInput<FollowCamera> {
+        /**
+         * Defines the camera the input is attached to.
+         */
+        camera: FollowCamera;
+        /**
+         * Moue wheel controls zoom. (Moue wheel modifies camera.radius value.)
+         */
+        axisControlRadius: boolean;
+        /**
+         * Moue wheel controls height. (Moue wheel modifies camera.heightOffset value.)
+         */
+        axisControlHeight: boolean;
+        /**
+         * Moue wheel controls angle. (Moue wheel modifies camera.rotationOffset value.)
+         */
+        axisControlRotation: boolean;
+        /**
+         * Gets or Set the mouse wheel precision or how fast is the camera moves in
+         * relation to mouseWheel events.
+         */
+        wheelPrecision: number;
+        /**
+         * wheelDeltaPercentage will be used instead of wheelPrecision if different from 0.
+         * It defines the percentage of current camera.radius to use as delta when wheel is used.
+         */
+        wheelDeltaPercentage: number;
+        private _wheel;
+        private _observer;
+        /**
+         * Attach the input controls to a specific dom element to get the input from.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         */
+        attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
+        /**
+         * Detach the current controls from the specified dom element.
+         * @param element Defines the element to stop listening the inputs from
+         */
+        detachControl(element: Nullable<HTMLElement>): void;
+        /**
+         * Gets the class name of the current intput.
+         * @returns the class name
+         */
+        getClassName(): string;
+        /**
+         * Get the friendly name associated with the input class.
+         * @returns the input friendly name
+         */
+        getSimpleName(): string;
+    }
+}
+declare module BABYLON {
+    /**
      * Default Inputs manager for the FollowCamera.
      * It groups all the default supported inputs for ease of use.
      * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/babylon.js


+ 198 - 17
dist/preview release/babylon.max.js

@@ -13838,6 +13838,166 @@ _Cameras_cameraInputsManager__WEBPACK_IMPORTED_MODULE_1__["CameraInputTypes"]["F
 
 /***/ }),
 
+/***/ "./Cameras/Inputs/followCameraMouseWheelInput.ts":
+/*!*******************************************************!*\
+  !*** ./Cameras/Inputs/followCameraMouseWheelInput.ts ***!
+  \*******************************************************/
+/*! exports provided: FollowCameraMouseWheelInput */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FollowCameraMouseWheelInput", function() { return FollowCameraMouseWheelInput; });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Misc/decorators */ "./Misc/decorators.ts");
+/* harmony import */ var _Cameras_cameraInputsManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Cameras/cameraInputsManager */ "./Cameras/cameraInputsManager.ts");
+/* harmony import */ var _Events_pointerEvents__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Events/pointerEvents */ "./Events/pointerEvents.ts");
+
+
+
+
+/**
+ * Manage the mouse wheel inputs to control a follow camera.
+ * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+ */
+var FollowCameraMouseWheelInput = /** @class */ (function () {
+    function FollowCameraMouseWheelInput() {
+        /**
+         * Moue wheel controls zoom. (Moue wheel modifies camera.radius value.)
+         */
+        this.axisControlRadius = true;
+        /**
+         * Moue wheel controls height. (Moue wheel modifies camera.heightOffset value.)
+         */
+        this.axisControlHeight = false;
+        /**
+         * Moue wheel controls angle. (Moue wheel modifies camera.rotationOffset value.)
+         */
+        this.axisControlRotation = false;
+        /**
+         * Gets or Set the mouse wheel precision or how fast is the camera moves in
+         * relation to mouseWheel events.
+         */
+        this.wheelPrecision = 3.0;
+        /**
+         * wheelDeltaPercentage will be used instead of wheelPrecision if different from 0.
+         * It defines the percentage of current camera.radius to use as delta when wheel is used.
+         */
+        this.wheelDeltaPercentage = 0;
+    }
+    /**
+     * Attach the input controls to a specific dom element to get the input from.
+     * @param element Defines the element the controls should be listened from
+     * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+     */
+    FollowCameraMouseWheelInput.prototype.attachControl = function (element, noPreventDefault) {
+        var _this = this;
+        this._wheel = function (p, s) {
+            // sanity check - this should be a PointerWheel event.
+            if (p.type !== _Events_pointerEvents__WEBPACK_IMPORTED_MODULE_3__["PointerEventTypes"].POINTERWHEEL) {
+                return;
+            }
+            var event = p.event;
+            var delta = 0;
+            // Chrome, Safari: event.deltaY
+            // IE: event.wheelDelta
+            // Firefox: event.detail (inverted)
+            var wheelDelta = Math.max(-1, Math.min(1, (event.deltaY || event.wheelDelta || -event.detail)));
+            if (_this.wheelDeltaPercentage) {
+                console.assert((_this.axisControlRadius +
+                    _this.axisControlHeight +
+                    _this.axisControlRotation) <= 1, "wheelDeltaPercentage only usable when mouse wheel " +
+                    "controlls ONE axis. " +
+                    "Currently enabled: " +
+                    "axisControlRadius: " + _this.axisControlRadius +
+                    ", axisControlHeightOffset: " + _this.axisControlHeight +
+                    ", axisControlRotationOffset: " + _this.axisControlRotation);
+                if (_this.axisControlRadius) {
+                    delta =
+                        wheelDelta * 0.01 * _this.wheelDeltaPercentage *
+                            _this.camera.radius;
+                }
+                else if (_this.axisControlHeight) {
+                    delta =
+                        wheelDelta * 0.01 * _this.wheelDeltaPercentage *
+                            _this.camera.heightOffset;
+                }
+                else if (_this.axisControlRotation) {
+                    delta =
+                        wheelDelta * 0.01 * _this.wheelDeltaPercentage *
+                            _this.camera.rotationOffset;
+                }
+            }
+            else {
+                delta = wheelDelta * _this.wheelPrecision;
+            }
+            if (delta) {
+                if (_this.axisControlRadius) {
+                    _this.camera.radius += delta;
+                }
+                else if (_this.axisControlHeight) {
+                    _this.camera.heightOffset += delta;
+                }
+                else if (_this.axisControlRotation) {
+                    _this.camera.rotationOffset += delta;
+                }
+            }
+            if (event.preventDefault) {
+                if (!noPreventDefault) {
+                    event.preventDefault();
+                }
+            }
+        };
+        this._observer = this.camera.getScene().onPointerObservable.add(this._wheel, _Events_pointerEvents__WEBPACK_IMPORTED_MODULE_3__["PointerEventTypes"].POINTERWHEEL);
+    };
+    /**
+     * Detach the current controls from the specified dom element.
+     * @param element Defines the element to stop listening the inputs from
+     */
+    FollowCameraMouseWheelInput.prototype.detachControl = function (element) {
+        if (this._observer && element) {
+            this.camera.getScene().onPointerObservable.remove(this._observer);
+            this._observer = null;
+            this._wheel = null;
+        }
+    };
+    /**
+     * Gets the class name of the current intput.
+     * @returns the class name
+     */
+    FollowCameraMouseWheelInput.prototype.getClassName = function () {
+        return "ArcRotateCameraMouseWheelInput";
+    };
+    /**
+     * Get the friendly name associated with the input class.
+     * @returns the input friendly name
+     */
+    FollowCameraMouseWheelInput.prototype.getSimpleName = function () {
+        return "mousewheel";
+    };
+    tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
+        Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])()
+    ], FollowCameraMouseWheelInput.prototype, "axisControlRadius", void 0);
+    tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
+        Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])()
+    ], FollowCameraMouseWheelInput.prototype, "axisControlHeight", void 0);
+    tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
+        Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])()
+    ], FollowCameraMouseWheelInput.prototype, "axisControlRotation", void 0);
+    tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
+        Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])()
+    ], FollowCameraMouseWheelInput.prototype, "wheelPrecision", void 0);
+    tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
+        Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])()
+    ], FollowCameraMouseWheelInput.prototype, "wheelDeltaPercentage", void 0);
+    return FollowCameraMouseWheelInput;
+}());
+
+_Cameras_cameraInputsManager__WEBPACK_IMPORTED_MODULE_2__["CameraInputTypes"]["FollowCameraMouseWheelInput"] = FollowCameraMouseWheelInput;
+
+
+/***/ }),
+
 /***/ "./Cameras/Inputs/freeCameraDeviceOrientationInput.ts":
 /*!************************************************************!*\
   !*** ./Cameras/Inputs/freeCameraDeviceOrientationInput.ts ***!
@@ -22283,7 +22443,7 @@ var FollowCamera = /** @class */ (function (_super) {
         _this.maxCameraSpeed = 20;
         _this.lockedTarget = lockedTarget;
         _this.inputs = new _followCameraInputsManager__WEBPACK_IMPORTED_MODULE_6__["FollowCameraInputsManager"](_this);
-        _this.inputs.addKeyboard();
+        _this.inputs.addKeyboard().addMouseWheel();
         return _this;
         // Uncomment the following line when the relevant handlers have been implemented.
         // this.inputs.addKeyboard().addMouseWheel().addPointers().addVRDeviceOrientation();
@@ -22458,6 +22618,8 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
 /* harmony import */ var _cameraInputsManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cameraInputsManager */ "./Cameras/cameraInputsManager.ts");
 /* harmony import */ var _Inputs_followCameraKeyboardMoveInput__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Inputs/followCameraKeyboardMoveInput */ "./Cameras/Inputs/followCameraKeyboardMoveInput.ts");
+/* harmony import */ var _Inputs_followCameraMouseWheelInput__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Inputs/followCameraMouseWheelInput */ "./Cameras/Inputs/followCameraMouseWheelInput.ts");
+
 
 
 
@@ -22488,7 +22650,7 @@ var FollowCameraInputsManager = /** @class */ (function (_super) {
      * @returns the current input manager
      */
     FollowCameraInputsManager.prototype.addMouseWheel = function () {
-        console.warn("MouseWheel support not yet implemented for FollowCamera.");
+        this.add(new _Inputs_followCameraMouseWheelInput__WEBPACK_IMPORTED_MODULE_3__["FollowCameraMouseWheelInput"]());
         return this;
     };
     /**
@@ -43547,7 +43709,7 @@ var HighlightLayer = /** @class */ (function (_super) {
         if (!meshExcluded) {
             this._excludedMeshes[mesh.uniqueId] = {
                 mesh: mesh,
-                beforeRender: mesh.onBeforeRenderObservable.add(function (mesh) {
+                beforeBind: mesh.onBeforeBindObservable.add(function (mesh) {
                     mesh.getEngine().setStencilBuffer(false);
                 }),
                 afterRender: mesh.onAfterRenderObservable.add(function (mesh) {
@@ -43566,8 +43728,8 @@ var HighlightLayer = /** @class */ (function (_super) {
         }
         var meshExcluded = this._excludedMeshes[mesh.uniqueId];
         if (meshExcluded) {
-            if (meshExcluded.beforeRender) {
-                mesh.onBeforeRenderObservable.remove(meshExcluded.beforeRender);
+            if (meshExcluded.beforeBind) {
+                mesh.onBeforeBindObservable.remove(meshExcluded.beforeBind);
             }
             if (meshExcluded.afterRender) {
                 mesh.onAfterRenderObservable.remove(meshExcluded.afterRender);
@@ -43610,7 +43772,7 @@ var HighlightLayer = /** @class */ (function (_super) {
                 mesh: mesh,
                 color: color,
                 // Lambda required for capture due to Observable this context
-                observerHighlight: mesh.onBeforeRenderObservable.add(function (mesh) {
+                observerHighlight: mesh.onBeforeBindObservable.add(function (mesh) {
                     if (_this._excludedMeshes && _this._excludedMeshes[mesh.uniqueId]) {
                         _this._defaultStencilReference(mesh);
                     }
@@ -43638,7 +43800,7 @@ var HighlightLayer = /** @class */ (function (_super) {
         var meshHighlight = this._meshes[mesh.uniqueId];
         if (meshHighlight) {
             if (meshHighlight.observerHighlight) {
-                mesh.onBeforeRenderObservable.remove(meshHighlight.observerHighlight);
+                mesh.onBeforeBindObservable.remove(meshHighlight.observerHighlight);
             }
             if (meshHighlight.observerDefault) {
                 mesh.onAfterRenderObservable.remove(meshHighlight.observerDefault);
@@ -43679,7 +43841,7 @@ var HighlightLayer = /** @class */ (function (_super) {
                 var meshHighlight = this._meshes[id];
                 if (meshHighlight && meshHighlight.mesh) {
                     if (meshHighlight.observerHighlight) {
-                        meshHighlight.mesh.onBeforeRenderObservable.remove(meshHighlight.observerHighlight);
+                        meshHighlight.mesh.onBeforeBindObservable.remove(meshHighlight.observerHighlight);
                     }
                     if (meshHighlight.observerDefault) {
                         meshHighlight.mesh.onAfterRenderObservable.remove(meshHighlight.observerDefault);
@@ -43692,8 +43854,8 @@ var HighlightLayer = /** @class */ (function (_super) {
             for (var id in this._excludedMeshes) {
                 var meshHighlight = this._excludedMeshes[id];
                 if (meshHighlight) {
-                    if (meshHighlight.beforeRender) {
-                        meshHighlight.mesh.onBeforeRenderObservable.remove(meshHighlight.beforeRender);
+                    if (meshHighlight.beforeBind) {
+                        meshHighlight.mesh.onBeforeBindObservable.remove(meshHighlight.beforeBind);
                     }
                     if (meshHighlight.afterRender) {
                         meshHighlight.mesh.onAfterRenderObservable.remove(meshHighlight.afterRender);
@@ -84073,6 +84235,19 @@ var Mesh = /** @class */ (function (_super) {
         enumerable: true,
         configurable: true
     });
+    Object.defineProperty(Mesh.prototype, "onBeforeBindObservable", {
+        /**
+         * An event triggered before binding the mesh
+         */
+        get: function () {
+            if (!this._onBeforeBindObservable) {
+                this._onBeforeBindObservable = new _Misc_observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
+            }
+            return this._onBeforeBindObservable;
+        },
+        enumerable: true,
+        configurable: true
+    });
     Object.defineProperty(Mesh.prototype, "onAfterRenderObservable", {
         /**
         * An event triggered after rendering the mesh
@@ -85199,6 +85374,9 @@ var Mesh = /** @class */ (function (_super) {
         }
         // Bind
         var fillMode = scene.forcePointsCloud ? _Materials_material__WEBPACK_IMPORTED_MODULE_13__["Material"].PointFillMode : (scene.forceWireframe ? _Materials_material__WEBPACK_IMPORTED_MODULE_13__["Material"].WireFrameFillMode : this._effectiveMaterial.fillMode);
+        if (this._onBeforeBindObservable) {
+            this._onBeforeBindObservable.notifyObservers(this);
+        }
         if (!hardwareInstancedRendering) { // Binding will be done later because we need to add more info to the VB
             this._bind(subMesh, effect, fillMode);
         }
@@ -85586,6 +85764,9 @@ var Mesh = /** @class */ (function (_super) {
         if (this._onBeforeDrawObservable) {
             this._onBeforeDrawObservable.clear();
         }
+        if (this._onBeforeBindObservable) {
+            this._onBeforeBindObservable.clear();
+        }
         if (this._onBeforeRenderObservable) {
             this._onBeforeRenderObservable.clear();
         }
@@ -111676,7 +111857,7 @@ var SolidParticleSystem = /** @class */ (function () {
             return this;
         }
         // custom beforeUpdate
-        this.beforeUpdateParticles();
+        this.beforeUpdateParticles(start, end, update);
         var rotMatrix = _Maths_math__WEBPACK_IMPORTED_MODULE_0__["Tmp"].Matrix[0];
         var invertedMatrix = _Maths_math__WEBPACK_IMPORTED_MODULE_0__["Tmp"].Matrix[1];
         var mesh = this.mesh;
@@ -111838,7 +112019,7 @@ var SolidParticleSystem = /** @class */ (function () {
                     var tmpVertex = tempVectors[0];
                     tmpVertex.copyFrom(shape[pt]);
                     if (this._computeParticleVertex) {
-                        this.updateParticleVertex(tmpVertex);
+                        this.updateParticleVertex(particle, tmpVertex, pt);
                     }
                     // positions
                     var vertexX = tmpVertex.x * particleScaling.x - scaledPivot.x;
@@ -111995,7 +112176,7 @@ var SolidParticleSystem = /** @class */ (function () {
                 mesh._boundingInfo = new _Culling_boundingInfo__WEBPACK_IMPORTED_MODULE_7__["BoundingInfo"](minimum, maximum, mesh._worldMatrix);
             }
         }
-        this.afterUpdateParticles();
+        this.afterUpdateParticles(start, end, update);
         return this;
     };
     /**
@@ -112230,7 +112411,7 @@ var SolidParticleSystem = /** @class */ (function () {
      * @example : just set a vertex particle position
      * @returns the updated vertex
      */
-    SolidParticleSystem.prototype.updateParticleVertex = function (vertex) {
+    SolidParticleSystem.prototype.updateParticleVertex = function (particle, vertex, pt) {
         return vertex;
     };
     /**
@@ -112240,7 +112421,7 @@ var SolidParticleSystem = /** @class */ (function () {
      * @param stop the particle index in the particle array where to stop to iterate, same than the value passed to setParticle()
      * @param update the boolean update value actually passed to setParticles()
      */
-    SolidParticleSystem.prototype.beforeUpdateParticles = function () {
+    SolidParticleSystem.prototype.beforeUpdateParticles = function (start, stop, update) {
     };
     /**
      * This will be called  by `setParticles()` after all the other treatments and just before the actual mesh update.
@@ -112250,7 +112431,7 @@ var SolidParticleSystem = /** @class */ (function () {
      * @param stop the particle index in the particle array where to stop to iterate, same than the value passed to setParticle()
      * @param update the boolean update value actually passed to setParticles()
      */
-    SolidParticleSystem.prototype.afterUpdateParticles = function () {
+    SolidParticleSystem.prototype.afterUpdateParticles = function (start, stop, update) {
     };
     return SolidParticleSystem;
 }());
@@ -126636,7 +126817,7 @@ var UtilityLayerRenderer = /** @class */ (function () {
     };
     UtilityLayerRenderer.prototype._updateCamera = function () {
         if (this.originalScene.activeCameras.length > 1) {
-            this.utilityLayerScene.activeCamera = this.originalScene.activeCameras[0];
+            this.utilityLayerScene.activeCamera = this.originalScene.activeCameras[this.originalScene.activeCameras.length - 1];
         }
         else {
             this.utilityLayerScene.activeCamera = this.originalScene.activeCamera;

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/babylon.max.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 55882 - 2415
dist/preview release/babylon.module.d.ts


+ 1 - 1
dist/preview release/glTF2Interface/package.json

@@ -1,7 +1,7 @@
 {
     "name": "babylonjs-gltf2interface",
     "description": "A typescript declaration of babylon's gltf2 inteface.",
-    "version": "4.0.0-alpha.18",
+    "version": "4.0.0-alpha.19",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

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

@@ -702,7 +702,10 @@ declare module BABYLON.GUI {
         isPointerBlocker: boolean;
         /** Gets or sets a boolean indicating if the control can be focusable */
         isFocusInvisible: boolean;
-        /** Gets or sets a boolean indicating if the children are clipped to the current control bounds */
+        /**
+         * Gets or sets a boolean indicating if the children are clipped to the current control bounds.
+         * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
+         */
         clipChildren: boolean;
         /**
          * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)

+ 10 - 3
dist/preview release/gui/babylon.gui.js

@@ -3430,13 +3430,17 @@ var Container = /** @class */ (function (_super) {
     /** @hidden */
     Container.prototype._reOrderControl = function (control) {
         this.removeControl(control);
+        var wasAdded = false;
         for (var index = 0; index < this._children.length; index++) {
             if (this._children[index].zIndex > control.zIndex) {
                 this._children.splice(index, 0, control);
-                return;
+                wasAdded = true;
+                break;
             }
         }
-        this._children.push(control);
+        if (!wasAdded) {
+            this._children.push(control);
+        }
         control.parent = this;
         this._markAsDirty();
     };
@@ -3741,7 +3745,10 @@ var Control = /** @class */ (function () {
         this.isPointerBlocker = false;
         /** Gets or sets a boolean indicating if the control can be focusable */
         this.isFocusInvisible = false;
-        /** Gets or sets a boolean indicating if the children are clipped to the current control bounds */
+        /**
+         * Gets or sets a boolean indicating if the children are clipped to the current control bounds.
+         * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
+         */
         this.clipChildren = true;
         /**
          * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/gui/babylon.gui.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


+ 8 - 2
dist/preview release/gui/babylon.gui.module.d.ts

@@ -732,7 +732,10 @@ declare module "babylonjs-gui/2D/controls/control" {
         isPointerBlocker: boolean;
         /** Gets or sets a boolean indicating if the control can be focusable */
         isFocusInvisible: boolean;
-        /** Gets or sets a boolean indicating if the children are clipped to the current control bounds */
+        /**
+         * Gets or sets a boolean indicating if the children are clipped to the current control bounds.
+         * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
+         */
         clipChildren: boolean;
         /**
          * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)
@@ -4539,7 +4542,10 @@ declare module BABYLON.GUI {
         isPointerBlocker: boolean;
         /** Gets or sets a boolean indicating if the control can be focusable */
         isFocusInvisible: boolean;
-        /** Gets or sets a boolean indicating if the children are clipped to the current control bounds */
+        /**
+         * Gets or sets a boolean indicating if the children are clipped to the current control bounds.
+         * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
+         */
         clipChildren: boolean;
         /**
          * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)

+ 2 - 2
dist/preview release/gui/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-gui",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
-    "version": "4.0.0-alpha.18",
+    "version": "4.0.0-alpha.19",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.18"
+        "babylonjs": "4.0.0-alpha.19"
     },
     "engines": {
         "node": "*"

+ 31 - 0
dist/preview release/gui/readme-es6.md

@@ -0,0 +1,31 @@
+Babylon.js GUI module
+=====================
+
+For usage documentation please visit http://doc.babylonjs.com/overviews/gui
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save @babylonjs/core @babylonjs/gui
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import { AdvancedDynamicTexture } from '@babylonjs/gui/2D';
+```
+
+And used as usual:
+
+```
+// Some awesome code
+// Creates the post process
+let postProcess = new AdvancedDynamicTexture("adt", 128, 128, scene);
+// Some more awesome code
+```
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support).

+ 6 - 6
dist/preview release/inspector/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "4.0.0-alpha.18",
+    "version": "4.0.0-alpha.19",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -31,11 +31,11 @@
     "dependencies": {
         "@types/react": "~16.7.3",
         "@types/react-dom": "~16.0.9",
-        "babylonjs": "4.0.0-alpha.18",
-        "babylonjs-gui": "4.0.0-alpha.18",
-        "babylonjs-loaders": "4.0.0-alpha.18",
-        "babylonjs-serializers": "4.0.0-alpha.18",
-        "babylonjs-gltf2interface": "4.0.0-alpha.18"
+        "babylonjs": "4.0.0-alpha.19",
+        "babylonjs-gui": "4.0.0-alpha.19",
+        "babylonjs-loaders": "4.0.0-alpha.19",
+        "babylonjs-serializers": "4.0.0-alpha.19",
+        "babylonjs-gltf2interface": "4.0.0-alpha.19"
     },
     "engines": {
         "node": "*"

+ 27 - 0
dist/preview release/inspector/readme-es6.md

@@ -0,0 +1,27 @@
+Babylon.js inspector module
+=====================
+
+For usage documentation please visit http://doc.babylonjs.com/how_to/debug_layer.
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save-dev @babylonjs/core @babylonjs/inspector
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import "@babylonjs/core/Debug/debugLayer";
+import "@babylonjs/inspector";
+```
+
+The first line will ensure you can access the property debugLayer of the scene while the second will ensure the inspector can be use within your scene.
+
+This is a great example where code splitting or conditional loading could be use to ensure you are not delivering the inspector if not part of your final app.
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support).

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.js.map


+ 3 - 3
dist/preview release/loaders/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-loaders",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
-    "version": "4.0.0-alpha.18",
+    "version": "4.0.0-alpha.19",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,8 +28,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "4.0.0-alpha.18",
-        "babylonjs": "4.0.0-alpha.18"
+        "babylonjs-gltf2interface": "4.0.0-alpha.19",
+        "babylonjs": "4.0.0-alpha.19"
     },
     "engines": {
         "node": "*"

+ 24 - 0
dist/preview release/loaders/readme-es6.md

@@ -0,0 +1,24 @@
+Babylon.js Loaders module
+=====================
+
+For usage documentation please visit http://doc.babylonjs.com/extensions and choose "loaders".
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save-dev @babylonjs/core @babylonjs/loaders
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import "@babylonjs/loaders/glTF";
+```
+
+This will extend Babylon's loader plugins to allow the load of gltf and glb files.
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support).

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

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -355,7 +355,7 @@ function __importDefault(mod) {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellPixelShader", function() { return cellPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -388,7 +388,7 @@ var cellPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellVertexShader", function() { return cellVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -422,7 +422,7 @@ var cellVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellMaterial", function() { return CellMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _cell_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cell.fragment */ "./cell/cell.fragment.ts");
 /* harmony import */ var _cell_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cell.vertex */ "./cell/cell.vertex.ts");
@@ -762,14 +762,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.cellMaterial.js.map


+ 4 - 4
dist/preview release/materialsLibrary/babylon.customMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -358,7 +358,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShaderSpecialParts", function() { return ShaderSpecialParts; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomMaterial", function() { return CustomMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__);
 
 
@@ -596,14 +596,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.js.map


+ 6 - 6
dist/preview release/materialsLibrary/babylon.fireMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -355,7 +355,7 @@ function __importDefault(mod) {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firePixelShader", function() { return firePixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -382,7 +382,7 @@ var firePixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fireVertexShader", function() { return fireVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -413,7 +413,7 @@ var fireVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FireMaterial", function() { return FireMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _fire_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fire.fragment */ "./fire/fire.fragment.ts");
 /* harmony import */ var _fire_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fire.vertex */ "./fire/fire.vertex.ts");
@@ -793,14 +793,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.fireMaterial.js.map


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

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -355,7 +355,7 @@ function __importDefault(mod) {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "furPixelShader", function() { return furPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -388,7 +388,7 @@ var furPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "furVertexShader", function() { return furVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -422,7 +422,7 @@ var furVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FurMaterial", function() { return FurMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _fur_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fur.fragment */ "./fur/fur.fragment.ts");
 /* harmony import */ var _fur_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fur.vertex */ "./fur/fur.vertex.ts");
@@ -951,14 +951,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.furMaterial.js.map


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

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -355,7 +355,7 @@ function __importDefault(mod) {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gradientPixelShader", function() { return gradientPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -388,7 +388,7 @@ var gradientPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gradientVertexShader", function() { return gradientVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -422,7 +422,7 @@ var gradientVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GradientMaterial", function() { return GradientMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _gradient_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gradient.fragment */ "./gradient/gradient.fragment.ts");
 /* harmony import */ var _gradient_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./gradient.vertex */ "./gradient/gradient.vertex.ts");
@@ -731,14 +731,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.gradientMaterial.js.map


+ 6 - 6
dist/preview release/materialsLibrary/babylon.gridMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -355,7 +355,7 @@ function __importDefault(mod) {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridPixelShader", function() { return gridPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -379,7 +379,7 @@ var gridPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridVertexShader", function() { return gridVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -404,7 +404,7 @@ var gridVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridMaterial", function() { return GridMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _grid_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./grid.fragment */ "./grid/grid.fragment.ts");
 /* harmony import */ var _grid_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./grid.vertex */ "./grid/grid.vertex.ts");
@@ -698,14 +698,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.gridMaterial.js.map


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

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -372,7 +372,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lavaPixelShader", function() { return lavaPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -405,7 +405,7 @@ var lavaPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lavaVertexShader", function() { return lavaVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -439,7 +439,7 @@ var lavaVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LavaMaterial", function() { return LavaMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _lava_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lava.fragment */ "./lava/lava.fragment.ts");
 /* harmony import */ var _lava_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lava.vertex */ "./lava/lava.vertex.ts");
@@ -850,14 +850,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.lavaMaterial.js.map


+ 6 - 6
dist/preview release/materialsLibrary/babylon.mixMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -401,7 +401,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixPixelShader", function() { return mixPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -434,7 +434,7 @@ var mixPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixVertexShader", function() { return mixVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -468,7 +468,7 @@ var mixVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MixMaterial", function() { return MixMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _mix_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mix.fragment */ "./mix/mix.fragment.ts");
 /* harmony import */ var _mix_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mix.vertex */ "./mix/mix.vertex.ts");
@@ -937,14 +937,14 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.mixMaterial.js.map


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

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -401,7 +401,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalPixelShader", function() { return normalPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -434,7 +434,7 @@ var normalPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalVertexShader", function() { return normalVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -468,7 +468,7 @@ var normalVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NormalMaterial", function() { return NormalMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _normal_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./normal.fragment */ "./normal/normal.fragment.ts");
 /* harmony import */ var _normal_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./normal.vertex */ "./normal/normal.vertex.ts");
@@ -795,14 +795,14 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.normalMaterial.js.map


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

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -401,7 +401,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shadowOnlyPixelShader", function() { return shadowOnlyPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -433,7 +433,7 @@ var shadowOnlyPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shadowOnlyVertexShader", function() { return shadowOnlyVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -467,7 +467,7 @@ var shadowOnlyVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShadowOnlyMaterial", function() { return ShadowOnlyMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _shadowOnly_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shadowOnly.fragment */ "./shadowOnly/shadowOnly.fragment.ts");
 /* harmony import */ var _shadowOnly_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shadowOnly.vertex */ "./shadowOnly/shadowOnly.vertex.ts");
@@ -686,14 +686,14 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js.map


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

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -401,7 +401,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simplePixelShader", function() { return simplePixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -434,7 +434,7 @@ var simplePixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simpleVertexShader", function() { return simpleVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -468,7 +468,7 @@ var simpleVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleMaterial", function() { return SimpleMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _simple_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./simple.fragment */ "./simple/simple.fragment.ts");
 /* harmony import */ var _simple_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./simple.vertex */ "./simple/simple.vertex.ts");
@@ -753,14 +753,14 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.simpleMaterial.js.map


+ 6 - 6
dist/preview release/materialsLibrary/babylon.skyMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -401,7 +401,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skyPixelShader", function() { return skyPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -427,7 +427,7 @@ var skyPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skyVertexShader", function() { return skyVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -454,7 +454,7 @@ var skyVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SkyMaterial", function() { return SkyMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _sky_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sky.fragment */ "./sky/sky.fragment.ts");
 /* harmony import */ var _sky_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sky.vertex */ "./sky/sky.vertex.ts");
@@ -785,14 +785,14 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.skyMaterial.js.map


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

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -401,7 +401,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "terrainPixelShader", function() { return terrainPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -434,7 +434,7 @@ var terrainPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "terrainVertexShader", function() { return terrainVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -468,7 +468,7 @@ var terrainVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TerrainMaterial", function() { return TerrainMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _terrain_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./terrain.fragment */ "./terrain/terrain.fragment.ts");
 /* harmony import */ var _terrain_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./terrain.vertex */ "./terrain/terrain.vertex.ts");
@@ -868,14 +868,14 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.terrainMaterial.js.map


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

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -402,7 +402,7 @@ __webpack_require__.r(__webpack_exports__);
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TriPlanarMaterial", function() { return TriPlanarMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _triplanar_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./triplanar.fragment */ "./triPlanar/triplanar.fragment.ts");
 /* harmony import */ var _triplanar_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./triplanar.vertex */ "./triPlanar/triplanar.vertex.ts");
@@ -807,7 +807,7 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "triplanarPixelShader", function() { return triplanarPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -840,7 +840,7 @@ var triplanarPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "triplanarVertexShader", function() { return triplanarVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -863,14 +863,14 @@ var triplanarVertexShader = { name: name, shader: shader };
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 7 - 7
dist/preview release/materialsLibrary/babylon.waterMaterial.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.min.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 47 - 47
dist/preview release/materialsLibrary/babylonjs.materials.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylonjs.materials.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/materialsLibrary/babylonjs.materials.min.js


+ 2 - 2
dist/preview release/materialsLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "4.0.0-alpha.18",
+    "version": "4.0.0-alpha.19",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.18"
+        "babylonjs": "4.0.0-alpha.19"
     },
     "engines": {
         "node": "*"

+ 30 - 0
dist/preview release/materialsLibrary/readme-es6.md

@@ -0,0 +1,30 @@
+Babylon.js Materials Library
+=====================
+
+For usage documentation please visit http://doc.babylonjs.com/extensions and choose "materials library".
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save @babylonjs/core @babylonjs/materials
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import { GridMaterial } from '@babylonjs/materials/Grid';
+```
+
+And used as usual:
+
+```
+// Some awesome code
+let gridMaterial = new GridMaterial("gridMaterial", scene);
+// Some more awesome code
+```
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support).

+ 3 - 3
dist/preview release/package.json

@@ -9,21 +9,21 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "4.0.0-alpha.18",
+    "version": "4.0.0-alpha.19",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
     },
     "main": "babylon.js",
     "files": [
-        "babylon.d.ts",
+        "babylon.module.d.ts",
         "babylon.js",
         "babylon.max.js",
         "babylon.max.js.map",
         "Oimo.js",
         "readme.md"
     ],
-    "typings": "babylon.d.ts",
+    "typings": "babylon.module.d.ts",
     "keywords": [
         "3D",
         "javascript",

+ 2 - 2
dist/preview release/postProcessesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-post-process",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "4.0.0-alpha.18",
+    "version": "4.0.0-alpha.19",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.18"
+        "babylonjs": "4.0.0-alpha.19"
     },
     "engines": {
         "node": "*"

+ 31 - 0
dist/preview release/postProcessesLibrary/readme-es6.md

@@ -0,0 +1,31 @@
+Babylon.js Post Processes Library
+=====================
+
+For usage documentation please visit http://doc.babylonjs.com/extensions and choose "post process library".
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save @babylonjs/core @babylonjs/post-processes
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import { AsciiArtPostProcess } from '@babylonjs/post-processes/asciiArt';
+```
+
+And used as usual:
+
+```
+// Some awesome code
+// Creates the post process
+let postProcess = new AsciiArtPostProcess("AsciiArt", camera);
+// Some more awesome code
+```
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support).

+ 2 - 2
dist/preview release/proceduralTexturesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-procedural-textures",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "4.0.0-alpha.18",
+    "version": "4.0.0-alpha.19",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.18"
+        "babylonjs": "4.0.0-alpha.19"
     },
     "engines": {
         "node": "*"

+ 34 - 0
dist/preview release/proceduralTexturesLibrary/readme-es6.md

@@ -0,0 +1,34 @@
+Babylon.js Procedural Textures Library
+=====================
+
+For usage documentation please visit http://doc.babylonjs.com/extensions and choose "procedural textures library".
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save @babylonjs/core @babylonjs/procedural-textures
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import { StandardMaterial } from '@babylonjs/core/Materials/standardMaterial';
+import { FireProceduralTexture } from '@babylonjs/procedural-textures/fireProceduralTexture';
+```
+
+And used as usual:
+
+```
+// Some awesome code
+var fireMaterial = new StandardMaterial("fontainSculptur2", scene);
+var fireTexture = new FireProceduralTexture("fire", 256, scene);
+fireMaterial.diffuseTexture = fireTexture;
+fireMaterial.opacityTexture = fireTexture;
+// Some more awesome code
+```
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support).

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/serializers/babylon.glTF2Serializer.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
dist/preview release/serializers/babylonjs.serializers.js.map


+ 3 - 3
dist/preview release/serializers/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-serializers",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
-    "version": "4.0.0-alpha.18",
+    "version": "4.0.0-alpha.19",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,8 +28,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.18",
-        "babylonjs-gltf2interface": "4.0.0-alpha.18"
+        "babylonjs": "4.0.0-alpha.19",
+        "babylonjs-gltf2interface": "4.0.0-alpha.19"
     },
     "engines": {
         "node": "*"

+ 29 - 0
dist/preview release/serializers/readme-es6.md

@@ -0,0 +1,29 @@
+Babylon.js Serializers
+=====================
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save @babylonjs/core @babylonjs/serializers
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import { GLTF2Export } from '@babylonjs/serializers/glTF';
+```
+
+And used as usual:
+
+```
+GLTF2Export.GLTFAsync(scene, "fileName").then((gltf) => {
+    gltf.downloadFiles();
+});
+```
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support) and the [gltf exporter documentation](https://doc.babylonjs.com/extensions/gltfexporter).
+

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 109391 - 0
dist/preview release/viewer/babylon.module.d.ts


+ 5 - 1
dist/preview release/viewer/babylon.viewer.d.ts

@@ -1,4 +1,8 @@
-/// <reference path="./babylon.d.ts"/>
+/// <reference path="./babylon.module.d.ts"/>
+/// <reference path="./babylon.glTF2Interface.d.ts"/>
+/// <reference path="./babylonjs.loaders.d.ts"/>
+declare module "babylonjs-loaders"{ export=BABYLON;}
+/// <reference path="./babylon.module.d.ts"/>
 /// <reference path="./babylon.glTF2Interface.d.ts"/>
 /// <reference path="./babylonjs.loaders.d.ts"/>
 declare module "babylonjs-loaders"{ export=BABYLON;}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 11 - 7
dist/preview release/viewer/babylon.viewer.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 4 - 4
dist/preview release/viewer/babylon.viewer.max.js


+ 6 - 1
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -1,4 +1,9 @@
-/// <reference path="./babylon.d.ts"/>
+/// <reference path="./babylon.module.d.ts"/>
+/// <reference path="./babylon.glTF2Interface.d.ts"/>
+/// <reference path="./babylonjs.loaders.d.ts"/>
+declare module "babylonjs-loaders"{ export=BABYLON;}
+
+/// <reference path="./babylon.module.d.ts"/>
 /// <reference path="./babylon.glTF2Interface.d.ts"/>
 /// <reference path="./babylonjs.loaders.d.ts"/>
 declare module "babylonjs-loaders"{ export=BABYLON;}

+ 6 - 0
dist/preview release/what's new.md

@@ -89,6 +89,9 @@
 - Added per mesh culling strategy ([jerome](https://github.com/jbousquie))
 - Added InputsManager and keyboard bindings for FollowCamera. ([mrdunk](https://github.com))
 - Fix typo in FollowCamera InputsManager when limiting rotation to 360 degrees. ([mrdunk](https://github.com))
+- In FollowCamera InputsManager, allow choice of modifier key (Alt, Ctrl and/or Shift) for each camera movement axis. ([mrdunk](https://github.com))
+- Added MouseWheel bindings for FollowCamera. ([mrdunk](https://github.com))
+- Added maximum and minimum limits for FollowCamera parameters. ([mrdunk](https://github.com))
 - Added per solid particle culling possibility : `solidParticle.isInFrustum()`  ([jerome](https://github.com/jbousquie))
 - Added transparency support to `GlowLayer` ([Sebavan](https://github.com/Sebavan))
 - Added option `forceDisposeChildren` to multiMaterial.dispose ([danjpar](https://github.com/danjpar))
@@ -113,6 +116,7 @@
 ### Materials Library
 - Added the `cameraOffset` vector property in the `SkyMaterial` to get an offset according to the horizon ([julien-moreau](https://github.com/julien-moreau))
 - Fixed `GradientMaterial` to consider disableLighting working as emissive ([julien-moreau](https://github.com/julien-moreau))
+- Fixed fresnel term computation in `WaterMaterial` ([julien-moreau](https://github.com/julien-moreau))
 
 ## Bug fixes
 - Fixed TransformNode.setDirection (orientation was wrong) ([Deltakosh](https://github.com/deltakosh))
@@ -146,6 +150,8 @@
 - Fix more case sensitive paths ([mrdunk](https://github.com))
 - Attaching a BoundingBoxGizmo on a child should not remove its parent ([TrevorDev](https://github.com/TrevorDev)))
 - AmmoJS fix include issue caused after modules update and use world contact point to be consistent with oimo and cannon ([TrevorDev](https://github.com/TrevorDev)))
+- Oimo disable motor maxForce, cannonJS support no impostor, cannonJS cylinder axis, ammoJS wake up impostor when apply force/impulse ([TrevorDev](https://github.com/TrevorDev)))
+- Utility layer should render on last active camera ([TrevorDev](https://github.com/TrevorDev))
 
 ### Core Engine
 - Fixed a bug with `mesh.alwaysSelectAsActiveMesh` preventing layerMask to be taken in account ([Deltakosh](https://github.com/deltakosh))

+ 6 - 2
gui/src/2D/controls/container.ts

@@ -203,14 +203,18 @@ export class Container extends Control {
     public _reOrderControl(control: Control): void {
         this.removeControl(control);
 
+        let wasAdded = false;
         for (var index = 0; index < this._children.length; index++) {
             if (this._children[index].zIndex > control.zIndex) {
                 this._children.splice(index, 0, control);
-                return;
+                wasAdded = true;
+                break;
             }
         }
 
-        this._children.push(control);
+        if (!wasAdded) {
+            this._children.push(control);
+        }
 
         control.parent = this;
 

+ 4 - 1
gui/src/2D/controls/control.ts

@@ -121,7 +121,10 @@ export class Control {
     /** Gets or sets a boolean indicating if the control can be focusable */
     public isFocusInvisible = false;
 
-    /** Gets or sets a boolean indicating if the children are clipped to the current control bounds */
+    /**
+     * Gets or sets a boolean indicating if the children are clipped to the current control bounds.
+     * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
+     */
     public clipChildren = true;
 
     /**

+ 2 - 6
materialsLibrary/src/water/water.fragment.fx

@@ -123,8 +123,6 @@ void main(void) {
 #ifdef FRESNELSEPARATE
     #ifdef REFLECTION
         // Water
-        vec3 eyeVector = normalize(vEyePosition - vPosition);
-
         vec2 projectedRefractionTexCoords = clamp(vRefractionMapTexCoord.xy / vRefractionMapTexCoord.z + perturbation*0.5, 0.0, 1.0);
         vec4 refractiveColor = texture2D(refractionSampler, projectedRefractionTexCoords);
 
@@ -137,7 +135,7 @@ void main(void) {
 
         vec3 upVector = vec3(0.0, 1.0, 0.0);
 
-        float fresnelTerm = clamp(abs(pow(dot(eyeVector, upVector),3.0)),0.05,0.65);
+        float fresnelTerm = clamp(abs(pow(dot(viewDirectionW, upVector),3.0)),0.05,0.65);
         float IfresnelTerm = 1.0 - fresnelTerm;
 
         refractiveColor = colorBlendFactor*waterColor + (1.0-colorBlendFactor)*refractiveColor;
@@ -178,8 +176,6 @@ void main(void) {
 #else // !FRESNELSEPARATE
     #ifdef REFLECTION
         // Water
-        vec3 eyeVector = normalize(vEyePosition - vPosition);
-
         vec2 projectedRefractionTexCoords = clamp(vRefractionMapTexCoord.xy / vRefractionMapTexCoord.z + perturbation, 0.0, 1.0);
         vec4 refractiveColor = texture2D(refractionSampler, projectedRefractionTexCoords);
 
@@ -188,7 +184,7 @@ void main(void) {
 
         vec3 upVector = vec3(0.0, 1.0, 0.0);
 
-        float fresnelTerm = max(dot(eyeVector, upVector), 0.0);
+        float fresnelTerm = max(dot(viewDirectionW, upVector), 0.0);
 
         vec4 combinedColor = refractiveColor * fresnelTerm + reflectiveColor * (1.0 - fresnelTerm);
 

+ 2 - 2
package.json

@@ -9,7 +9,7 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "4.0.0-alpha.18",
+    "version": "4.0.0-alpha.19",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -99,7 +99,7 @@
         "tslib": "^1.9.3",
         "tslint": "^5.11.0",
         "typedoc": "^0.12.0",
-        "typescript": "~3.0.1",
+        "typescript": "^3.2.2",
         "webpack": "^4.25.1",
         "webpack-cli": "^3.1.2",
         "webpack-dev-server": "^3.1.14",

+ 122 - 0
readme-es6.md

@@ -0,0 +1,122 @@
+# Babylon.js
+
+Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
+
+[![npm version](https://badge.fury.io/js/babylonjs.svg)](https://badge.fury.io/js/babylonjs)
+[![Build Status](https://travis-ci.com/BabylonJS/Babylon.js.svg?branch=master)](https://travis-ci.com/BabylonJS/Babylon.js)
+[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/BabylonJS/Babylon.js.svg)](http://isitmaintained.com/project/BabylonJS/Babylon.js "Average time to resolve an issue")
+[![Percentage of issues still open](https://isitmaintained.com/badge/open/babylonJS/babylon.js.svg)](https://isitmaintained.com/project/babylonJS/babylon.js "Percentage of issues still open")
+[![Build Size](https://img.badgesize.io/BabylonJS/Babylon.js/master/dist/preview%20release/babylon.js.svg?compression=gzip)](https://img.badgesize.io/BabylonJS/Babylon.js/master/dist/preview%20release/babylon.js.svg?compression=gzip)
+[![Twitter](https://img.shields.io/twitter/follow/babylonjs.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=babylonjs)
+
+**Any questions?** Here is our official [forum](https://forum.babylonjs.com/).
+
+## CDN
+
+To look into our CDN bundled distribution, you can refer to the package [babylonjs](https://www.npmjs.com/package/babylonjs)
+
+## npm
+
+BabylonJS and its modules are published on npm as esNext modules with full typing support. To install, use:
+
+```text
+npm install @babylonjs/core --save
+```
+
+This will allow you to import BabylonJS entirely using:
+
+```javascript
+import * as BABYLON from '@babylonjs/core/Legacy/legacy';
+```
+
+or individual classes to benefit from enhanced tree shaking using :
+
+```javascript
+import { Scene } from '@babylonjs/core/scene';
+import { Engine } from '@babylonjs/core/Engines/engine';
+```
+
+To add a module, install the respective package. A list of extra packages and their installation instructions can be found on the [babylonjs user on npm](https://www.npmjs.com/~babylonjs) scoped on @babylonjs.
+
+## Usage
+
+See [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support):
+
+```javascript
+import { Engine } from "@babylonjs/core/Engines/engine";
+import { Scene } from "@babylonjs/core/scene";
+import { Vector3 } from "@babylonjs/core/Maths/math";
+import { FreeCamera } from "@babylonjs/core/Cameras/freeCamera";
+import { HemisphericLight } from "@babylonjs/core/Lights/hemisphericLight";
+import { Mesh } from "@babylonjs/core/Meshes/mesh";
+
+// Side-effects only imports allowing the standard material to be used as default.
+import "@babylonjs/core/Materials/standardMaterial";
+// Side-effects only imports allowing Mesh to create default shapes (to enhance tree shaking, the construction methods on mesh are not available if the meshbuilder has not been imported).
+import "@babylonjs/core/Meshes/meshBuilder";
+
+const canvas = document.getElementById("renderCanvas") as HTMLCanvasElement;
+const engine = new Engine(canvas);
+var scene = new Scene(engine);
+
+// This creates and positions a free camera (non-mesh)
+var camera = new FreeCamera("camera1", new Vector3(0, 5, -10), scene);
+
+// This targets the camera to scene origin
+camera.setTarget(Vector3.Zero());
+
+// This attaches the camera to the canvas
+camera.attachControl(canvas, true);
+
+// This creates a light, aiming 0,1,0 - to the sky (non-mesh)
+var light = new HemisphericLight("light1", new Vector3(0, 1, 0), scene);
+
+// Default intensity is 1. Let's dim the light a small amount
+light.intensity = 0.7;
+
+// Our built-in 'sphere' shape. Params: name, subdivs, size, scene
+var sphere = Mesh.CreateSphere("sphere1", 16, 2, scene);
+
+// Move the sphere upward 1/2 its height
+sphere.position.y = 2;
+
+// Our built-in 'ground' shape. Params: name, width, depth, subdivs, scene
+Mesh.CreateGround("ground1", 6, 6, 2, scene);
+
+engine.runRenderLoop(() => {
+    scene.render();
+});
+```
+
+## Preview release
+
+Preview version of **4.0** can be found [here](https://github.com/BabylonJS/Babylon.js/tree/master/dist/preview%20release).
+If you want to contribute, please read our [contribution guidelines](https://github.com/BabylonJS/Babylon.js/blob/master/contributing.md) first.
+
+## Documentation
+
+- [Documentation](https://doc.babylonjs.com)
+- [Examples](https://doc.babylonjs.com/examples)
+
+## Contributing
+Please see the [Contributing Guidelines](./contributing.md)
+
+## Useful links
+
+- Official web site: [www.babylonjs.com](https://www.babylonjs.com/)
+- Online [playground](https://playground.babylonjs.com/) to learn by experimentating
+- Online [sandbox](https://www.babylonjs.com/sandbox) where you can test your .babylon and glTF scenes with a simple drag'n'drop
+- Online [shader creation tool](https://www.babylonjs.com/cyos/) where you can learn how to create GLSL shaders
+- 3DS Max [exporter](https://github.com/BabylonJS/Exporters/tree/master/3ds%20Max) can be used to generate a .babylon file from 3DS Max
+- Maya [exporter](https://github.com/BabylonJS/Exporters/tree/master/Maya) can be used to generate a .babylon file from 3DS Max
+- Blender [exporter](https://github.com/BabylonJS/Exporters/tree/master/Blender) can be used to generate a .babylon file from Blender 3d
+- Unity 5[ (deprecated) exporter](https://github.com/BabylonJS/Exporters/tree/master/Unity) can be used to export your geometries from Unity 5 scene editor(animations are supported)
+- [glTF Tools](https://github.com/KhronosGroup/glTF#gltf-tools) by KhronosGroup
+
+## Features
+
+To get a complete list of supported features, please visit our [website](https://www.babylonjs.com/#specifications).
+
+## Build
+
+Babylon.js is automatically built using [Gulp](https://gulpjs.com/). For further instructions see the readme at [/Tools/Gulp](https://github.com/BabylonJS/Babylon.js/tree/master/Tools/Gulp).

+ 118 - 0
src/Actions/abstractActionManager.ts

@@ -0,0 +1,118 @@
+import { IDisposable } from '../scene';
+import { IActionEvent } from './actionEvent';
+import { IAction } from './action';
+import { Constants } from "../Engines/constants";
+
+/**
+ * Abstract class used to decouple action Manager from scene and meshes.
+ * Do not instantiate.
+ * @see http://doc.babylonjs.com/how_to/how_to_use_actions
+ */
+export abstract class AbstractActionManager implements IDisposable {
+
+    /** Gets the list of active triggers */
+    public static Triggers: { [key: string]: number } = {};
+
+    /** Gets the cursor to use when hovering items */
+    public hoverCursor: string = '';
+
+    /** Gets the list of actions */
+    public actions = new Array<IAction>();
+
+    /**
+     * Releases all associated resources
+     */
+    public abstract dispose(): void;
+
+    /**
+     * Does this action manager has pointer triggers
+     */
+    public abstract get hasPointerTriggers(): boolean;
+
+    /**
+     * Does this action manager has pick triggers
+     */
+    public abstract get hasPickTriggers(): boolean;
+
+    /**
+     * Process a specific trigger
+     * @param trigger defines the trigger to process
+     * @param evt defines the event details to be processed
+     */
+    public abstract processTrigger(trigger: number, evt?: IActionEvent): void;
+
+    /**
+     * Does this action manager handles actions of any of the given triggers
+     * @param triggers defines the triggers to be tested
+     * @return a boolean indicating whether one (or more) of the triggers is handled
+     */
+    public abstract hasSpecificTriggers(triggers: number[]): boolean;
+
+    /**
+     * Does this action manager handles actions of any of the given triggers. This function takes two arguments for
+     * speed.
+     * @param triggerA defines the trigger to be tested
+     * @param triggerB defines the trigger to be tested
+     * @return a boolean indicating whether one (or more) of the triggers is handled
+     */
+    public abstract hasSpecificTriggers2(triggerA: number, triggerB: number): boolean;
+
+    /**
+     * Does this action manager handles actions of a given trigger
+     * @param trigger defines the trigger to be tested
+     * @param parameterPredicate defines an optional predicate to filter triggers by parameter
+     * @return whether the trigger is handled
+     */
+    public abstract hasSpecificTrigger(trigger: number, parameterPredicate?: (parameter: any) => boolean): boolean;
+
+    /**
+         * Serialize this manager to a JSON object
+         * @param name defines the property name to store this manager
+         * @returns a JSON representation of this manager
+         */
+    public abstract serialize(name: string): any;
+
+    /**
+     * Does exist one action manager with at least one trigger
+     **/
+    public static get HasTriggers(): boolean {
+        for (var t in AbstractActionManager.Triggers) {
+            if (AbstractActionManager.Triggers.hasOwnProperty(t)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Does exist one action manager with at least one pick trigger
+     **/
+    public static get HasPickTriggers(): boolean {
+        for (var t in AbstractActionManager.Triggers) {
+            if (AbstractActionManager.Triggers.hasOwnProperty(t)) {
+                let t_int = parseInt(t);
+                if (t_int >= Constants.ACTION_OnPickTrigger && t_int <= Constants.ACTION_OnPickUpTrigger) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Does exist one action manager that handles actions of a given trigger
+     * @param trigger defines the trigger to be tested
+     * @return a boolean indicating whether the trigger is handeled by at least one action manager
+    **/
+    public static HasSpecificTrigger(trigger: number): boolean {
+        for (var t in AbstractActionManager.Triggers) {
+            if (AbstractActionManager.Triggers.hasOwnProperty(t)) {
+                let t_int = parseInt(t);
+                if (t_int === trigger) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+}

+ 33 - 1
src/Actions/action.ts

@@ -12,10 +12,42 @@ declare type Camera = import("../Cameras/camera").Camera;
 declare type Node = import("../node").Node;
 
 /**
+ * Interface used to define Action
+ */
+export interface IAction {
+    /**
+   * Trigger for the action
+   */
+    trigger: number;
+
+    /** the trigger, with or without parameters, for the action */
+    triggerOptions: any;
+
+    /**
+     * Gets the trigger parameters
+     * @returns the trigger parameters
+     */
+    getTriggerParameter(): any;
+
+    /**
+     * Internal only - executes current action event
+     * @hidden
+     */
+    _executeCurrent(evt?: ActionEvent): void;
+
+    /**
+     * Serialize placeholder for child classes
+     * @param parent of child
+     * @returns the serialized object
+     */
+    serialize(parent: any): any;
+}
+
+/**
  * The action to be carried out following a trigger
  * @see http://doc.babylonjs.com/how_to/how_to_use_actions#available-actions
  */
-export class Action {
+export class Action implements IAction {
     /**
      * Trigger for the action
      */

+ 19 - 2
src/Actions/actionEvent.ts

@@ -5,9 +5,27 @@ import { Scene } from "../scene";
 import { Vector2 } from "../Maths/math";
 
 /**
+ * Interface used to define ActionEvent
+ */
+export interface IActionEvent {
+    /** The mesh or sprite that triggered the action */
+    source: any;
+    /** The X mouse cursor position at the time of the event */
+    pointerX: number;
+    /** The Y mouse cursor position at the time of the event */
+    pointerY: number;
+    /** The mesh that is currently pointed at (can be null) */
+    meshUnderPointer: Nullable<AbstractMesh>;
+    /** the original (browser) event that triggered the ActionEvent */
+    sourceEvent?: any;
+    /** additional data for the event */
+    additionalData?: any;
+}
+
+/**
  * ActionEvent is the event being sent when an action is triggered.
  */
-export class ActionEvent {
+export class ActionEvent implements IActionEvent {
     /**
      * Creates a new ActionEvent
      * @param source The mesh or sprite that triggered the action
@@ -30,7 +48,6 @@ export class ActionEvent {
         public sourceEvent?: any,
         /** additional data for the event */
         public additionalData?: any) {
-
     }
 
     /**

+ 7 - 58
src/Actions/actionManager.ts

@@ -7,19 +7,20 @@ import { Condition, ValueCondition } from "./condition";
 import { Action } from "./action";
 import { DoNothingAction } from "./directActions";
 
-import { Constants } from "../Engines/constants";
 import { EngineStore } from "../Engines/engineStore";
-import { ActionEvent } from "../Actions/actionEvent";
+import { IActionEvent } from "../Actions/actionEvent";
 import { Logger } from "../Misc/logger";
 import { DeepCopier } from "../Misc/deepCopier";
 import { _TypeStore } from "../Misc/typeStore";
+import { AbstractActionManager } from './abstractActionManager';
+import { Constants } from "../Engines/constants";
 
 /**
  * Action Manager manages all events to be triggered on a given mesh or the global scene.
  * A single scene can have many Action Managers to handle predefined actions on specific meshes.
  * @see http://doc.babylonjs.com/how_to/how_to_use_actions
  */
-export class ActionManager {
+export class ActionManager extends AbstractActionManager {
     /**
      * Nothing
      * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
@@ -121,16 +122,7 @@ export class ActionManager {
      */
     public static readonly OnKeyUpTrigger = 15;
 
-    /** Gets the list of active triggers */
-    public static Triggers: { [key: string]: number } = {};
-
     // Members
-    /** Gets the list of actions */
-    public actions = new Array<Action>();
-
-    /** Gets the cursor to use when hovering items */
-    public hoverCursor: string = '';
-
     private _scene: Scene;
 
     /**
@@ -138,6 +130,7 @@ export class ActionManager {
      * @param scene defines the hosting scene
      */
     constructor(scene: Scene) {
+        super();
         this._scene = scene || EngineStore.LastCreatedScene;
 
         scene.actionManagers.push(this);
@@ -263,50 +256,6 @@ export class ActionManager {
     }
 
     /**
-     * Does exist one action manager with at least one trigger
-     **/
-    public static get HasTriggers(): boolean {
-        for (var t in ActionManager.Triggers) {
-            if (ActionManager.Triggers.hasOwnProperty(t)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Does exist one action manager with at least one pick trigger
-     **/
-    public static get HasPickTriggers(): boolean {
-        for (var t in ActionManager.Triggers) {
-            if (ActionManager.Triggers.hasOwnProperty(t)) {
-                let t_int = parseInt(t);
-                if (t_int >= ActionManager.OnPickTrigger && t_int <= ActionManager.OnPickUpTrigger) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Does exist one action manager that handles actions of a given trigger
-     * @param trigger defines the trigger to be tested
-     * @return a boolean indicating whether the trigger is handeled by at least one action manager
-    **/
-    public static HasSpecificTrigger(trigger: number): boolean {
-        for (var t in ActionManager.Triggers) {
-            if (ActionManager.Triggers.hasOwnProperty(t)) {
-                let t_int = parseInt(t);
-                if (t_int === trigger) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    /**
      * Registers an action to this action manager
      * @param action defines the action to be registered
      * @return the action amended (prepared) after registration
@@ -358,7 +307,7 @@ export class ActionManager {
      * @param trigger defines the trigger to process
      * @param evt defines the event details to be processed
      */
-    public processTrigger(trigger: number, evt?: ActionEvent): void {
+    public processTrigger(trigger: number, evt?: IActionEvent): void {
         for (var index = 0; index < this.actions.length; index++) {
             var action = this.actions[index];
 
@@ -707,4 +656,4 @@ export class ActionManager {
             default: return "";
         }
     }
-}
+}

+ 1 - 1
src/Animations/animation.ts

@@ -481,7 +481,7 @@ export class Animation {
      * @param framePerSecond The frames per second of the animation
      * @param dataType The data type of the animation
      * @param loopMode The loop mode of the animation
-     * @param enableBlendings Specifies if blending should be enabled
+     * @param enableBlending Specifies if blending should be enabled
      */
     constructor(
         /**Name of the animation */

+ 1 - 0
src/Audio/sound.ts

@@ -122,6 +122,7 @@ export class Sound {
     * Create a sound and attach it to a scene
     * @param name Name of your sound
     * @param urlOrArrayBuffer Url to the sound to load async or ArrayBuffer, it also works with MediaStreams
+    * @param scene defines the scene the sound belongs to
     * @param readyToPlayCallback Provide a callback function if you'd like to load your code once the sound is ready to be played
     * @param options Objects to provide with the current available options: autoplay, loop, volume, spatialSound, maxDistance, rolloffFactor, refDistance, distanceModel, panningModel, streaming
     */

+ 1 - 1
src/Bones/boneLookController.ts

@@ -142,7 +142,7 @@ export class BoneLookController {
      * @param mesh the mesh that the bone belongs to
      * @param bone the bone that will be looking to the target
      * @param target the target Vector3 to look at
-     * @param settings optional settings:
+     * @param options optional settings:
      * * maxYaw: the maximum angle the bone will yaw to
      * * minYaw: the minimum angle the bone will yaw to
      * * maxPitch: the maximum angle the bone will pitch to

+ 137 - 51
src/Cameras/Inputs/followCameraKeyboardMoveInput.ts

@@ -8,7 +8,7 @@ import { KeyboardInfo, KeyboardEventTypes } from "../../Events/keyboardEvents";
 import { Scene } from "../../scene";
 
 /**
- * Manage the keyboard inputs to control the movement of an arc rotate camera.
+ * Manage the keyboard inputs to control the movement of a follow camera.
  * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
  */
 export class FollowCameraKeyboardMoveInput implements ICameraInput<FollowCamera> {
@@ -21,59 +21,114 @@ export class FollowCameraKeyboardMoveInput implements ICameraInput<FollowCamera>
      * Defines the list of key codes associated with the up action (increase heightOffset)
      */
     @serialize()
-    public keysUp = [38];
+    public keysHeightOffsetIncr = [38];
 
     /**
      * Defines the list of key codes associated with the down action (decrease heightOffset)
      */
     @serialize()
-    public keysDown = [40];
+    public keysHeightOffsetDecr = [40];
 
     /**
-     * Defines the list of key codes associated with the left action (increase rotation)
+     * Defines whether the Alt modifier key is required to move up/down (alter heightOffset)
      */
     @serialize()
-    public keysLeft = [37];
+    public keysHeightOffsetModifierAlt: boolean = false;
 
     /**
-     * Defines the list of key codes associated with the right action (decrease rotation)
+     * Defines whether the Ctrl modifier key is required to move up/down (alter heightOffset)
      */
     @serialize()
-    public keysRight = [39];
+    public keysHeightOffsetModifierCtrl: boolean = false;
 
     /**
-     * Defines the rate of change of heightOffset.
+     * Defines whether the Shift modifier key is required to move up/down (alter heightOffset)
      */
     @serialize()
-    public heightSensibility: number = 1;
+    public keysHeightOffsetModifierShift: boolean = false;
 
     /**
-     * Defines the rate of change of rotationOffset.
+     * Defines the list of key codes associated with the left action (increase rotationOffset)
      */
     @serialize()
-    public rotationSensibility: number = 1;
+    public keysRotationOffsetIncr = [37];
 
     /**
-     * Defines the rate of change of radius.
+     * Defines the list of key codes associated with the right action (decrease rotationOffset)
      */
     @serialize()
-    public radiusSensibility: number = 1;
+    public keysRotationOffsetDecr = [39];
+
+    /**
+     * Defines whether the Alt modifier key is required to move left/right (alter rotationOffset)
+     */
+    @serialize()
+    public keysRotationOffsetModifierAlt: boolean = false;
+
+    /**
+     * Defines whether the Ctrl modifier key is required to move left/right (alter rotationOffset)
+     */
+    @serialize()
+    public keysRotationOffsetModifierCtrl: boolean = false;
+
+    /**
+     * Defines whether the Shift modifier key is required to move left/right (alter rotationOffset)
+     */
+    @serialize()
+    public keysRotationOffsetModifierShift: boolean = false;
+
+    /**
+     * Defines the list of key codes associated with the zoom-in action (decrease radius)
+     */
+    @serialize()
+    public keysRadiusIncr = [40];
+
+    /**
+     * Defines the list of key codes associated with the zoom-out action (increase radius)
+     */
+    @serialize()
+    public keysRadiusDecr = [38];
+
+    /**
+     * Defines whether the Alt modifier key is required to zoom in/out (alter radius value)
+     */
+    @serialize()
+    public keysRadiusModifierAlt: boolean = true;
+
+    /**
+     * Defines whether the Ctrl modifier key is required to zoom in/out (alter radius value)
+     */
+    @serialize()
+    public keysRadiusModifierCtrl: boolean = false;
+
+    /**
+     * Defines whether the Shift modifier key is required to zoom in/out (alter radius value)
+     */
+    @serialize()
+    public keysRadiusModifierShift: boolean = false;
+
+    /**
+     * Defines the rate of change of heightOffset.
+     */
+    @serialize()
+    public heightSensibility: number = 1;
 
     /**
-     * Defines the minimum heightOffset value.
+     * Defines the rate of change of rotationOffset.
      */
     @serialize()
-    public minHeightOffset: number = 0;
+    public rotationSensibility: number = 1;
 
     /**
-     * Defines the minimum radius value.
+     * Defines the rate of change of radius.
      */
     @serialize()
-    public minRadius: number = 0;
+    public radiusSensibility: number = 1;
 
     private _keys = new Array<number>();
-    // private _ctrlPressed: boolean;
+    private _ctrlPressed: boolean;
     private _altPressed: boolean;
+    private _shiftPressed: boolean;
     private _onCanvasBlurObserver: Nullable<Observer<Engine>>;
     private _onKeyboardObserver: Nullable<Observer<KeyboardInfo>>;
     private _engine: Engine;
@@ -100,13 +155,16 @@ export class FollowCameraKeyboardMoveInput implements ICameraInput<FollowCamera>
             let evt = info.event;
             if (!evt.metaKey) {
                 if (info.type === KeyboardEventTypes.KEYDOWN) {
-                    // this._ctrlPressed = evt.ctrlKey;
+                    this._ctrlPressed = evt.ctrlKey;
                     this._altPressed = evt.altKey;
+                    this._shiftPressed = evt.shiftKey;
 
-                    if (this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        this.keysRight.indexOf(evt.keyCode) !== -1) {
+                    if (this.keysHeightOffsetIncr.indexOf(evt.keyCode) !== -1 ||
+                        this.keysHeightOffsetDecr.indexOf(evt.keyCode) !== -1 ||
+                        this.keysRotationOffsetIncr.indexOf(evt.keyCode) !== -1 ||
+                        this.keysRotationOffsetDecr.indexOf(evt.keyCode) !== -1 ||
+                        this.keysRadiusIncr.indexOf(evt.keyCode) !== -1 ||
+                        this.keysRadiusDecr.indexOf(evt.keyCode) !== -1) {
                         var index = this._keys.indexOf(evt.keyCode);
 
                         if (index === -1) {
@@ -119,12 +177,13 @@ export class FollowCameraKeyboardMoveInput implements ICameraInput<FollowCamera>
                             }
                         }
                     }
-                }
-                else {
-                    if (this.keysUp.indexOf(evt.keyCode) !== -1 ||
-                        this.keysDown.indexOf(evt.keyCode) !== -1 ||
-                        this.keysLeft.indexOf(evt.keyCode) !== -1 ||
-                        this.keysRight.indexOf(evt.keyCode) !== -1) {
+                } else {
+                    if (this.keysHeightOffsetIncr.indexOf(evt.keyCode) !== -1 ||
+                        this.keysHeightOffsetDecr.indexOf(evt.keyCode) !== -1 ||
+                        this.keysRotationOffsetIncr.indexOf(evt.keyCode) !== -1 ||
+                        this.keysRotationOffsetDecr.indexOf(evt.keyCode) !== -1 ||
+                        this.keysRadiusIncr.indexOf(evt.keyCode) !== -1 ||
+                        this.keysRadiusDecr.indexOf(evt.keyCode) !== -1) {
                         var index = this._keys.indexOf(evt.keyCode);
 
                         if (index >= 0) {
@@ -167,37 +226,34 @@ export class FollowCameraKeyboardMoveInput implements ICameraInput<FollowCamera>
      */
     public checkInputs(): void {
         if (this._onKeyboardObserver) {
-            for (var index = 0; index < this._keys.length; index++) {
-                var keyCode = this._keys[index];
-                if (this.keysLeft.indexOf(keyCode) !== -1) {
+            this._keys.forEach((keyCode) => {
+                if (this.keysHeightOffsetIncr.indexOf(keyCode) !== -1 &&
+                           this._modifierHeightOffset()) {
+                    this.camera.heightOffset += this.heightSensibility;
+                } else if (this.keysHeightOffsetDecr.indexOf(keyCode) !== -1 &&
+                           this._modifierHeightOffset()) {
+                    this.camera.heightOffset -= this.heightSensibility;
+                } else if (this.keysRotationOffsetIncr.indexOf(keyCode) !== -1 &&
+                           this._modifierRotationOffset()) {
                     this.camera.rotationOffset += this.rotationSensibility;
                     this.camera.rotationOffset %= 360;
-                } else if (this.keysUp.indexOf(keyCode) !== -1) {
-                    if (this._altPressed) {
-                        this.camera.radius += this.radiusSensibility;
-                    } else {
-                        this.camera.heightOffset += this.heightSensibility;
-                    }
-                } else if (this.keysRight.indexOf(keyCode) !== -1) {
+                } else if (this.keysRotationOffsetDecr.indexOf(keyCode) !== -1 &&
+                           this._modifierRotationOffset()) {
                     this.camera.rotationOffset -= this.rotationSensibility;
                     this.camera.rotationOffset %= 360;
-                } else if (this.keysDown.indexOf(keyCode) !== -1) {
-                    if (this._altPressed) {
-                        this.camera.radius -= this.radiusSensibility;
-                        this.camera.radius =
-                            Math.max(this.minRadius, this.camera.radius);
-                    } else {
-                        this.camera.heightOffset -= this.heightSensibility;
-                        this.camera.heightOffset =
-                            Math.max(this.minHeightOffset, this.camera.heightOffset);
-                    }
+                } else if (this.keysRadiusIncr.indexOf(keyCode) !== -1 &&
+                           this._modifierRadius()) {
+                    this.camera.radius += this.radiusSensibility;
+                } else if (this.keysRadiusDecr.indexOf(keyCode) !== -1 &&
+                           this._modifierRadius()) {
+                    this.camera.radius -= this.radiusSensibility;
                 }
-            }
+            });
         }
     }
 
     /**
-     * Gets the class name of the current intput.
+     * Gets the class name of the current input.
      * @returns the class name
      */
     public getClassName(): string {
@@ -211,6 +267,36 @@ export class FollowCameraKeyboardMoveInput implements ICameraInput<FollowCamera>
     public getSimpleName(): string {
         return "keyboard";
     }
+
+    /**
+     * Check if the pressed modifier keys (Alt/Ctrl/Shift) match those configured to
+     * allow modification of the heightOffset value.
+     */
+    private _modifierHeightOffset(): boolean {
+        return (this.keysHeightOffsetModifierAlt === this._altPressed &&
+                this.keysHeightOffsetModifierCtrl === this._ctrlPressed &&
+                this.keysHeightOffsetModifierShift === this._shiftPressed);
+    }
+
+    /**
+     * Check if the pressed modifier keys (Alt/Ctrl/Shift) match those configured to
+     * allow modification of the rotationOffset value.
+     */
+    private _modifierRotationOffset(): boolean {
+        return (this.keysRotationOffsetModifierAlt === this._altPressed &&
+                this.keysRotationOffsetModifierCtrl === this._ctrlPressed &&
+                this.keysRotationOffsetModifierShift === this._shiftPressed);
+    }
+
+    /**
+     * Check if the pressed modifier keys (Alt/Ctrl/Shift) match those configured to
+     * allow modification of the radius value.
+     */
+    private _modifierRadius(): boolean {
+        return (this.keysRadiusModifierAlt === this._altPressed &&
+                this.keysRadiusModifierCtrl === this._ctrlPressed &&
+                this.keysRadiusModifierShift === this._shiftPressed);
+    }
 }
 
 (<any>CameraInputTypes)["FollowCameraKeyboardMoveInput"] = FollowCameraKeyboardMoveInput;

+ 147 - 0
src/Cameras/Inputs/followCameraMouseWheelInput.ts

@@ -0,0 +1,147 @@
+import { Nullable } from "../../types";
+import { serialize } from "../../Misc/decorators";
+import { EventState, Observer } from "../../Misc/observable";
+import { FollowCamera } from "../../Cameras/followCamera";
+import { ICameraInput, CameraInputTypes } from "../../Cameras/cameraInputsManager";
+import { PointerInfo, PointerEventTypes } from "../../Events/pointerEvents";
+
+/**
+ * Manage the mouse wheel inputs to control a follow camera.
+ * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+ */
+export class FollowCameraMouseWheelInput implements ICameraInput<FollowCamera> {
+    /**
+     * Defines the camera the input is attached to.
+     */
+    public camera: FollowCamera;
+
+    /**
+     * Moue wheel controls zoom. (Moue wheel modifies camera.radius value.)
+     */
+    @serialize()
+    public axisControlRadius: boolean = true;
+
+    /**
+     * Moue wheel controls height. (Moue wheel modifies camera.heightOffset value.)
+     */
+    @serialize()
+    public axisControlHeight: boolean = false;
+
+    /**
+     * Moue wheel controls angle. (Moue wheel modifies camera.rotationOffset value.)
+     */
+    @serialize()
+    public axisControlRotation: boolean = false;
+
+    /**
+     * Gets or Set the mouse wheel precision or how fast is the camera moves in
+     * relation to mouseWheel events.
+     */
+    @serialize()
+    public wheelPrecision = 3.0;
+
+    /**
+     * wheelDeltaPercentage will be used instead of wheelPrecision if different from 0.
+     * It defines the percentage of current camera.radius to use as delta when wheel is used.
+     */
+    @serialize()
+    public wheelDeltaPercentage = 0;
+
+    private _wheel: Nullable<(p: PointerInfo, s: EventState) => void>;
+    private _observer: Nullable<Observer<PointerInfo>>;
+
+    /**
+     * Attach the input controls to a specific dom element to get the input from.
+     * @param element Defines the element the controls should be listened from
+     * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+     */
+    public attachControl(element: HTMLElement, noPreventDefault?: boolean): void {
+        this._wheel = (p, s) => {
+            // sanity check - this should be a PointerWheel event.
+            if (p.type !== PointerEventTypes.POINTERWHEEL) { return; }
+            var event = <MouseWheelEvent>p.event;
+            var delta = 0;
+
+            // Chrome, Safari: event.deltaY
+            // IE: event.wheelDelta
+            // Firefox: event.detail (inverted)
+            var wheelDelta = Math.max(-1, Math.min(1,
+              (event.deltaY || (<any>event).wheelDelta || -event.detail)));
+            if (this.wheelDeltaPercentage) {
+                console.assert((<number>(<unknown>this.axisControlRadius) +
+                                <number>(<unknown>this.axisControlHeight) +
+                                <number>(<unknown>this.axisControlRotation)) <= 1,
+                               "wheelDeltaPercentage only usable when mouse wheel " +
+                               "controlls ONE axis. " +
+                               "Currently enabled: " +
+                               "axisControlRadius: " + this.axisControlRadius +
+                               ", axisControlHeightOffset: " + this.axisControlHeight +
+                               ", axisControlRotationOffset: " + this.axisControlRotation);
+
+                if (this.axisControlRadius) {
+                    delta =
+                        wheelDelta * 0.01 * this.wheelDeltaPercentage *
+                        this.camera.radius;
+                } else if (this.axisControlHeight) {
+                    delta =
+                        wheelDelta * 0.01 * this.wheelDeltaPercentage *
+                        this.camera.heightOffset;
+                } else if (this.axisControlRotation) {
+                    delta =
+                        wheelDelta * 0.01 * this.wheelDeltaPercentage *
+                        this.camera.rotationOffset;
+                }
+            } else {
+                delta = wheelDelta * this.wheelPrecision;
+            }
+
+            if (delta) {
+                if (this.axisControlRadius) {
+                    this.camera.radius += delta;
+                } else if (this.axisControlHeight) {
+                    this.camera.heightOffset += delta;
+                } else if (this.axisControlRotation) {
+                    this.camera.rotationOffset += delta;
+                }
+            }
+
+            if (event.preventDefault) {
+                if (!noPreventDefault) {
+                    event.preventDefault();
+                }
+            }
+        };
+
+        this._observer = this.camera.getScene().onPointerObservable.add(this._wheel, PointerEventTypes.POINTERWHEEL);
+    }
+
+    /**
+     * Detach the current controls from the specified dom element.
+     * @param element Defines the element to stop listening the inputs from
+     */
+    public detachControl(element: Nullable<HTMLElement>): void {
+        if (this._observer && element) {
+            this.camera.getScene().onPointerObservable.remove(this._observer);
+            this._observer = null;
+            this._wheel = null;
+        }
+    }
+
+    /**
+     * Gets the class name of the current intput.
+     * @returns the class name
+     */
+    public getClassName(): string {
+        return "ArcRotateCameraMouseWheelInput";
+    }
+
+    /**
+     * Get the friendly name associated with the input class.
+     * @returns the input friendly name
+     */
+    public getSimpleName(): string {
+        return "mousewheel";
+    }
+}
+
+(<any>CameraInputTypes)["FollowCameraMouseWheelInput"] = FollowCameraMouseWheelInput;

+ 73 - 1
src/Cameras/followCamera.ts

@@ -28,12 +28,42 @@ export class FollowCamera extends TargetCamera {
     public radius: number = 12;
 
     /**
+     * Minimum allowed distance of the camera to the axis of rotation
+     * (The camera can not get closer).
+     * This can help limiting how the Camera is able to move in the scene.
+     */
+    @serialize()
+    public lowerRadiusLimit: Nullable<number> = null;
+
+    /**
+     * Maximum allowed distance of the camera to the axis of rotation
+     * (The camera can not get further).
+     * This can help limiting how the Camera is able to move in the scene.
+     */
+    @serialize()
+    public upperRadiusLimit: Nullable<number> = null;
+
+    /**
      * Define a rotation offset between the camera and the object it follows
      */
     @serialize()
     public rotationOffset: number = 0;
 
     /**
+     * Minimum allowed angle to camera position relative to target object.
+     * This can help limiting how the Camera is able to move in the scene.
+     */
+    @serialize()
+    public lowerRotationOffsetLimit: Nullable<number> = null;
+
+    /**
+     * Maximum allowed angle to camera position relative to target object.
+     * This can help limiting how the Camera is able to move in the scene.
+     */
+    @serialize()
+    public upperRotationOffsetLimit: Nullable<number> = null;
+
+    /**
      * Define a height offset between the camera and the object it follows.
      * It can help following an object from the top (like a car chaing a plane)
      */
@@ -41,6 +71,20 @@ export class FollowCamera extends TargetCamera {
     public heightOffset: number = 4;
 
     /**
+     * Minimum allowed height of camera position relative to target object.
+     * This can help limiting how the Camera is able to move in the scene.
+     */
+    @serialize()
+    public lowerHeightOffsetLimit: Nullable<number> = null;
+
+    /**
+     * Maximum allowed height of camera position relative to target object.
+     * This can help limiting how the Camera is able to move in the scene.
+     */
+    @serialize()
+    public upperHeightOffsetLimit: Nullable<number> = null;
+
+    /**
      * Define how fast the camera can accelerate to follow it s target.
      */
     @serialize()
@@ -76,7 +120,7 @@ export class FollowCamera extends TargetCamera {
 
         this.lockedTarget = lockedTarget;
         this.inputs = new FollowCameraInputsManager(this);
-        this.inputs.addKeyboard();
+        this.inputs.addKeyboard().addMouseWheel();
         // Uncomment the following line when the relevant handlers have been implemented.
         // this.inputs.addKeyboard().addMouseWheel().addPointers().addVRDeviceOrientation();
     }
@@ -150,12 +194,40 @@ export class FollowCamera extends TargetCamera {
     /** @hidden */
     public _checkInputs(): void {
         this.inputs.checkInputs();
+        this._checkLimits();
         super._checkInputs();
         if (this.lockedTarget) {
             this._follow(this.lockedTarget);
         }
     }
 
+    private _checkLimits() {
+        if (this.lowerRadiusLimit !== null && this.radius < this.lowerRadiusLimit) {
+            this.radius = this.lowerRadiusLimit;
+        }
+        if (this.upperRadiusLimit !== null && this.radius > this.upperRadiusLimit) {
+            this.radius = this.upperRadiusLimit;
+        }
+
+        if (this.lowerHeightOffsetLimit !== null &&
+            this.heightOffset < this.lowerHeightOffsetLimit) {
+            this.heightOffset = this.lowerHeightOffsetLimit;
+        }
+        if (this.upperHeightOffsetLimit !== null &&
+            this.heightOffset > this.upperHeightOffsetLimit) {
+            this.heightOffset = this.upperHeightOffsetLimit;
+        }
+
+        if (this.lowerRotationOffsetLimit !== null &&
+            this.rotationOffset < this.lowerRotationOffsetLimit) {
+            this.rotationOffset = this.lowerRotationOffsetLimit;
+        }
+        if (this.upperRotationOffsetLimit !== null &&
+            this.rotationOffset > this.upperRotationOffsetLimit) {
+            this.rotationOffset = this.upperRotationOffsetLimit;
+        }
+    }
+
     /**
      * Gets the camera class name.
      * @returns the class name

+ 0 - 0
src/Cameras/followCameraInputsManager.ts


Vissa filer visades inte eftersom för många filer har ändrats