blob: b5a82013b42e85ad30ce2008c93fd5ad9a32e6f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
using UnityEditor;
using LibNoise.Generator;
using UNEB;
public class VoronoiNode : Node
{
private Voronoi _noise = new Voronoi();
public override void Init()
{
var noiseIn = AddInput();
noiseIn.name = "Input";
var mask = AddInput();
mask.name = "Mask";
var noiseOut = AddOutput();
noiseOut.name = "Output";
noiseOut.getValue = () => { return _noise; };
FitKnobs();
bodyRect.height += 80f;
bodyRect.width = 150f;
}
public override void OnBodyGUI()
{
_noise.Seed = EditorGUILayout.IntField("Seed", _noise.Seed);
_noise.Frequency = EditorGUILayout.DoubleField("Frequency", _noise.Frequency);
_noise.Displacement = EditorGUILayout.DoubleField("Displacement", _noise.Displacement);
_noise.UseDistance = EditorGUILayout.Toggle("Use Distance", _noise.UseDistance);
}
}
|