Przeglądaj źródła

Merge pull request #7720 from BabylonJS/master

4.1.0-rc.8
mergify[bot] 5 lat temu
rodzic
commit
5134a4aede

Plik diff jest za duży
+ 65 - 0
Playground/textures/PBR_PACK_1_texurePackage.json


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

@@ -44342,9 +44342,10 @@ declare module BABYLON {
         private _renderCamera;
         /**
          * Gets the camera that is used to render the utility layer (when not set, this will be the last active camera)
+         * @param getRigParentIfPossible if the current active camera is a rig camera, should its parent camera be returned
          * @returns the camera that is used when rendering the utility layer
          */
-        getRenderCamera(): Camera;
+        getRenderCamera(getRigParentIfPossible?: boolean): Camera;
         /**
          * Sets the camera that should be used when rendering the utility layer (If set to null the last active camera will be used)
          * @param cam the camera that should be used when rendering the utility layer

Plik diff jest za duży
+ 1 - 1
dist/preview release/babylon.js


Plik diff jest za duży
+ 57 - 53
dist/preview release/babylon.max.js


Plik diff jest za duży
+ 1 - 1
dist/preview release/babylon.max.js.map


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

@@ -45897,9 +45897,10 @@ declare module "babylonjs/Rendering/utilityLayerRenderer" {
         private _renderCamera;
         /**
          * Gets the camera that is used to render the utility layer (when not set, this will be the last active camera)
+         * @param getRigParentIfPossible if the current active camera is a rig camera, should its parent camera be returned
          * @returns the camera that is used when rendering the utility layer
          */
-        getRenderCamera(): Camera;
+        getRenderCamera(getRigParentIfPossible?: boolean): Camera;
         /**
          * Sets the camera that should be used when rendering the utility layer (If set to null the last active camera will be used)
          * @param cam the camera that should be used when rendering the utility layer
@@ -117614,9 +117615,10 @@ declare module BABYLON {
         private _renderCamera;
         /**
          * Gets the camera that is used to render the utility layer (when not set, this will be the last active camera)
+         * @param getRigParentIfPossible if the current active camera is a rig camera, should its parent camera be returned
          * @returns the camera that is used when rendering the utility layer
          */
-        getRenderCamera(): Camera;
+        getRenderCamera(getRigParentIfPossible?: boolean): Camera;
         /**
          * Sets the camera that should be used when rendering the utility layer (If set to null the last active camera will be used)
          * @param cam the camera that should be used when rendering the utility layer

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

@@ -44342,9 +44342,10 @@ declare module BABYLON {
         private _renderCamera;
         /**
          * Gets the camera that is used to render the utility layer (when not set, this will be the last active camera)
+         * @param getRigParentIfPossible if the current active camera is a rig camera, should its parent camera be returned
          * @returns the camera that is used when rendering the utility layer
          */
-        getRenderCamera(): Camera;
+        getRenderCamera(getRigParentIfPossible?: boolean): Camera;
         /**
          * Sets the camera that should be used when rendering the utility layer (If set to null the last active camera will be used)
          * @param cam the camera that should be used when rendering the utility layer

+ 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.1.0-rc.7",
+    "version": "4.1.0-rc.8",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 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.1.0-rc.7",
+    "version": "4.1.0-rc.8",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-rc.7"
+        "babylonjs": "4.1.0-rc.8"
     },
     "engines": {
         "node": "*"

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "4.1.0-rc.7",
+    "version": "4.1.0-rc.8",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -29,12 +29,12 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-rc.7",
-        "babylonjs-gui": "4.1.0-rc.7",
-        "babylonjs-loaders": "4.1.0-rc.7",
-        "babylonjs-materials": "4.1.0-rc.7",
-        "babylonjs-serializers": "4.1.0-rc.7",
-        "babylonjs-gltf2interface": "4.1.0-rc.7"
+        "babylonjs": "4.1.0-rc.8",
+        "babylonjs-gui": "4.1.0-rc.8",
+        "babylonjs-loaders": "4.1.0-rc.8",
+        "babylonjs-materials": "4.1.0-rc.8",
+        "babylonjs-serializers": "4.1.0-rc.8",
+        "babylonjs-gltf2interface": "4.1.0-rc.8"
     },
     "devDependencies": {
         "@types/react": "~16.7.3",

+ 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.1.0-rc.7",
+    "version": "4.1.0-rc.8",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,8 +28,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "4.1.0-rc.7",
-        "babylonjs": "4.1.0-rc.7"
+        "babylonjs-gltf2interface": "4.1.0-rc.8",
+        "babylonjs": "4.1.0-rc.8"
     },
     "engines": {
         "node": "*"

+ 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.1.0-rc.7",
+    "version": "4.1.0-rc.8",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-rc.7"
+        "babylonjs": "4.1.0-rc.8"
     },
     "engines": {
         "node": "*"

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

@@ -4,14 +4,14 @@
     },
     "name": "babylonjs-node-editor",
     "description": "The Babylon.js node material editor.",
-    "version": "4.1.0-rc.7",
+    "version": "4.1.0-rc.8",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
     },
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-rc.7"
+        "babylonjs": "4.1.0-rc.8"
     },
     "files": [
         "babylon.nodeEditor.max.js.map",

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

@@ -7,7 +7,7 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "4.1.0-rc.7",
+    "version": "4.1.0-rc.8",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 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.1.0-rc.7",
+    "version": "4.1.0-rc.8",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-rc.7"
+        "babylonjs": "4.1.0-rc.8"
     },
     "engines": {
         "node": "*"

+ 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.1.0-rc.7",
+    "version": "4.1.0-rc.8",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-rc.7"
+        "babylonjs": "4.1.0-rc.8"
     },
     "engines": {
         "node": "*"

+ 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.1.0-rc.7",
+    "version": "4.1.0-rc.8",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,8 +28,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-rc.7",
-        "babylonjs-gltf2interface": "4.1.0-rc.7"
+        "babylonjs": "4.1.0-rc.8",
+        "babylonjs-gltf2interface": "4.1.0-rc.8"
     },
     "engines": {
         "node": "*"

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

@@ -45897,9 +45897,10 @@ declare module "babylonjs/Rendering/utilityLayerRenderer" {
         private _renderCamera;
         /**
          * Gets the camera that is used to render the utility layer (when not set, this will be the last active camera)
+         * @param getRigParentIfPossible if the current active camera is a rig camera, should its parent camera be returned
          * @returns the camera that is used when rendering the utility layer
          */
-        getRenderCamera(): Camera;
+        getRenderCamera(getRigParentIfPossible?: boolean): Camera;
         /**
          * Sets the camera that should be used when rendering the utility layer (If set to null the last active camera will be used)
          * @param cam the camera that should be used when rendering the utility layer
@@ -117614,9 +117615,10 @@ declare module BABYLON {
         private _renderCamera;
         /**
          * Gets the camera that is used to render the utility layer (when not set, this will be the last active camera)
+         * @param getRigParentIfPossible if the current active camera is a rig camera, should its parent camera be returned
          * @returns the camera that is used when rendering the utility layer
          */
-        getRenderCamera(): Camera;
+        getRenderCamera(getRigParentIfPossible?: boolean): Camera;
         /**
          * Sets the camera that should be used when rendering the utility layer (If set to null the last active camera will be used)
          * @param cam the camera that should be used when rendering the utility layer

Plik diff jest za duży
+ 5 - 5
dist/preview release/viewer/babylon.viewer.js


Plik diff jest za duży
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


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

@@ -3,19 +3,17 @@
 ## Major updates
 
 - Node Material and Node material editor [Doc](https://doc.babylonjs.com/how_to/node_material) ([Deltakosh](https://github.com/deltakosh/) / [TrevorDev](https://github.com/TrevorDev))
-- WebGPU support [Doc](https://doc.babylonjs.com/extensions/webgpu) ([Sebavan](https://github.com/sebavan/))
+- WebGPU preliminary support [Doc](https://doc.babylonjs.com/extensions/webgpu) ([Sebavan](https://github.com/sebavan/))
+- Added the "Cascaded Shadow Mapping" (CSM) shadow rendering technique ([Popov72](https://github.com/Popov72) (initiated by [lockphase](https://github.com/lockphase/)))
 - .basis texture file format support [Doc](https://doc.babylonjs.com/resources/multi-platform_compressed_textures#basis-file-format) ([TrevorDev](https://github.com/TrevorDev))
-- WIP: Recast navigation mesh and crowd of moving agents [Demo](https://www.babylonjs-playground.com/#AJTRIL) ([CedricGuillemet](https://github.com/CedricGuillemet))
-- Added Points Cloud Particle System ([JohnK](https://github.com/BabylonJSGuide/))
+- Recast navigation mesh and crowd of moving agents [Demo](https://www.babylonjs-playground.com/#AJTRIL) ([CedricGuillemet](https://github.com/CedricGuillemet))
+- Added Points Cloud Particle System [Doc](https://doc.babylonjs.com/how_to/point_cloud_particles) ([JohnK](https://github.com/BabylonJSGuide/))
 - Classes decoupling ending up with smaller bundle sizes [Blog](https://medium.com/@babylonjs/size-matters-e0e94dad01a7) ([Deltakosh](https://github.com/deltakosh/))
 - Babylon.js controls [Doc](https://doc.babylonjs.com/features/controls) ([Sebavan](https://github.com/sebavan/) / [Deltakosh](https://github.com/deltakosh/))
-- WebXR updates:
-  - WebXR updated to spec as of July 10th ([TrevorDev](https://github.com/TrevorDev))
-  - WebXR webVR parity helpers (Vive, WMR, Oculus Rift) ([TrevorDev](https://github.com/TrevorDev))
+- Massive WebXR updates (See below) ([RaananW](https://github.com/RaananW/) / [TrevorDev](https://github.com/TrevorDev))
 - Added support for Offscreen canvas [Doc](https://doc.babylonjs.com/how_to/using_offscreen_canvas) ([Deltakosh](https://github.com/deltakosh/)
 - Added support for multiple canvases with one engine [Doc](https://doc.babylonjs.com/how_to/multi_canvases) ([Deltakosh](https://github.com/deltakosh/)
 - Added useReverseDepthBuffer to Engine which can provide greater z depth for distant objects without the cost of a logarithmic depth buffer ([BenAdams](https://github.com/benaadams/))
-- Added the "Cascaded Shadow Mapping" (CSM) shadow rendering technique ([Popov72](https://github.com/Popov72) (initiated by [lockphase](https://github.com/lockphase/)))
 - Screen space reflections post-process [Doc](https://doc.babylonjs.com/how_to/using_screenspacereflectionspostprocess) ([julien-moreau](https://github.com/julien-moreau))
 
 ## Updates
@@ -186,6 +184,7 @@
 
 ### WebXR / WebVR
 
+- WebXR webVR parity helpers (Vive, WMR, Oculus Rift) ([TrevorDev](https://github.com/TrevorDev))
 - Compliance with the mozilla WebXR emulator for chrome and firefox ([RaananW](https://github.com/RaananW/))
 - Use the same icon as in VR ([RaananW](https://github.com/RaananW/))
 - Gamepad object is now exposed in the WebXRController class ([RaananW](https://github.com/RaananW/))

+ 1 - 1
package.json

@@ -7,7 +7,7 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "4.1.0-rc.7",
+    "version": "4.1.0-rc.8",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 2 - 2
src/Engines/thinEngine.ts

@@ -132,14 +132,14 @@ export class ThinEngine {
      */
     // Not mixed with Version for tooling purpose.
     public static get NpmPackage(): string {
-        return "babylonjs@4.1.0-rc.7";
+        return "babylonjs@4.1.0-rc.8";
     }
 
     /**
      * Returns the current version of the framework
      */
     public static get Version(): string {
-        return "4.1.0-rc.7";
+        return "4.1.0-rc.8";
     }
 
     /**

+ 9 - 4
src/Rendering/utilityLayerRenderer.ts

@@ -24,9 +24,10 @@ export class UtilityLayerRenderer implements IDisposable {
 
     /**
      * Gets the camera that is used to render the utility layer (when not set, this will be the last active camera)
+     * @param getRigParentIfPossible if the current active camera is a rig camera, should its parent camera be returned
      * @returns the camera that is used when rendering the utility layer
      */
-    public getRenderCamera() {
+    public getRenderCamera(getRigParentIfPossible?: boolean) {
         if (this._renderCamera) {
             return this._renderCamera;
         } else {
@@ -36,7 +37,11 @@ export class UtilityLayerRenderer implements IDisposable {
             } else {
                 activeCam = <Camera>(this.originalScene.activeCamera!);
             }
-            return (activeCam && activeCam.isRigCamera) ? activeCam.rigParent! : activeCam;
+
+            if (getRigParentIfPossible && activeCam.isRigCamera) {
+                return activeCam.rigParent!;
+            }
+            return activeCam;
         }
     }
     /**
@@ -313,7 +318,7 @@ export class UtilityLayerRenderer implements IDisposable {
     }
 
     private _updateCamera() {
-        this.utilityLayerScene.cameraToUseForPointers = this.getRenderCamera();
-        this.utilityLayerScene.activeCamera = this.getRenderCamera();
+        this.utilityLayerScene.cameraToUseForPointers = this.getRenderCamera(true);
+        this.utilityLayerScene.activeCamera = this.getRenderCamera(true);
     }
 }