Fixed pattern node

Triangle was stupidly named saw, sawtooth was missing
This commit is contained in:
Rodolphe Suescun 2018-08-07 09:24:48 +02:00
parent cc1ccb8835
commit 30c711920f
3 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ float wave_sin(float x) {
return 0.5-0.5*cos(3.1415928*2.0*x);
}
float wave_saw(float x) {
float wave_triangle(float x) {
x = fract(x);
return min(2.0*x, 2.0-2.0*x);
}

View File

@ -7,7 +7,7 @@ var x_scale = 4.0
var y_wave = 0
var y_scale = 4.0
const WAVE_FCT = [ "wave_sin", "wave_saw", "wave_square" ]
const WAVE_FCT = [ "wave_sin", "wave_triangle", "wave_square", "fract" ]
const MIX_FCT = [ "mix_multiply", "mix_add", "mix_max", "mix_min", "mix_xor", "mix_pow" ]
func _ready():

View File

@ -181,7 +181,7 @@ group = null
text = "Sine"
flat = false
align = 0
items = [ "Sine", null, false, 0, null, "Saw", null, false, 1, null, "Square", null, false, 2, null ]
items = [ "Sine", null, false, 0, null, "Triangle", null, false, 1, null, "Square", null, false, 2, null, "Sawtooth", null, false, 3, null ]
selected = 0
_sections_unfolded = [ "Rect" ]
@ -276,7 +276,7 @@ group = null
text = "Sine"
flat = false
align = 0
items = [ "Sine", null, false, 0, null, "Saw", null, false, 1, null, "Square", null, false, 2, null ]
items = [ "Sine", null, false, 0, null, "Triangle", null, false, 1, null, "Square", null, false, 2, null, "Sawtooth", null, false, 3, null ]
selected = 0
_sections_unfolded = [ "Rect" ]