David Catuhe 5 vuotta sitten
vanhempi
commit
6c6ae1ecf4

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

@@ -58002,6 +58002,10 @@ declare module BABYLON {
          */
          */
         get worldNormal(): NodeMaterialConnectionPoint;
         get worldNormal(): NodeMaterialConnectionPoint;
         /**
         /**
+         * Gets the world tangent input component
+         */
+        get worldTangent(): NodeMaterialConnectionPoint;
+        /**
          * Gets the uv input component
          * Gets the uv input component
          */
          */
         get uv(): NodeMaterialConnectionPoint;
         get uv(): NodeMaterialConnectionPoint;

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/babylon.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 32 - 13
dist/preview release/babylon.max.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/babylon.max.js.map


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

@@ -60741,6 +60741,10 @@ declare module "babylonjs/Materials/Node/Blocks/Fragment/perturbNormalBlock" {
          */
          */
         get worldNormal(): NodeMaterialConnectionPoint;
         get worldNormal(): NodeMaterialConnectionPoint;
         /**
         /**
+         * Gets the world tangent input component
+         */
+        get worldTangent(): NodeMaterialConnectionPoint;
+        /**
          * Gets the uv input component
          * Gets the uv input component
          */
          */
         get uv(): NodeMaterialConnectionPoint;
         get uv(): NodeMaterialConnectionPoint;
@@ -130828,6 +130832,10 @@ declare module BABYLON {
          */
          */
         get worldNormal(): NodeMaterialConnectionPoint;
         get worldNormal(): NodeMaterialConnectionPoint;
         /**
         /**
+         * Gets the world tangent input component
+         */
+        get worldTangent(): NodeMaterialConnectionPoint;
+        /**
          * Gets the uv input component
          * Gets the uv input component
          */
          */
         get uv(): NodeMaterialConnectionPoint;
         get uv(): NodeMaterialConnectionPoint;

+ 4 - 0
dist/preview release/documentation.d.ts

@@ -58002,6 +58002,10 @@ declare module BABYLON {
          */
          */
         get worldNormal(): NodeMaterialConnectionPoint;
         get worldNormal(): NodeMaterialConnectionPoint;
         /**
         /**
+         * Gets the world tangent input component
+         */
+        get worldTangent(): NodeMaterialConnectionPoint;
+        /**
          * Gets the uv input component
          * Gets the uv input component
          */
          */
         get uv(): NodeMaterialConnectionPoint;
         get uv(): NodeMaterialConnectionPoint;

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js


+ 2 - 0
dist/preview release/inspector/babylon.inspector.bundle.max.js

@@ -46550,6 +46550,8 @@ var MeshPropertyGridComponent = /** @class */ (function (_super) {
                 react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__["CheckBoxLineComponent"], { label: "Receive shadows", target: mesh, propertyName: "receiveShadows", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
                 react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__["CheckBoxLineComponent"], { label: "Receive shadows", target: mesh, propertyName: "receiveShadows", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
                 mesh.isVerticesDataPresent(babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].ColorKind) &&
                 mesh.isVerticesDataPresent(babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].ColorKind) &&
                     react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__["CheckBoxLineComponent"], { label: "Use vertex colors", target: mesh, propertyName: "useVertexColors", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
                     react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__["CheckBoxLineComponent"], { label: "Use vertex colors", target: mesh, propertyName: "useVertexColors", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
+                mesh.isVerticesDataPresent(babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_2__["VertexBuffer"].ColorKind) &&
+                    react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__["CheckBoxLineComponent"], { label: "Has vertex alpha", target: mesh, propertyName: "hasVertexAlpha", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
                 scene.fogMode !== babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_2__["Scene"].FOGMODE_NONE &&
                 scene.fogMode !== babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_2__["Scene"].FOGMODE_NONE &&
                     react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__["CheckBoxLineComponent"], { label: "Apply fog", target: mesh, propertyName: "applyFog", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
                     react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__["CheckBoxLineComponent"], { label: "Apply fog", target: mesh, propertyName: "applyFog", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
                 !mesh.parent &&
                 !mesh.parent &&

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.max.js.map


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 3 - 3
dist/preview release/nodeEditor/babylon.nodeEditor.js


+ 18 - 1
dist/preview release/nodeEditor/babylon.nodeEditor.max.js

@@ -51536,6 +51536,22 @@ var BlockTools = /** @class */ (function () {
                 worldMatrixBlock.connectTo(transformBlock);
                 worldMatrixBlock.connectTo(transformBlock);
                 return transformBlock;
                 return transformBlock;
             }
             }
+            case "WorldTangentBlock": {
+                var worldTangentBlock = nodeMaterial.getInputBlockByPredicate(function (b) { return b.isAttribute && b.name === "tangent"; });
+                if (!worldTangentBlock) {
+                    worldTangentBlock = new babylonjs_Materials_Node_Blocks_Fragment_discardBlock__WEBPACK_IMPORTED_MODULE_0__["InputBlock"]("tangent");
+                    worldTangentBlock.setAsAttribute("tangent");
+                }
+                var worldMatrixBlock = nodeMaterial.getInputBlockByPredicate(function (b) { return b.isSystemValue && b.systemValue === babylonjs_Materials_Node_Blocks_Fragment_discardBlock__WEBPACK_IMPORTED_MODULE_0__["NodeMaterialSystemValues"].World; });
+                if (!worldMatrixBlock) {
+                    worldMatrixBlock = new babylonjs_Materials_Node_Blocks_Fragment_discardBlock__WEBPACK_IMPORTED_MODULE_0__["InputBlock"]("World");
+                    worldMatrixBlock.setAsSystemValue(babylonjs_Materials_Node_Blocks_Fragment_discardBlock__WEBPACK_IMPORTED_MODULE_0__["NodeMaterialSystemValues"].World);
+                }
+                var transformBlock = new babylonjs_Materials_Node_Blocks_Fragment_discardBlock__WEBPACK_IMPORTED_MODULE_0__["TransformBlock"]("World tangent");
+                worldTangentBlock.connectTo(transformBlock);
+                worldMatrixBlock.connectTo(transformBlock);
+                return transformBlock;
+            }
         }
         }
         return null;
         return null;
     };
     };
@@ -51776,7 +51792,7 @@ var NodeListComponent = /** @class */ (function (_super) {
             Math__Scientific: ["AbsBlock", "ArcCosBlock", "ArcSinBlock", "ArcTanBlock", "ArcTan2Block", "CosBlock", "DegreesToRadiansBlock", "ExpBlock", "Exp2Block", "FractBlock", "LogBlock", "PowBlock", "RadiansToDegreesBlock", "SawToothWaveBlock", "SinBlock", "SquareWaveBlock", "TanBlock", "TriangleWaveBlock"],
             Math__Scientific: ["AbsBlock", "ArcCosBlock", "ArcSinBlock", "ArcTanBlock", "ArcTan2Block", "CosBlock", "DegreesToRadiansBlock", "ExpBlock", "Exp2Block", "FractBlock", "LogBlock", "PowBlock", "RadiansToDegreesBlock", "SawToothWaveBlock", "SinBlock", "SquareWaveBlock", "TanBlock", "TriangleWaveBlock"],
             Math__Vector: ["CrossBlock", "DerivativeBlock", "DistanceBlock", "DotBlock", "FresnelBlock", "LengthBlock", "ReflectBlock", "RefractBlock", "Rotate2dBlock", "TransformBlock",],
             Math__Vector: ["CrossBlock", "DerivativeBlock", "DistanceBlock", "DotBlock", "FresnelBlock", "LengthBlock", "ReflectBlock", "RefractBlock", "Rotate2dBlock", "TransformBlock",],
             Matrices: ["Matrix", "WorldMatrixBlock", "WorldViewMatrixBlock", "WorldViewProjectionMatrixBlock", "ViewMatrixBlock", "ViewProjectionMatrixBlock", "ProjectionMatrixBlock"],
             Matrices: ["Matrix", "WorldMatrixBlock", "WorldViewMatrixBlock", "WorldViewProjectionMatrixBlock", "ViewMatrixBlock", "ViewProjectionMatrixBlock", "ProjectionMatrixBlock"],
-            Mesh: ["InstancesBlock", "PositionBlock", "UVBlock", "ColorBlock", "NormalBlock", "PerturbNormalBlock", "NormalBlendBlock", "TangentBlock", "MatrixIndicesBlock", "MatrixWeightsBlock", "WorldPositionBlock", "WorldNormalBlock", "FrontFacingBlock"],
+            Mesh: ["InstancesBlock", "PositionBlock", "UVBlock", "ColorBlock", "NormalBlock", "PerturbNormalBlock", "NormalBlendBlock", "TangentBlock", "MatrixIndicesBlock", "MatrixWeightsBlock", "WorldPositionBlock", "WorldNormalBlock", "WorldTangentBlock", "FrontFacingBlock"],
             Noises: ["RandomNumberBlock", "SimplexPerlin3DBlock", "WorleyNoise3DBlock"],
             Noises: ["RandomNumberBlock", "SimplexPerlin3DBlock", "WorleyNoise3DBlock"],
             Output_Blocks: ["VertexOutputBlock", "FragmentOutputBlock", "DiscardBlock"],
             Output_Blocks: ["VertexOutputBlock", "FragmentOutputBlock", "DiscardBlock"],
             Range: ["ClampBlock", "RemapBlock", "NormalizeBlock"],
             Range: ["ClampBlock", "RemapBlock", "NormalizeBlock"],
@@ -51854,6 +51870,7 @@ var NodeListComponent = /** @class */ (function (_super) {
         "TangentBlock": "A Vector3 representing the tangent of each vertex of the attached mesh",
         "TangentBlock": "A Vector3 representing the tangent of each vertex of the attached mesh",
         "UVBlock": "A Vector2 representing the UV coordinates of each vertex of the attached mesh",
         "UVBlock": "A Vector2 representing the UV coordinates of each vertex of the attached mesh",
         "WorldNormal": "A Vector4 representing the normal of each vertex of the attached mesh transformed into world space",
         "WorldNormal": "A Vector4 representing the normal of each vertex of the attached mesh transformed into world space",
+        "WorldTangent": "A Vector4 representing the tangent of each vertex of the attached mesh transformed into world space",
         "PerturbNormalBlock": "Creates high-frequency detail normal vectors based on a normal map, the world position, and world normal",
         "PerturbNormalBlock": "Creates high-frequency detail normal vectors based on a normal map, the world position, and world normal",
         "NormalBlend": "Outputs the result of blending two normal maps together using a per-channel screen",
         "NormalBlend": "Outputs the result of blending two normal maps together using a per-channel screen",
         "WorldPosition": "A Vector4 representing the position of each vertex of the attached mesh transformed into world space",
         "WorldPosition": "A Vector4 representing the position of each vertex of the attached mesh transformed into world space",

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/nodeEditor/babylon.nodeEditor.max.js.map


+ 8 - 0
dist/preview release/viewer/babylon.module.d.ts

@@ -60741,6 +60741,10 @@ declare module "babylonjs/Materials/Node/Blocks/Fragment/perturbNormalBlock" {
          */
          */
         get worldNormal(): NodeMaterialConnectionPoint;
         get worldNormal(): NodeMaterialConnectionPoint;
         /**
         /**
+         * Gets the world tangent input component
+         */
+        get worldTangent(): NodeMaterialConnectionPoint;
+        /**
          * Gets the uv input component
          * Gets the uv input component
          */
          */
         get uv(): NodeMaterialConnectionPoint;
         get uv(): NodeMaterialConnectionPoint;
@@ -130828,6 +130832,10 @@ declare module BABYLON {
          */
          */
         get worldNormal(): NodeMaterialConnectionPoint;
         get worldNormal(): NodeMaterialConnectionPoint;
         /**
         /**
+         * Gets the world tangent input component
+         */
+        get worldTangent(): NodeMaterialConnectionPoint;
+        /**
          * Gets the uv input component
          * Gets the uv input component
          */
          */
         get uv(): NodeMaterialConnectionPoint;
         get uv(): NodeMaterialConnectionPoint;

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 5 - 5
dist/preview release/viewer/babylon.viewer.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 1 - 1
src/Materials/Node/Blocks/Fragment/perturbNormalBlock.ts

@@ -65,7 +65,7 @@ export class PerturbNormalBlock extends NodeMaterialBlock {
     public get worldNormal(): NodeMaterialConnectionPoint {
     public get worldNormal(): NodeMaterialConnectionPoint {
         return this._inputs[1];
         return this._inputs[1];
     }
     }
-    
+
     /**
     /**
      * Gets the world tangent input component
      * Gets the world tangent input component
      */
      */