diff options
Diffstat (limited to 'Scripts/Fold/Editor/TubeToPlaneNode.cs')
| -rw-r--r-- | Scripts/Fold/Editor/TubeToPlaneNode.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Scripts/Fold/Editor/TubeToPlaneNode.cs b/Scripts/Fold/Editor/TubeToPlaneNode.cs new file mode 100644 index 0000000..72f1b9d --- /dev/null +++ b/Scripts/Fold/Editor/TubeToPlaneNode.cs @@ -0,0 +1,26 @@ +using GraphProcessor; +using UnityEngine; + +[System.Serializable, NodeMenuItem("Fold/TubeToPlane")] +public class TubeToPlaneNode : BaseFoldNode +{ + [Input(name = "p"), SerializeField, Tooltip("Origin point.")] + public Vector4 p; + + [Input(name = "r"), SerializeField, Tooltip("Radial axis. Points along this line are not moved at all.")] + public Vector4 r; + + [Input(name = "s"), SerializeField, Tooltip("Tangent axis. This line determines the axis around which the tube is unwrapped.")] + public Vector4 s; + + [Input(name = "t"), SerializeField, Tooltip("Effect strength.")] + public float t; + + public override string name => "Tube to Plane"; + + public override FoldNodeSerialized Serialize() + { + return new FoldNodeSerialized { opcode = 1, float0 = t, vec0 = p, vec1 = r, vec2 = s }; + } +} + |
