Bladeren bron

tiny fixes for nme

David Catuhe 5 jaren geleden
bovenliggende
commit
dbcc4a5dca
2 gewijzigde bestanden met toevoegingen van 5 en 2 verwijderingen
  1. 4 1
      src/Materials/Node/Blocks/lerpBlock.ts
  2. 1 1
      src/Materials/Node/nodeMaterial.ts

+ 4 - 1
src/Materials/Node/Blocks/lerpBlock.ts

@@ -17,11 +17,14 @@ export class LerpBlock extends NodeMaterialBlock {
 
         this.registerInput("left", NodeMaterialBlockConnectionPointTypes.AutoDetect);
         this.registerInput("right", NodeMaterialBlockConnectionPointTypes.AutoDetect);
-        this.registerInput("gradient", NodeMaterialBlockConnectionPointTypes.Float);
+        this.registerInput("gradient", NodeMaterialBlockConnectionPointTypes.AutoDetect);
         this.registerOutput("output", NodeMaterialBlockConnectionPointTypes.BasedOnInput);
 
         this._outputs[0]._typeConnectionSource = this._inputs[0];
         this._linkConnectionTypes(0, 1);
+        this._linkConnectionTypes(1, 2);
+
+        this._inputs[2].acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Float)
     }
 
     /**

+ 1 - 1
src/Materials/Node/nodeMaterial.ts

@@ -1396,7 +1396,7 @@ export class NodeMaterial extends PushMaterial {
         const color = new InputBlock("Color");
         color.setAsAttribute("particle_color");
 
-        const multiply = new MultiplyBlock("texture * color");
+        const multiply = new MultiplyBlock("Texture * Color");
         texture.connectTo(multiply);
         color.connectTo(multiply);