David Catuhe 6 éve
szülő
commit
5fc995e64e

+ 1 - 1
Playground/babylon.d.txt

@@ -51862,7 +51862,7 @@ declare module BABYLON {
         private _type;
         private _animationType;
         /** @hidden */
private _wellKnownValue: Nullable<NodeMaterialWellKnownValues>;
-        /** Gets or sets a boolean indicating that this input can be edited in the Inspector */
+        /** Gets or sets a boolean indicating that this input can be edited in the Inspector (false by default) */
         visibleInInspector: boolean;
         /**
          * Gets or sets the connection point type (default is float)

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

@@ -52667,7 +52667,7 @@ declare module BABYLON {
         private _animationType;
         /** @hidden */
         _wellKnownValue: Nullable<NodeMaterialWellKnownValues>;
-        /** Gets or sets a boolean indicating that this input can be edited in the Inspector */
+        /** Gets or sets a boolean indicating that this input can be edited in the Inspector (false by default) */
         visibleInInspector: boolean;
         /**
          * Gets or sets the connection point type (default is float)

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
dist/preview release/babylon.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 54 - 51
dist/preview release/babylon.max.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
dist/preview release/babylon.max.js.map


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

@@ -55130,7 +55130,7 @@ declare module "babylonjs/Materials/Node/Blocks/Input/inputBlock" {
         private _animationType;
         /** @hidden */
         _wellKnownValue: Nullable<NodeMaterialWellKnownValues>;
-        /** Gets or sets a boolean indicating that this input can be edited in the Inspector */
+        /** Gets or sets a boolean indicating that this input can be edited in the Inspector (false by default) */
         visibleInInspector: boolean;
         /**
          * Gets or sets the connection point type (default is float)
@@ -117375,7 +117375,7 @@ declare module BABYLON {
         private _animationType;
         /** @hidden */
         _wellKnownValue: Nullable<NodeMaterialWellKnownValues>;
-        /** Gets or sets a boolean indicating that this input can be edited in the Inspector */
+        /** Gets or sets a boolean indicating that this input can be edited in the Inspector (false by default) */
         visibleInInspector: boolean;
         /**
          * Gets or sets the connection point type (default is float)

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

@@ -52667,7 +52667,7 @@ declare module BABYLON {
         private _animationType;
         /** @hidden */
         _wellKnownValue: Nullable<NodeMaterialWellKnownValues>;
-        /** Gets or sets a boolean indicating that this input can be edited in the Inspector */
+        /** Gets or sets a boolean indicating that this input can be edited in the Inspector (false by default) */
         visibleInInspector: boolean;
         /**
          * Gets or sets the connection point type (default is float)

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
dist/preview release/nodeEditor/babylon.nodeEditor.js


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

@@ -64396,7 +64396,7 @@ var NodeListComponent = /** @class */ (function (_super) {
         // Block types used to create the menu from
         var allBlocks = {
             Vertex: ["BonesBlock", "InstancesBlock", "MorphTargetsBlock"],
-            Fragment: ["AlphaTestBlock", "FogBlock", "Fresnel", "ImageProcessingBlock", "LightBlock", "ReflectionTextureBlock", "TextureBlock"],
+            Fragment: ["AlphaTestBlock", "FogBlock", "FresnelBlock", "ImageProcessingBlock", "LightBlock", "ReflectionTextureBlock", "TextureBlock"],
             Outputs: ["VertexOutputBlock", "FragmentOutputBlock"],
             Math: ["AddBlock", "ClampBlock", "CrossBlock", "DotBlock", "MultiplyBlock", "RemapBlock", "NormalizeBlock", "ScaleBlock", "TransformBlock", "TrigonometryBlock"],
             Conversion: ["ColorMergerBlock", "ColorSplitterBlock", "VectorMergerBlock", "VectorSplitterBlock"],

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
dist/preview release/nodeEditor/babylon.nodeEditor.max.js.map


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

@@ -55130,7 +55130,7 @@ declare module "babylonjs/Materials/Node/Blocks/Input/inputBlock" {
         private _animationType;
         /** @hidden */
         _wellKnownValue: Nullable<NodeMaterialWellKnownValues>;
-        /** Gets or sets a boolean indicating that this input can be edited in the Inspector */
+        /** Gets or sets a boolean indicating that this input can be edited in the Inspector (false by default) */
         visibleInInspector: boolean;
         /**
          * Gets or sets the connection point type (default is float)
@@ -117375,7 +117375,7 @@ declare module BABYLON {
         private _animationType;
         /** @hidden */
         _wellKnownValue: Nullable<NodeMaterialWellKnownValues>;
-        /** Gets or sets a boolean indicating that this input can be edited in the Inspector */
+        /** Gets or sets a boolean indicating that this input can be edited in the Inspector (false by default) */
         visibleInInspector: boolean;
         /**
          * Gets or sets the connection point type (default is float)

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 7 - 7
dist/preview release/viewer/babylon.viewer.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 1 - 1
nodeEditor/src/components/nodeList/nodeListComponent.tsx

@@ -15,7 +15,7 @@ export class NodeListComponent extends React.Component<INodeListComponentProps>
         // Block types used to create the menu from
         const allBlocks = {
             Vertex: ["BonesBlock", "InstancesBlock", "MorphTargetsBlock"],
-            Fragment: ["AlphaTestBlock", "FogBlock", "Fresnel", "ImageProcessingBlock", "LightBlock", "ReflectionTextureBlock", "TextureBlock"],
+            Fragment: ["AlphaTestBlock", "FogBlock", "FresnelBlock", "ImageProcessingBlock", "LightBlock", "ReflectionTextureBlock", "TextureBlock"],
             Outputs: ["VertexOutputBlock", "FragmentOutputBlock"],
             Math: ["AddBlock", "ClampBlock", "CrossBlock", "DotBlock", "MultiplyBlock", "RemapBlock", "NormalizeBlock", "ScaleBlock", "TransformBlock", "TrigonometryBlock"],
             Conversion: ["ColorMergerBlock", "ColorSplitterBlock", "VectorMergerBlock", "VectorSplitterBlock"],

+ 4 - 3
src/Materials/Node/Blocks/Fragment/fresnelBlock.ts

@@ -19,9 +19,10 @@ export class FresnelBlock extends NodeMaterialBlock {
 
         this.registerInput("worldPosition", NodeMaterialBlockConnectionPointTypes.Vector4, false, NodeMaterialBlockTargets.Vertex);
         this.registerInput("worldNormal", NodeMaterialBlockConnectionPointTypes.Vector4, false, NodeMaterialBlockTargets.Vertex);
+
         this.registerInput("cameraPosition", NodeMaterialBlockConnectionPointTypes.Vector3, false, NodeMaterialBlockTargets.Fragment);
-        this.registerInput("bias", NodeMaterialBlockConnectionPointTypes.Float, false, NodeMaterialBlockTargets.Vertex);
-        this.registerInput("power", NodeMaterialBlockConnectionPointTypes.Float, false, NodeMaterialBlockTargets.Vertex);
+        this.registerInput("bias", NodeMaterialBlockConnectionPointTypes.Float, false, NodeMaterialBlockTargets.Fragment);
+        this.registerInput("power", NodeMaterialBlockConnectionPointTypes.Float, false, NodeMaterialBlockTargets.Fragment);
 
         this.registerOutput("fresnel", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Fragment);
     }
@@ -102,7 +103,7 @@ export class FresnelBlock extends NodeMaterialBlock {
             return;
         }
 
-        state._emitFunctionFromInclude("fresnelFunction", comments);
+        state._emitFunctionFromInclude("fresnelFunction", comments, {removeIfDef: true});
 
         if (state._registerTempVariable("viewDirectionW")) {
             state.compilationString += `vec3 viewDirectionW = normalize(${this.cameraPosition.associatedVariableName} - ${worldPosVaryingName});\r\n`;

+ 2 - 2
src/Materials/Node/Blocks/Input/inputBlock.ts

@@ -27,8 +27,8 @@ export class InputBlock extends NodeMaterialBlock {
     /** @hidden */
     public _wellKnownValue: Nullable<NodeMaterialWellKnownValues> = null;
 
-    /** Gets or sets a boolean indicating that this input can be edited in the Inspector */
-    public visibleInInspector = true;
+    /** Gets or sets a boolean indicating that this input can be edited in the Inspector (false by default) */
+    public visibleInInspector = false;
 
     /**
      * Gets or sets the connection point type (default is float)

+ 4 - 0
src/Materials/Node/nodeMaterial.ts

@@ -823,6 +823,10 @@ export class NodeMaterial extends PushMaterial {
      * @returns an array of texture blocks
      */
     public getTextureBlocks(): (TextureBlock | ReflectionTextureBlock)[] {
+        if (!this._sharedData) {
+            return [];
+        }
+
         return this._sharedData.textureBlocks.filter((tb) => tb.texture);
     }