瀏覽代碼

Merge remote-tracking branch 'BabylonJS/master' into viewer-tests

Raanan Weber 7 年之前
父節點
當前提交
95b6b5143f
共有 30 個文件被更改,包括 34733 次插入34328 次删除
  1. 19905 19885
      Playground/babylon.d.txt
  2. 二進制
      Viewer/assets/babylon.woff
  3. 3 2
      Viewer/assets/templates/default/navbar.html
  4. 1 0
      Viewer/src/configuration/index.ts
  5. 2 0
      Viewer/src/index.ts
  6. 3 2
      Viewer/src/viewer/defaultViewer.ts
  7. 5 3
      Viewer/src/viewer/sceneManager.ts
  8. 14129 14109
      dist/preview release/babylon.d.ts
  9. 48 48
      dist/preview release/babylon.js
  10. 55 13
      dist/preview release/babylon.max.js
  11. 55 13
      dist/preview release/babylon.no-module.max.js
  12. 49 49
      dist/preview release/babylon.worker.js
  13. 55 13
      dist/preview release/es6.js
  14. 6 1
      dist/preview release/gui/babylon.gui.js
  15. 4 4
      dist/preview release/gui/babylon.gui.min.js
  16. 58 11
      dist/preview release/viewer/babylon.viewer.d.ts
  17. 60 60
      dist/preview release/viewer/babylon.viewer.js
  18. 163 91
      dist/preview release/viewer/babylon.viewer.max.js
  19. 58 11
      dist/preview release/viewer/babylon.viewer.module.d.ts
  20. 15 2
      dist/preview release/what's new.md
  21. 4 0
      gui/src/advancedDynamicTexture.ts
  22. 4 1
      gui/src/controls/radioButton.ts
  23. 8 0
      src/Engine/babylon.engine.ts
  24. 18 4
      src/Lights/babylon.light.ts
  25. 1 0
      src/Math/babylon.math.ts
  26. 3 1
      src/PostProcess/RenderPipeline/Pipelines/babylon.ssao2RenderingPipeline.ts
  27. 2 1
      src/PostProcess/RenderPipeline/Pipelines/babylon.ssaoRenderingPipeline.ts
  28. 7 2
      src/PostProcess/babylon.postProcess.ts
  29. 2 1
      src/Shaders/ssaoCombine.fragment.fx
  30. 10 1
      src/babylon.scene.ts

File diff suppressed because it is too large
+ 19905 - 19885
Playground/babylon.d.txt


二進制
Viewer/assets/babylon.woff


+ 3 - 2
Viewer/assets/templates/default/navbar.html

@@ -140,9 +140,8 @@
     }
 
     .help-icon:after {
-        /* TODO: wrong Icon, need font update */
         font-size: 16px;
-        content: "\F70C";
+        content: "\EF4E";
     }
 
     .progress-control {
@@ -151,6 +150,7 @@
         position: relative;
         overflow: hidden;
         cursor: pointer;
+        align-items: center;
     }
 
     .animation-number {
@@ -301,6 +301,7 @@
         width: 100%;
         outline: none;
         margin: 0 12px;
+        height: 30px;
         background-color: transparent;
     }
 

+ 1 - 0
Viewer/src/configuration/index.ts

@@ -0,0 +1 @@
+export * from './configuration';

+ 2 - 0
Viewer/src/index.ts

@@ -46,3 +46,5 @@ console.log("Babylon.js viewer (v" + Version + ")");
 
 // public API for initialization
 export { BABYLON, Version, InitTags, DefaultViewer, AbstractViewer, viewerGlobals, telemetryManager, disableInit, viewerManager, mapperManager, disposeAll, ModelLoader, ViewerModel, AnimationPlayMode, AnimationState, ModelState, ILoaderPlugin };
+// export publicliy all configuration interfaces
+export * from './configuration';

+ 3 - 2
Viewer/src/viewer/defaultViewer.ts

@@ -60,7 +60,8 @@ export class DefaultViewer extends AbstractViewer {
             }, "pointerdown", "#help-button");
 
             this.templateManager.eventManager.registerCallback("navBar", (event: EventCallback) => {
-                let element = <HTMLInputElement>event.event.srcElement;
+                const evt = event.event;
+                const element = <HTMLInputElement>(evt.target);
                 if (!this._currentAnimation) return;
                 const gotoFrame = +element.value / 100 * this._currentAnimation.frames;
                 if (isNaN(gotoFrame)) return;
@@ -85,7 +86,7 @@ export class DefaultViewer extends AbstractViewer {
 
         let pointerDown = <PointerEvent>event.event;
         if (pointerDown.button !== 0) return;
-        var element = (<HTMLElement>event.event.srcElement);
+        var element = (<HTMLElement>event.event.target);
 
         if (!element) {
             return;

+ 5 - 3
Viewer/src/viewer/sceneManager.ts

@@ -915,7 +915,7 @@ export class SceneManager {
         if (!this.environmentHelper) {
             this.environmentHelper = this.scene.createDefaultEnvironment(options)!;
         } else {
-            // there might be a new scene! we need to dispose.
+            // unlikely, but there might be a new scene! we need to dispose.
 
             // get the scene used by the envHelper
             let scene: Scene = this.environmentHelper.rootMesh.getScene();
@@ -933,9 +933,11 @@ export class SceneManager {
         }
 
         let groundConfig = (typeof groundConfiguration === 'boolean') ? {} : groundConfiguration;
-        if (this.environmentHelper.groundMaterial && groundConfig && groundConfig.material) {
+        if (this.environmentHelper.groundMaterial && groundConfig) {
             this.environmentHelper.groundMaterial._perceptualColor = this.mainColor;
-            extendClassWithConfig(this.environmentHelper.groundMaterial, groundConfig.material);
+            if (groundConfig.material) {
+                extendClassWithConfig(this.environmentHelper.groundMaterial, groundConfig.material);
+            }
 
             if (this.environmentHelper.groundMirror) {
                 const mirrorClearColor = this.environmentHelper.groundMaterial._perceptualColor.toLinearSpace();

File diff suppressed because it is too large
+ 14129 - 14109
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 48 - 48
dist/preview release/babylon.js


File diff suppressed because it is too large
+ 55 - 13
dist/preview release/babylon.max.js


File diff suppressed because it is too large
+ 55 - 13
dist/preview release/babylon.no-module.max.js


File diff suppressed because it is too large
+ 49 - 49
dist/preview release/babylon.worker.js


File diff suppressed because it is too large
+ 55 - 13
dist/preview release/es6.js


+ 6 - 1
dist/preview release/gui/babylon.gui.js

@@ -422,6 +422,9 @@ var BABYLON;
                     return;
                 }
                 this._pointerMoveObserver = scene.onPrePointerObservable.add(function (pi, state) {
+                    if (scene.isPointerCaptured((pi.event).pointerId)) {
+                        return;
+                    }
                     if (pi.type !== BABYLON.PointerEventTypes.POINTERMOVE
                         && pi.type !== BABYLON.PointerEventTypes.POINTERUP
                         && pi.type !== BABYLON.PointerEventTypes.POINTERDOWN) {
@@ -3501,7 +3504,9 @@ var BABYLON;
                 if (!_super.prototype._onPointerDown.call(this, target, coordinates, pointerId, buttonIndex)) {
                     return false;
                 }
-                this.isChecked = !this.isChecked;
+                if (!this.isChecked) {
+                    this.isChecked = true;
+                }
                 return true;
             };
             return RadioButton;

File diff suppressed because it is too large
+ 4 - 4
dist/preview release/gui/babylon.gui.min.js


+ 58 - 11
dist/preview release/viewer/babylon.viewer.d.ts

@@ -334,6 +334,9 @@ declare module BabylonViewer {
                 * The configuration loader of this viewer
                 */
             protected _configurationLoader: ConfigurationLoader;
+            /**
+                * Is the viewer already initialized. for internal use.
+                */
             protected _isInit: boolean;
             constructor(containerElement: HTMLElement, initialConfiguration?: ViewerConfiguration);
             /**
@@ -383,9 +386,10 @@ declare module BabylonViewer {
                 * Only provided information will be updated, old configuration values will be kept.
                 * If this.configuration was manually changed, you can trigger this function with no parameters,
                 * and the entire configuration will be updated.
-                * @param newConfiguration
+                * @param newConfiguration the partial configuration to update
+                *
                 */
-            updateConfiguration(newConfiguration?: Partial<ViewerConfiguration>, mode?: ViewerModel): void;
+            updateConfiguration(newConfiguration?: Partial<ViewerConfiguration>): void;
             /**
                 * this is used to register native functions using the configuration object.
                 * This will configure the observers.
@@ -416,7 +420,7 @@ declare module BabylonViewer {
                 */
             protected _initEngine(): Promise<BABYLON.Engine>;
             /**
-                * Initialize a model loading. The returns object (a ViewerModel object) will be loaded in the background.
+                * Initialize a model loading. The returned object (a ViewerModel object) will be loaded in the background.
                 * The difference between this and loadModel is that loadModel will fulfill the promise when the model finished loading.
                 *
                 * @param modelConfig model configuration to use when loading the model.
@@ -425,7 +429,9 @@ declare module BabylonViewer {
                 */
             initModel(modelConfig: string | IModelConfiguration, clearScene?: boolean): ViewerModel;
             /**
-                * load a model using the provided configuration
+                * load a model using the provided configuration.
+                * This function, as opposed to initModel, will return a promise that resolves when the model is loaded, and rejects with error.
+                * If you want to attach to the observables of the model, use initModle instead.
                 *
                 * @param modelConfig the model configuration or URL to load.
                 * @param clearScene Should the scene be cleared before loading the model
@@ -480,6 +486,9 @@ declare module BabylonViewer {
                 * @return The current session ID
                 */
             readonly session: string;
+            /**
+                * Disposes the telemetry manager
+                */
             dispose(): void;
     }
     export const telemetryManager: TelemetryManager;
@@ -502,6 +511,11 @@ declare module BabylonViewer {
                 * @param _viewer the viewer using this model loader
                 */
             constructor(_viewer: AbstractViewer);
+            /**
+                * Adds a new plugin to the loader process.
+                *
+                * @param plugin the plugin name or the plugin itself
+                */
             addPlugin(plugin: ILoaderPlugin | string): void;
             /**
                 * Load a model using predefined configuration
@@ -523,6 +537,9 @@ declare module BabylonViewer {
     
     
     
+    /**
+        * The current state of the model
+        */
     export enum ModelState {
             INIT = 0,
             LOADING = 1,
@@ -891,6 +908,11 @@ declare module BabylonViewer {
     
     
     
+    /**
+      * This interface defines the structure of a loader plugin.
+      * Any of those functions will be called if (!) the loader supports those callbacks.
+      * Any loader supports onInit, onLoaded, onError and onProgress.
+      */
     export interface ILoaderPlugin {
         onInit?: (loader: BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync, model: ViewerModel) => void;
         onLoaded?: (model: ViewerModel) => void;
@@ -1455,12 +1477,30 @@ declare module BabylonViewer {
         * A single template configuration object
         */
     export interface ITemplateConfiguration {
+            /**
+                * can be either the id of the template's html element or a URL.
+                * See - http://doc.babylonjs.com/extensions/the_templating_system#location-vs-html
+                */
             location?: string;
+            /**
+                * If no location is provided you can provide here the raw html of this template.
+                * See http://doc.babylonjs.com/extensions/the_templating_system#location-vs-html
+                */
             html?: string;
             id?: string;
+            /**
+                * Parameters that will be delivered to the template and will render it accordingly.
+                */
             params?: {
                     [key: string]: string | number | boolean | object;
             };
+            /**
+                * Events to attach to this template.
+                * event name is the key. the value can either be a boolean (attach to the parent element)
+                * or a map of html id elements.
+                *
+                * See - http://doc.babylonjs.com/extensions/the_templating_system#event-binding
+                */
             events?: {
                     pointerdown?: boolean | {
                             [id: string]: boolean;
@@ -1617,6 +1657,8 @@ declare module BabylonViewer {
                 * The parameters are provided to Handlebars which in turn generates the template.
                 * This function will update the template with the new parameters
                 *
+                * Note that when updating parameters the events will be registered again (after being cleared).
+                *
                 * @param params the new template parameters
                 */
             updateParams(params: {
@@ -1785,7 +1827,7 @@ declare module BabylonViewer {
                 * @param newConfiguration the delta that should be configured. This includes only the changes
                 * @param globalConfiguration The global configuration object, after the new configuration was merged into it
                 */
-            updateConfiguration(newConfiguration: Partial<ViewerConfiguration>, globalConfiguration: ViewerConfiguration, model?: ViewerModel): void;
+            updateConfiguration(newConfiguration: Partial<ViewerConfiguration>, globalConfiguration: ViewerConfiguration): void;
             bloomEnabled: boolean;
             fxaaEnabled: boolean;
             /**
@@ -1805,8 +1847,8 @@ declare module BabylonViewer {
                 * @param cameraConfig the new camera configuration
                 * @param model optionally use the model to configure the camera.
                 */
-            protected _configureCamera(cameraConfig?: ICameraConfiguration, model?: ViewerModel): void;
-            protected _configureEnvironment(skyboxConifguration?: ISkyboxConfiguration | boolean, groundConfiguration?: IGroundConfiguration | boolean, model?: ViewerModel): Promise<BABYLON.Scene> | undefined;
+            protected _configureCamera(cameraConfig?: ICameraConfiguration): void;
+            protected _configureEnvironment(skyboxConifguration?: ISkyboxConfiguration | boolean, groundConfiguration?: IGroundConfiguration | boolean): Promise<BABYLON.Scene> | undefined;
             /**
                 * configure the lights.
                 *
@@ -1815,7 +1857,7 @@ declare module BabylonViewer {
                 */
             protected _configureLights(lightsConfiguration?: {
                     [name: string]: ILightConfiguration | boolean;
-            }, model?: ViewerModel): void;
+            }): void;
             /**
                 * Gets the shadow map blur kernel according to the light configuration.
                 * @param light The light used to generate the shadows
@@ -1899,6 +1941,11 @@ declare module BabylonViewer {
 declare module BabylonViewer {
     
     
+    /**
+        * The ViewerLabs class will hold functions that are not (!) backwards compatible.
+        * The APIs in all labs-related classes and configuration  might change.
+        * Once stable, lab features will be moved to the publis API and configuration object.
+        */
     export class ViewerLabs {
             constructor(_sceneManager: SceneManager);
             assetsRootURL: string;
@@ -1945,9 +1992,9 @@ declare module BabylonViewer {
     
     
     /**
-                * Spherical polynomial coefficients (counter part to spherical harmonic coefficients used in shader irradiance calculation)
-                * @ignoreChildren
-                */
+        * Spherical polynomial coefficients (counter part to spherical harmonic coefficients used in shader irradiance calculation)
+        * @ignoreChildren
+        */
     export interface SphericalPolynomalCoefficients {
             x: BABYLON.Vector3;
             y: BABYLON.Vector3;

File diff suppressed because it is too large
+ 60 - 60
dist/preview release/viewer/babylon.viewer.js


File diff suppressed because it is too large
+ 163 - 91
dist/preview release/viewer/babylon.viewer.max.js


+ 58 - 11
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -334,6 +334,9 @@ declare module 'babylonjs-viewer/viewer/viewer' {
                 * The configuration loader of this viewer
                 */
             protected _configurationLoader: ConfigurationLoader;
+            /**
+                * Is the viewer already initialized. for internal use.
+                */
             protected _isInit: boolean;
             constructor(containerElement: HTMLElement, initialConfiguration?: ViewerConfiguration);
             /**
@@ -383,9 +386,10 @@ declare module 'babylonjs-viewer/viewer/viewer' {
                 * Only provided information will be updated, old configuration values will be kept.
                 * If this.configuration was manually changed, you can trigger this function with no parameters,
                 * and the entire configuration will be updated.
-                * @param newConfiguration
+                * @param newConfiguration the partial configuration to update
+                *
                 */
-            updateConfiguration(newConfiguration?: Partial<ViewerConfiguration>, mode?: ViewerModel): void;
+            updateConfiguration(newConfiguration?: Partial<ViewerConfiguration>): void;
             /**
                 * this is used to register native functions using the configuration object.
                 * This will configure the observers.
@@ -416,7 +420,7 @@ declare module 'babylonjs-viewer/viewer/viewer' {
                 */
             protected _initEngine(): Promise<Engine>;
             /**
-                * Initialize a model loading. The returns object (a ViewerModel object) will be loaded in the background.
+                * Initialize a model loading. The returned object (a ViewerModel object) will be loaded in the background.
                 * The difference between this and loadModel is that loadModel will fulfill the promise when the model finished loading.
                 *
                 * @param modelConfig model configuration to use when loading the model.
@@ -425,7 +429,9 @@ declare module 'babylonjs-viewer/viewer/viewer' {
                 */
             initModel(modelConfig: string | IModelConfiguration, clearScene?: boolean): ViewerModel;
             /**
-                * load a model using the provided configuration
+                * load a model using the provided configuration.
+                * This function, as opposed to initModel, will return a promise that resolves when the model is loaded, and rejects with error.
+                * If you want to attach to the observables of the model, use initModle instead.
                 *
                 * @param modelConfig the model configuration or URL to load.
                 * @param clearScene Should the scene be cleared before loading the model
@@ -480,6 +486,9 @@ declare module 'babylonjs-viewer/telemetryManager' {
                 * @return The current session ID
                 */
             readonly session: string;
+            /**
+                * Disposes the telemetry manager
+                */
             dispose(): void;
     }
     export const telemetryManager: TelemetryManager;
@@ -502,6 +511,11 @@ declare module 'babylonjs-viewer/loader/modelLoader' {
                 * @param _viewer the viewer using this model loader
                 */
             constructor(_viewer: AbstractViewer);
+            /**
+                * Adds a new plugin to the loader process.
+                *
+                * @param plugin the plugin name or the plugin itself
+                */
             addPlugin(plugin: ILoaderPlugin | string): void;
             /**
                 * Load a model using predefined configuration
@@ -523,6 +537,9 @@ declare module 'babylonjs-viewer/model/viewerModel' {
     import { IModelConfiguration } from "babylonjs-viewer/configuration/configuration";
     import { IModelAnimation } from "babylonjs-viewer/model/modelAnimation";
     import { AbstractViewer } from "babylonjs-viewer/";
+    /**
+        * The current state of the model
+        */
     export enum ModelState {
             INIT = 0,
             LOADING = 1,
@@ -891,6 +908,11 @@ declare module 'babylonjs-viewer/loader/plugins/loaderPlugin' {
     import { ViewerModel } from "babylonjs-viewer/model/viewerModel";
     import { IGLTFLoaderExtension, IGLTFLoaderData } from "babylonjs-loaders";
     import { AbstractMesh, ISceneLoaderPlugin, ISceneLoaderPluginAsync, SceneLoaderProgressEvent, BaseTexture, Material } from "babylonjs";
+    /**
+      * This interface defines the structure of a loader plugin.
+      * Any of those functions will be called if (!) the loader supports those callbacks.
+      * Any loader supports onInit, onLoaded, onError and onProgress.
+      */
     export interface ILoaderPlugin {
         onInit?: (loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel) => void;
         onLoaded?: (model: ViewerModel) => void;
@@ -1455,12 +1477,30 @@ declare module 'babylonjs-viewer/templateManager' {
         * A single template configuration object
         */
     export interface ITemplateConfiguration {
+            /**
+                * can be either the id of the template's html element or a URL.
+                * See - http://doc.babylonjs.com/extensions/the_templating_system#location-vs-html
+                */
             location?: string;
+            /**
+                * If no location is provided you can provide here the raw html of this template.
+                * See http://doc.babylonjs.com/extensions/the_templating_system#location-vs-html
+                */
             html?: string;
             id?: string;
+            /**
+                * Parameters that will be delivered to the template and will render it accordingly.
+                */
             params?: {
                     [key: string]: string | number | boolean | object;
             };
+            /**
+                * Events to attach to this template.
+                * event name is the key. the value can either be a boolean (attach to the parent element)
+                * or a map of html id elements.
+                *
+                * See - http://doc.babylonjs.com/extensions/the_templating_system#event-binding
+                */
             events?: {
                     pointerdown?: boolean | {
                             [id: string]: boolean;
@@ -1617,6 +1657,8 @@ declare module 'babylonjs-viewer/templateManager' {
                 * The parameters are provided to Handlebars which in turn generates the template.
                 * This function will update the template with the new parameters
                 *
+                * Note that when updating parameters the events will be registered again (after being cleared).
+                *
                 * @param params the new template parameters
                 */
             updateParams(params: {
@@ -1785,7 +1827,7 @@ declare module 'babylonjs-viewer/viewer/sceneManager' {
                 * @param newConfiguration the delta that should be configured. This includes only the changes
                 * @param globalConfiguration The global configuration object, after the new configuration was merged into it
                 */
-            updateConfiguration(newConfiguration: Partial<ViewerConfiguration>, globalConfiguration: ViewerConfiguration, model?: ViewerModel): void;
+            updateConfiguration(newConfiguration: Partial<ViewerConfiguration>, globalConfiguration: ViewerConfiguration): void;
             bloomEnabled: boolean;
             fxaaEnabled: boolean;
             /**
@@ -1805,8 +1847,8 @@ declare module 'babylonjs-viewer/viewer/sceneManager' {
                 * @param cameraConfig the new camera configuration
                 * @param model optionally use the model to configure the camera.
                 */
-            protected _configureCamera(cameraConfig?: ICameraConfiguration, model?: ViewerModel): void;
-            protected _configureEnvironment(skyboxConifguration?: ISkyboxConfiguration | boolean, groundConfiguration?: IGroundConfiguration | boolean, model?: ViewerModel): Promise<Scene> | undefined;
+            protected _configureCamera(cameraConfig?: ICameraConfiguration): void;
+            protected _configureEnvironment(skyboxConifguration?: ISkyboxConfiguration | boolean, groundConfiguration?: IGroundConfiguration | boolean): Promise<Scene> | undefined;
             /**
                 * configure the lights.
                 *
@@ -1815,7 +1857,7 @@ declare module 'babylonjs-viewer/viewer/sceneManager' {
                 */
             protected _configureLights(lightsConfiguration?: {
                     [name: string]: ILightConfiguration | boolean;
-            }, model?: ViewerModel): void;
+            }): void;
             /**
                 * Gets the shadow map blur kernel according to the light configuration.
                 * @param light The light used to generate the shadows
@@ -1927,6 +1969,11 @@ declare module 'babylonjs-viewer/eventManager' {
 declare module 'babylonjs-viewer/labs/viewerLabs' {
     import { PBREnvironment } from "babylonjs-viewer/labs/environmentSerializer";
     import { SceneManager } from 'babylonjs-viewer/viewer/sceneManager';
+    /**
+        * The ViewerLabs class will hold functions that are not (!) backwards compatible.
+        * The APIs in all labs-related classes and configuration  might change.
+        * Once stable, lab features will be moved to the publis API and configuration object.
+        */
     export class ViewerLabs {
             constructor(_sceneManager: SceneManager);
             assetsRootURL: string;
@@ -1973,9 +2020,9 @@ declare module 'babylonjs-viewer/labs/environmentSerializer' {
     import { Vector3 } from "babylonjs";
     import { TextureCube } from 'babylonjs-viewer/labs/texture';
     /**
-                * Spherical polynomial coefficients (counter part to spherical harmonic coefficients used in shader irradiance calculation)
-                * @ignoreChildren
-                */
+        * Spherical polynomial coefficients (counter part to spherical harmonic coefficients used in shader irradiance calculation)
+        * @ignoreChildren
+        */
     export interface SphericalPolynomalCoefficients {
             x: Vector3;
             y: Vector3;

+ 15 - 2
dist/preview release/what's new.md

@@ -5,12 +5,25 @@
 ## Updates
 
 ### Core Engine
-- Added the choice of [forming a closed loop](http://doc.babylonjs.com/how_to/how_to_use_curve3#catmull-rom-spline) to the catamull-rom-spline curve3 ([johnk](https://github.com/babylonjsguide))
+
+- Add the choice of [forming a closed loop](http://doc.babylonjs.com/how_to/how_to_use_curve3#catmull-rom-spline) to the catamull-rom-spline curve3 ([johnk](https://github.com/babylonjsguide))
 - Add support for specifying the center of rotation to textures ([bghgary](http://www.github.com/bghgary))
 
 ### glTF Loader
-  - Add support for KHR_texture_transform ([bghgary](http://www.github.com/bghgary))
+
+- Add support for KHR_texture_transform ([bghgary](http://www.github.com/bghgary))
 
 ## Bug fixes
 
+### Core Engine
+
+- Fix ```shadowEnabled``` property on lights. Shadows are not visble anymore when disabled ([sebavan](http://www.github.com/sebavan))
+
+### Viewer
+
+- Fix Navbar Interaction on Mozilla/Firefox ([SzeyinLee](https://github.com/SzeyinLee))
+- Fix Animation Slider Interaction on Mozilla/Firefox ([sebavan](http://www.github.com/sebavan))
+- Fix Animation Slider Clickable area size Cross Plat ([sebavan](http://www.github.com/sebavan))
+- Ground material didn't take the default main color is no material definition was provided ([RaananW](https://github.com/RaananW))
+
 ## Breaking changes

+ 4 - 0
gui/src/advancedDynamicTexture.ts

@@ -459,6 +459,10 @@ module BABYLON.GUI {
             }
 
             this._pointerMoveObserver = scene.onPrePointerObservable.add((pi, state) => {
+                if (scene!.isPointerCaptured((<PointerEvent>(pi.event)).pointerId)) {
+                    return;
+                }
+
                 if (pi.type !== BABYLON.PointerEventTypes.POINTERMOVE
                     && pi.type !== BABYLON.PointerEventTypes.POINTERUP
                     && pi.type !== BABYLON.PointerEventTypes.POINTERDOWN) {

+ 4 - 1
gui/src/controls/radioButton.ts

@@ -148,7 +148,10 @@ module BABYLON.GUI {
             if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex)) {
                 return false;
             }
-            this.isChecked = !this.isChecked;
+            
+            if (!this.isChecked) {
+                this.isChecked = true;
+            }
 
             return true;
         }

+ 8 - 0
src/Engine/babylon.engine.ts

@@ -1729,6 +1729,14 @@
         }
 
         /**
+         * Gets current screen aspect ratio
+         * @returns a number defining the aspect ratio
+         */
+        public getScreenAspectRatio(): number {
+            return (this.getRenderWidth(true)) / (this.getRenderHeight(true));
+        }        
+
+        /**
          * Gets the current render width
          * @param useScreen defines if screen size must be used (or the current render target if any)
          * @returns a number defining the current render width

+ 18 - 4
src/Lights/babylon.light.ts

@@ -185,7 +185,6 @@ module BABYLON {
             this._computePhotometricScale();
         };
 
-        
         @serialize()
         private _renderPriority: number;
         /**
@@ -195,12 +194,27 @@ module BABYLON {
         @expandToProperty("_reorderLightsInScene")
         public renderPriority: number = 0;
 
+        @serialize("shadowEnabled")
+        private _shadowEnabled: boolean = true;
         /**
-         * Defines wether or not the shadows are enabled for this light. This can help turning off/on shadow without detaching
+         * Gets wether or not the shadows are enabled for this light. This can help turning off/on shadow without detaching
          * the current shadow generator.
          */
-        @serialize()
-        public shadowEnabled: boolean = true;
+        public get shadowEnabled(): boolean {
+            return this._shadowEnabled;
+        }
+        /**
+         * Sets wether or not the shadows are enabled for this light. This can help turning off/on shadow without detaching
+         * the current shadow generator.
+         */
+        public set shadowEnabled(value: boolean) {
+            if (this._shadowEnabled === value) {
+                return;
+            }
+
+            this._shadowEnabled = value;
+            this._markMeshesAsLightDirty();
+        }
 
         private _includedOnlyMeshes: AbstractMesh[];
         /**

+ 1 - 0
src/Math/babylon.math.ts

@@ -6560,6 +6560,7 @@
                         amount += step;
                     }
                 }
+                catmullRom.push(catmullRom[0]);
             }
             else {
                 var totalPoints = new Array<Vector3>();

+ 3 - 1
src/PostProcess/RenderPipeline/Pipelines/babylon.ssao2RenderingPipeline.ts

@@ -327,11 +327,13 @@
         }
 
         private _createSSAOCombinePostProcess(ratio: number): void {
-            this._ssaoCombinePostProcess = new PostProcess("ssaoCombine", "ssaoCombine", [], ["originalColor"],
+            this._ssaoCombinePostProcess = new PostProcess("ssaoCombine", "ssaoCombine", [], ["originalColor", "viewport"],
                 ratio, null, Texture.BILINEAR_SAMPLINGMODE,
                 this._scene.getEngine(), false);
 
             this._ssaoCombinePostProcess.onApply = (effect: Effect) => {
+                let viewport = this._scene.activeCamera!.viewport;
+                effect.setVector4("viewport", Tmp.Vector4[0].copyFromFloats(viewport.x, viewport.y, viewport.width, viewport.height));
                 effect.setTextureFromPostProcess("originalColor", this._originalColorPostProcess);
             };
         }

+ 2 - 1
src/PostProcess/RenderPipeline/Pipelines/babylon.ssaoRenderingPipeline.ts

@@ -208,11 +208,12 @@
         }
 
         private _createSSAOCombinePostProcess(ratio: number): void {
-            this._ssaoCombinePostProcess = new PostProcess("ssaoCombine", "ssaoCombine", [], ["originalColor"],
+            this._ssaoCombinePostProcess = new PostProcess("ssaoCombine", "ssaoCombine", [], ["originalColor", "viewport"],
                 ratio, null, Texture.BILINEAR_SAMPLINGMODE,
                 this._scene.getEngine(), false);
 
             this._ssaoCombinePostProcess.onApply = (effect: Effect) => {
+                effect.setVector4("viewport", Tmp.Vector4[0].copyFromFloats(0, 0, 1.0, 1.0));
                 effect.setTextureFromPostProcess("originalColor", this._originalColorPostProcess);
             };
         }

+ 7 - 2
src/PostProcess/babylon.postProcess.ts

@@ -53,6 +53,11 @@
         public enablePixelPerfectMode = false;
 
         /**
+         * Force the postprocess to be applied without taking in account viewport
+         */
+        public forceFullscreenViewport = true;
+
+        /**
         * Scale mode for the post process (default: Engine.SCALEMODE_FLOOR)
         */
         public scaleMode = Engine.SCALEMODE_FLOOR;
@@ -446,11 +451,11 @@
             // Bind the input of this post process to be used as the output of the previous post process.
             if (this.enablePixelPerfectMode) {
                 this._scaleRatio.copyFromFloats(requiredWidth / desiredWidth, requiredHeight / desiredHeight);
-                this._engine.bindFramebuffer(target, 0, requiredWidth, requiredHeight, true);
+                this._engine.bindFramebuffer(target, 0, requiredWidth, requiredHeight, this.forceFullscreenViewport);
             }
             else {
                 this._scaleRatio.copyFromFloats(1, 1);
-                this._engine.bindFramebuffer(target, 0, undefined, undefined, true);
+                this._engine.bindFramebuffer(target, 0, undefined, undefined, this.forceFullscreenViewport);
             }
 
             this.onActivateObservable.notifyObservers(camera);

+ 2 - 1
src/Shaders/ssaoCombine.fragment.fx

@@ -1,10 +1,11 @@
 uniform sampler2D textureSampler;
 uniform sampler2D originalColor;
+uniform vec4 viewport;
 
 varying vec2 vUV;
 
 void main(void) {
-	vec4 ssaoColor = texture2D(textureSampler, vUV);
+	vec4 ssaoColor = texture2D(textureSampler, viewport.xy + vUV * viewport.zw);
 	vec4 sceneColor = texture2D(originalColor, vUV);
 
 	gl_FragColor = sceneColor * ssaoColor;

+ 10 - 1
src/babylon.scene.ts

@@ -1813,6 +1813,15 @@
         }
 
         /**
+         * Gets a boolean indicating if the current pointer event is captured (meaning that the scene has already handled the pointer down)
+         * @param pointerId defines the pointer id to use in a multi-touch scenario (0 by default)
+         * @returns true if the pointer was captured
+         */
+        public isPointerCaptured(pointerId = 0): boolean {
+            return this._pointerCaptures[pointerId];
+        }
+
+        /**
         * Attach events to the canvas (To handle actionManagers triggers and raise onPointerMove, onPointerDown and onPointerUp
         * @param attachUp defines if you want to attach events to pointerup
         * @param attachDown defines if you want to attach events to pointerdown
@@ -2066,7 +2075,7 @@
                 this._updatePointerPosition(evt);
                 this._initClickEvent(this.onPrePointerObservable, this.onPointerObservable, evt, (clickInfo: ClickInfo, pickResult: Nullable<PickingInfo>) => {
                     // PreObservable support
-                    if (this.onPrePointerObservable.hasObservers() && !this._pointerCaptures[evt.pointerId]) {
+                    if (this.onPrePointerObservable.hasObservers()) {
                         if (!clickInfo.ignore) {
                             if (!clickInfo.hasSwiped) {
                                 if (clickInfo.singleClick && this.onPrePointerObservable.hasSpecificMask(PointerEventTypes.POINTERTAP)) {