David Catuhe 6 سال پیش
والد
کامیت
8232769709

+ 2 - 6
nodeEditor/src/blockTools.ts

@@ -84,14 +84,10 @@ export class BlockTools {
 				color = "Chocolate";
                 break;
             case NodeMaterialBlockConnectionPointTypes.Vector3:                
-				color = "Azure";
-                break;
-            case NodeMaterialBlockConnectionPointTypes.Vector4:                
-				color = "DarkMagenta";
-                break;
             case NodeMaterialBlockConnectionPointTypes.Color3:                
-				color = "ForestGreen";
+                color = "ForestGreen";
                 break;
+            case NodeMaterialBlockConnectionPointTypes.Vector4:                
             case NodeMaterialBlockConnectionPointTypes.Color4:                
 				color = "Gold";
                 break;

+ 0 - 9
nodeEditor/src/components/diagram/diagram.scss

@@ -202,15 +202,6 @@
                     }
                 }
 
-                .output-port-connection {
-                    pointer-events: none;
-                    grid-column: 1;
-                    grid-row: 1;
-                    background: #2796B2;
-                    border-radius: 10px;   
-                    transform: scale(1);
-                }
-
                 .output-port-type {
                     pointer-events: none;
                     grid-column: 1;

+ 1 - 1
nodeEditor/src/components/diagram/link/advancedLinkFactory.tsx

@@ -15,7 +15,7 @@ export class AdvancedLinkFactory extends DefaultLinkFactory {
 	}
 
 	generateLinkSegment(model: AdvancedLinkModel, widget: DefaultLinkWidget, selected: boolean, path: string) {
-        const portModel = (model.getSourcePort() || model.getTargetPort()) as DefaultPortModel;
+        const portModel = (model.getTargetPort() || model.getSourcePort()) as DefaultPortModel;
         const type = portModel.connection!.type;
 		let color = BlockTools.GetColorFromConnectionNodeType(type);
 		let width = 3;

+ 0 - 7
nodeEditor/src/components/diagram/portHelper.tsx

@@ -47,8 +47,6 @@ export class PortHelper {
 
                 let style = this._GetPortStyle(port.connection!.type);
 
-                let isConnected = port.connection && port.connection.endpoints.length > 0;
-
                 outputPorts.push(
                     <div key={key} className="output-port">
                         {
@@ -61,11 +59,6 @@ export class PortHelper {
                             <div className="output-port-border">                                
                             </div>
                             <DefaultPortWidget key={key} name={port.name} node={node} style={style} />
-                            {
-                                !isConnected &&
-                                <div className="output-port-connection">                             
-                                </div>                            
-                            }
                             <div className="output-port-type"> 
                                 {
                                     typeIndicator

+ 3 - 1
nodeEditor/src/graphEditor.tsx

@@ -527,7 +527,9 @@ export class GraphEditor extends React.Component<IGraphEditorProps> {
                     >
                         <DiagramWidget className="diagram" deleteKeys={[46]} ref={"test"} 
                         allowLooseLinks={false}
-                        inverseZoom={true} diagramEngine={this._engine} maxNumberPointsPerLink={0} />
+                        inverseZoom={true} 
+                        diagramEngine={this._engine} 
+                        maxNumberPointsPerLink={0} />
                     </div>
 
                     <div id="rightGrab"

+ 4 - 0
src/Materials/Node/Blocks/Dual/fogBlock.ts

@@ -37,7 +37,11 @@ export class FogBlock extends NodeMaterialBlock {
         this.registerOutput("output", NodeMaterialBlockConnectionPointTypes.Color3, NodeMaterialBlockTargets.Fragment);
 
         this.color.acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Color4);
+        this.color.acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Vector3);
+        this.color.acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Vector4);
         this.fogColor.acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Color4);
+        this.fogColor.acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Vector3);
+        this.fogColor.acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Vector4);
     }
 
     /**

+ 3 - 0
src/Materials/Node/Blocks/Fragment/fragmentOutputBlock.ts

@@ -19,6 +19,9 @@ export class FragmentOutputBlock extends NodeMaterialBlock {
         this.registerInput("rgba", NodeMaterialBlockConnectionPointTypes.Color4, true);
         this.registerInput("rgb", NodeMaterialBlockConnectionPointTypes.Color3, true);
         this.registerInput("a", NodeMaterialBlockConnectionPointTypes.Float, true);
+
+        this._inputs[0].acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Vector4);
+        this._inputs[1].acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Vector3);
     }
 
     /**

+ 2 - 0
src/Materials/Node/Blocks/Fragment/imageProcessingBlock.ts

@@ -24,6 +24,8 @@ export class ImageProcessingBlock extends NodeMaterialBlock {
         this.registerOutput("output", NodeMaterialBlockConnectionPointTypes.Color4);
 
         this._inputs[0].acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Color3);
+        this._inputs[0].acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Vector3);
+        this._inputs[0].acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Vector4);
     }
 
     /**