David Catuhe 6 gadi atpakaļ
vecāks
revīzija
a11b747d20

+ 11 - 2
Playground/babylon.d.txt

@@ -29744,6 +29744,14 @@ declare module BABYLON {
          */
         getRenderingCanvas(): Nullable<HTMLCanvasElement>;
         /**
+         * Gets host window
+         */
+        getHostWindow(): Window;
+        /**
+         * Gets host document
+         */
+        getHostDocument(): Document;
+        /**
          * Gets the client rect of the HTML canvas attached with the current webGL context
          * @returns a client rectanglee
          */
@@ -31238,9 +31246,10 @@ declare module BABYLON {
         static IsEmpty(obj: any): boolean;
         /**
          * Function used to register events at window level
+         * @param windowElement defines the Window object to use
          * @param events defines the events to register
          */
-        static RegisterTopRootEvents(events: {
+        static RegisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;
@@ -31248,7 +31257,7 @@ declare module BABYLON {
          * Function used to unregister events from window level
          * @param events defines the events to unregister
          */
-        static UnregisterTopRootEvents(events: {
+        static UnregisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;

+ 11 - 2
dist/preview release/babylon.d.ts

@@ -30321,6 +30321,14 @@ declare module BABYLON {
          */
         getRenderingCanvas(): Nullable<HTMLCanvasElement>;
         /**
+         * Gets host window
+         */
+        getHostWindow(): Window;
+        /**
+         * Gets host document
+         */
+        getHostDocument(): Document;
+        /**
          * Gets the client rect of the HTML canvas attached with the current webGL context
          * @returns a client rectanglee
          */
@@ -31854,9 +31862,10 @@ declare module BABYLON {
         static IsEmpty(obj: any): boolean;
         /**
          * Function used to register events at window level
+         * @param windowElement defines the Window object to use
          * @param events defines the events to register
          */
-        static RegisterTopRootEvents(events: {
+        static RegisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;
@@ -31864,7 +31873,7 @@ declare module BABYLON {
          * Function used to unregister events from window level
          * @param events defines the events to unregister
          */
-        static UnregisterTopRootEvents(events: {
+        static UnregisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/preview release/babylon.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 124 - 96
dist/preview release/babylon.max.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/preview release/babylon.max.js.map


+ 22 - 4
dist/preview release/babylon.module.d.ts

@@ -31184,6 +31184,14 @@ declare module "babylonjs/Engines/engine" {
          */
         getRenderingCanvas(): Nullable<HTMLCanvasElement>;
         /**
+         * Gets host window
+         */
+        getHostWindow(): Window;
+        /**
+         * Gets host document
+         */
+        getHostDocument(): Document;
+        /**
          * Gets the client rect of the HTML canvas attached with the current webGL context
          * @returns a client rectanglee
          */
@@ -32728,9 +32736,10 @@ declare module "babylonjs/Misc/tools" {
         static IsEmpty(obj: any): boolean;
         /**
          * Function used to register events at window level
+         * @param windowElement defines the Window object to use
          * @param events defines the events to register
          */
-        static RegisterTopRootEvents(events: {
+        static RegisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;
@@ -32738,7 +32747,7 @@ declare module "babylonjs/Misc/tools" {
          * Function used to unregister events from window level
          * @param events defines the events to unregister
          */
-        static UnregisterTopRootEvents(events: {
+        static UnregisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;
@@ -94252,6 +94261,14 @@ declare module BABYLON {
          */
         getRenderingCanvas(): Nullable<HTMLCanvasElement>;
         /**
+         * Gets host window
+         */
+        getHostWindow(): Window;
+        /**
+         * Gets host document
+         */
+        getHostDocument(): Document;
+        /**
          * Gets the client rect of the HTML canvas attached with the current webGL context
          * @returns a client rectanglee
          */
@@ -95785,9 +95802,10 @@ declare module BABYLON {
         static IsEmpty(obj: any): boolean;
         /**
          * Function used to register events at window level
+         * @param windowElement defines the Window object to use
          * @param events defines the events to register
          */
-        static RegisterTopRootEvents(events: {
+        static RegisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;
@@ -95795,7 +95813,7 @@ declare module BABYLON {
          * Function used to unregister events from window level
          * @param events defines the events to unregister
          */
-        static UnregisterTopRootEvents(events: {
+        static UnregisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;

+ 11 - 2
dist/preview release/documentation.d.ts

@@ -30321,6 +30321,14 @@ declare module BABYLON {
          */
         getRenderingCanvas(): Nullable<HTMLCanvasElement>;
         /**
+         * Gets host window
+         */
+        getHostWindow(): Window;
+        /**
+         * Gets host document
+         */
+        getHostDocument(): Document;
+        /**
          * Gets the client rect of the HTML canvas attached with the current webGL context
          * @returns a client rectanglee
          */
@@ -31854,9 +31862,10 @@ declare module BABYLON {
         static IsEmpty(obj: any): boolean;
         /**
          * Function used to register events at window level
+         * @param windowElement defines the Window object to use
          * @param events defines the events to register
          */
-        static RegisterTopRootEvents(events: {
+        static RegisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;
@@ -31864,7 +31873,7 @@ declare module BABYLON {
          * Function used to unregister events from window level
          * @param events defines the events to unregister
          */
-        static UnregisterTopRootEvents(events: {
+        static UnregisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;

+ 22 - 4
dist/preview release/viewer/babylon.module.d.ts

@@ -31184,6 +31184,14 @@ declare module "babylonjs/Engines/engine" {
          */
         getRenderingCanvas(): Nullable<HTMLCanvasElement>;
         /**
+         * Gets host window
+         */
+        getHostWindow(): Window;
+        /**
+         * Gets host document
+         */
+        getHostDocument(): Document;
+        /**
          * Gets the client rect of the HTML canvas attached with the current webGL context
          * @returns a client rectanglee
          */
@@ -32728,9 +32736,10 @@ declare module "babylonjs/Misc/tools" {
         static IsEmpty(obj: any): boolean;
         /**
          * Function used to register events at window level
+         * @param windowElement defines the Window object to use
          * @param events defines the events to register
          */
-        static RegisterTopRootEvents(events: {
+        static RegisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;
@@ -32738,7 +32747,7 @@ declare module "babylonjs/Misc/tools" {
          * Function used to unregister events from window level
          * @param events defines the events to unregister
          */
-        static UnregisterTopRootEvents(events: {
+        static UnregisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;
@@ -94252,6 +94261,14 @@ declare module BABYLON {
          */
         getRenderingCanvas(): Nullable<HTMLCanvasElement>;
         /**
+         * Gets host window
+         */
+        getHostWindow(): Window;
+        /**
+         * Gets host document
+         */
+        getHostDocument(): Document;
+        /**
          * Gets the client rect of the HTML canvas attached with the current webGL context
          * @returns a client rectanglee
          */
@@ -95785,9 +95802,10 @@ declare module BABYLON {
         static IsEmpty(obj: any): boolean;
         /**
          * Function used to register events at window level
+         * @param windowElement defines the Window object to use
          * @param events defines the events to register
          */
-        static RegisterTopRootEvents(events: {
+        static RegisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;
@@ -95795,7 +95813,7 @@ declare module BABYLON {
          * Function used to unregister events from window level
          * @param events defines the events to unregister
          */
-        static UnregisterTopRootEvents(events: {
+        static UnregisterTopRootEvents(windowElement: Window, events: {
             name: string;
             handler: Nullable<(e: FocusEvent) => any>;
         }[]): void;

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 16 - 16
dist/preview release/viewer/babylon.viewer.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 1 - 1
src/Cameras/Inputs/BaseCameraPointersInput.ts

@@ -239,7 +239,7 @@ export abstract class BaseCameraPointersInput implements ICameraInput<Camera> {
      */
     public detachControl(element: Nullable<HTMLElement>): void {
         if (this._onLostFocus) {
-            Tools.UnregisterTopRootEvents(this.camera.getScene().getEngine().getHostWindow(),[
+            Tools.UnregisterTopRootEvents(this.camera.getScene().getEngine().getHostWindow(), [
                 { name: "blur", handler: this._onLostFocus }
             ]);
         }

+ 2 - 2
src/Cameras/Inputs/freeCameraDeviceOrientationInput.ts

@@ -117,12 +117,12 @@ export class FreeCameraDeviceOrientationInput implements ICameraInput<FreeCamera
      * @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 {
-        
+
         let hostWindow = this.camera.getScene().getEngine().getHostWindow();
 
         hostWindow.addEventListener("orientationchange", this._orientationChanged);
         hostWindow.addEventListener("deviceorientation", this._deviceOrientation);
-        
+
         //In certain cases, the attach control is called AFTER orientation was changed,
         //So this is needed.
         this._orientationChanged();

+ 1 - 1
src/Cameras/VR/webVRCamera.ts

@@ -508,7 +508,7 @@ export class WebVRFreeCamera extends FreeCamera implements PoseControlled {
         if (this._vrDevice) {
             this.getEngine().enableVR();
         }
-        
+
         let hostWindow = this._scene.getEngine().getHostWindow();
         hostWindow.addEventListener('vrdisplaypresentchange', this._detachIfAttached);
     }

+ 2 - 2
src/Engines/Extensions/engine.webVR.ts

@@ -244,9 +244,9 @@ Engine.prototype._connectVREvents = function(canvas: HTMLCanvasElement, document
         document.exitPointerLock();
     };
 
-    if (DomManagement.IsWindowObjectExist()) {        
+    if (DomManagement.IsWindowObjectExist()) {
         let hostWindow = this.getHostWindow();
-        
+
         hostWindow.addEventListener('vrdisplaypointerrestricted', this._onVRDisplayPointerRestricted, false);
         hostWindow.addEventListener('vrdisplaypointerunrestricted', this._onVRDisplayPointerUnrestricted, false);
     }

+ 1 - 1
src/Gamepads/gamepadManager.ts

@@ -101,7 +101,7 @@ export class GamepadManager {
                 this._startMonitoringGamepads();
             }
             // Checking if the gamepad connected event is supported (like in Firefox)
-            if (this._gamepadEventSupported) {                  
+            if (this._gamepadEventSupported) {
                 let hostWindow = this._scene!.getEngine().getHostWindow();
 
                 hostWindow.addEventListener('gamepadconnected', this._onGamepadConnectedEvent, false);

+ 2 - 0
src/Rendering/depthRenderer.ts

@@ -97,6 +97,8 @@ export class DepthRenderer {
             var engine = scene.getEngine();
             let material = subMesh.getMaterial();
 
+            mesh._internalAbstractMeshDataInfo._isActiveIntermediate = false;
+
             if (!material) {
                 return;
             }