David Catuhe 5 gadi atpakaļ
vecāks
revīzija
78e72971ce

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


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
+ 495 - 165
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


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1565 - 1436
dist/preview release/babylon.module.d.ts


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1191 - 1129
dist/preview release/documentation.d.ts


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


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


+ 5 - 2
dist/preview release/nodeEditor/babylon.nodeEditor.max.js

@@ -68371,11 +68371,14 @@ __webpack_require__.r(__webpack_exports__);
 
 
 
+
 var BlockTools = /** @class */ (function () {
     function BlockTools() {
     }
     BlockTools.GetBlockFromString = function (data, scene, nodeMaterial) {
         switch (data) {
+            case "DesaturateBlock":
+                return new babylonjs_Materials_Node_Blocks_Fragment_discardBlock__WEBPACK_IMPORTED_MODULE_0__["DesaturateBlock"]("Desaturate");
             case "RefractBlock":
                 return new babylonjs_Materials_Node_Blocks_Fragment_discardBlock__WEBPACK_IMPORTED_MODULE_0__["RefractBlock"]("Refract");
             case "ReflectBlock":
@@ -72048,7 +72051,7 @@ var NodeListComponent = /** @class */ (function (_super) {
         var allBlocks = {
             Animation: ["BonesBlock", "MorphTargetsBlock"],
             Basic_Math: ["AddBlock", "DivideBlock", "MultiplyBlock", "ScaleBlock", "SubtractBlock", "OneMinusBlock", "MaxBlock", "MinBlock", "LengthBlock", "DistanceBlock", "NegateBlock", "RandomNumberBlock", "ReciprocalBlock"],
-            Color_Management: ["ReplaceColorBlock", "PosterizeBlock", "GradientBlock"],
+            Color_Management: ["ReplaceColorBlock", "PosterizeBlock", "GradientBlock", "DesaturateBlock"],
             Conversion_Blocks: ["ColorMergerBlock", "ColorSplitterBlock", "VectorMergerBlock", "VectorSplitterBlock"],
             Inputs: ["Float", "Vector2", "Vector3", "Vector4", "Color3", "Color4", "TextureBlock", "ReflectionTextureBlock", "TimeBlock", "DeltaTimeBlock"],
             Interpolation: ["LerpBlock", "StepBlock", "SmoothStepBlock", "NLerpBlock"],
@@ -72072,7 +72075,7 @@ var NodeListComponent = /** @class */ (function (_super) {
                 return react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sharedComponents_draggableLineComponent__WEBPACK_IMPORTED_MODULE_3__["DraggableLineComponent"], { key: block, data: block, tooltip: tooltip });
             });
             if (blockList.length) {
-                blockMenu.push(react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__["LineContainerComponent"], { key: key + " blocks", title: key.replace("_", " "), closed: false }, blockList));
+                blockMenu.push(react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__["LineContainerComponent"], { key: key + " blocks", title: key.replace("__", ":").replace("_", " "), closed: false }, blockList));
             }
         }
         return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { id: "nodeList" },

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


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 3 - 2
dist/preview release/nodeEditor/babylon.nodeEditor.module.d.ts


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1565 - 1436
dist/preview release/viewer/babylon.module.d.ts


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 15 - 11
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


+ 4 - 2
src/Cameras/VR/vrExperienceHelper.ts

@@ -91,7 +91,9 @@ export interface VRExperienceHelperOptions extends WebVROptions {
      * Distortion metrics for the fallback vrDeviceOrientationCamera (default: VRCameraMetrics.Default)
      */
     vrDeviceOrientationCameraMetrics?: VRCameraMetrics;
-
+    /**
+     * Defines if WebXR should be used instead of WebVR (if available)
+     */
     useXR?: boolean;
 }
 
@@ -771,7 +773,7 @@ export class VRExperienceHelper {
 
         if (this.webVROptions.useXR && (navigator as any).xr) {
             // force-check XR session support
-            WebXRSessionManager.IsSessionSupported("immersive-vr").then((supported) => {
+            WebXRSessionManager.IsSessionSupportedAsync("immersive-vr").then((supported) => {
                 if (supported) {
                     Logger.Log("Using WebXR. It is recommended to use the WebXRDefaultExperience directly");
                     // it is possible to use XR, let's do it!

+ 7 - 2
src/Cameras/XR/webXRSessionManager.ts

@@ -208,7 +208,7 @@ export class WebXRSessionManager implements IDisposable {
      * @returns true if supported
      */
     public supportsSessionAsync(sessionMode: XRSessionMode) {
-        return WebXRSessionManager.IsSessionSupported(sessionMode);
+        return WebXRSessionManager.IsSessionSupportedAsync(sessionMode);
     }
 
     /**
@@ -257,7 +257,12 @@ export class WebXRSessionManager implements IDisposable {
         this.onXRSessionEnded.clear();
     }
 
-    public static IsSessionSupported(sessionMode: XRSessionMode): Promise<boolean> {
+    /**
+     * Gets a promise returning true when fullfiled if the given session mode is supported
+     * @param sessionMode defines the session to test
+     * @returns a promise
+     */
+    public static IsSessionSupportedAsync(sessionMode: XRSessionMode): Promise<boolean> {
         if (!(navigator as any).xr) {
             return Promise.resolve(false);
         }

+ 1 - 1
src/Materials/Node/Blocks/colorMergerBlock.ts

@@ -20,7 +20,7 @@ export class ColorMergerBlock extends NodeMaterialBlock {
         this.registerInput("r", NodeMaterialBlockConnectionPointTypes.Float, true);
         this.registerInput("g", NodeMaterialBlockConnectionPointTypes.Float, true);
         this.registerInput("b", NodeMaterialBlockConnectionPointTypes.Float, true);
-        this.registerInput("a", NodeMaterialBlockConnectionPointTypes.Float, true);  
+        this.registerInput("a", NodeMaterialBlockConnectionPointTypes.Float, true);
 
         this.registerOutput("rgba", NodeMaterialBlockConnectionPointTypes.Color4);
         this.registerOutput("rgb", NodeMaterialBlockConnectionPointTypes.Color3);

+ 2 - 2
src/Materials/Node/Blocks/desaturateBlock.ts

@@ -56,8 +56,8 @@ export class DesaturateBlock extends NodeMaterialBlock {
         let color = this.color;
         let colorName = color.associatedVariableName;
         let tempMin = state._getFreeVariableName("colorMin");
-        let tempMax= state._getFreeVariableName("colorMax");
-        let tempMerge= state._getFreeVariableName("colorMerge");
+        let tempMax = state._getFreeVariableName("colorMax");
+        let tempMerge = state._getFreeVariableName("colorMerge");
 
         state.compilationString += `float ${tempMin} = min(min(${colorName}.x, ${colorName}.y), ${colorName}.z);\r\n`;
         state.compilationString += `float ${tempMax} = max(max(${colorName}.x, ${colorName}.y), ${colorName}.z);\r\n`;

+ 5 - 5
src/Materials/Node/Blocks/vectorMergerBlock.ts

@@ -34,7 +34,7 @@ export class VectorMergerBlock extends NodeMaterialBlock {
      */
     public getClassName() {
         return "VectorMergerBlock";
-    } 
+    }
 
     /**
      * Gets the xyz component (input)
@@ -42,13 +42,13 @@ export class VectorMergerBlock extends NodeMaterialBlock {
     public get xyzIn(): NodeMaterialConnectionPoint {
         return this._inputs[0];
     }
-    
+
     /**
      * Gets the xy component (input)
      */
     public get xyIn(): NodeMaterialConnectionPoint {
         return this._inputs[1];
-    }     
+    }
 
     /**
      * Gets the x component (input)
@@ -113,7 +113,7 @@ export class VectorMergerBlock extends NodeMaterialBlock {
         let v3Output = this._outputs[1];
         let v2Output = this._outputs[2];
 
-        if (xyInput.isConnected) {            
+        if (xyInput.isConnected) {
             if (v4Output.hasEndpoints) {
                 state.compilationString += this._declareOutput(v4Output, state) + ` = vec4(${xyInput.associatedVariableName}, ${zInput.isConnected ? this._writeVariable(zInput) : "0.0"}, ${wInput.isConnected ? this._writeVariable(wInput) : "0.0"});\r\n`;
             } else if (v3Output.hasEndpoints) {
@@ -128,7 +128,7 @@ export class VectorMergerBlock extends NodeMaterialBlock {
                 state.compilationString += this._declareOutput(v3Output, state) + ` = ${xyzInput.associatedVariableName};\r\n`;
             } else if (v2Output.hasEndpoints) {
                 state.compilationString += this._declareOutput(v2Output, state) + ` = ${xyzInput.associatedVariableName}.xy;\r\n`;
-            }            
+            }
         } else {
             if (v4Output.hasEndpoints) {
                 state.compilationString += this._declareOutput(v4Output, state) + ` = vec4(${xInput.isConnected ? this._writeVariable(xInput) : "0.0"}, ${yInput.isConnected ? this._writeVariable(yInput) : "0.0"}, ${zInput.isConnected ? this._writeVariable(zInput) : "0.0"}, ${wInput.isConnected ? this._writeVariable(wInput) : "0.0"});\r\n`;