-
Notifications
You must be signed in to change notification settings - Fork 4
/
hydra.fn.list
150 lines (130 loc) · 7.08 KB
/
hydra.fn.list
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
Context :: { time :: Float, ... }
Value :: Number | Array Number | (Context -> Number) | Fast Array Number | Smooth Array Number | ... | Time | Mouse | Width | Height | ... | Harmonic AudioBin
Array :: Array Value
Texture :: Solid | Dynamic | Video | Camera | ...
Source :: Source0 | Source1 | Source2 | ...
Output :: Screen | Output0 | Output1 | Output2 | ...
Ease :: Linear | InOutCubic | ...
From :: All | Output Output
Audio :: Mic | File | ...
AudioBin :: H0 | H1 | H2 | H3 | H4 ..
UpdateFn :: Context -> Effect Unit
SourceOptions :: { src :: Canvas, ... }
GlslFn :: see below
source : hsl(10, 100%, 70%)
geometry : hsl(50, 100%, 70%)
color : hsl(90, 100%, 70%)
blend : hsl(130, 100%, 70%)
modulate : hsl(170, 100%, 70%)
extsource : hsl(210, 100%, 70%)
synth : hsl(250, 100%, 70%)
array : hsl(290, 100%, 70%)
audio : hsl(330, 100%, 70%)
source : noise :: scale:Value (10) -> offset:Value (0.1) -> Texture
source : voronoi :: scale:Value (5) -> speed:Value (0.3) -> blending:Value (0.3) -> Texture
source : osc :: frequency:Value (60) -> sync:Value (0.1) -> offset:Value -> Texture
source : shape :: sides:Value (60) -> radius:Value (0.3) -> smoothing:Value (0.01) -> Texture
source : gradient :: speed:Value -> Texture
source : srctex :: tex:Texture -> Texture
source : solid :: r:Value -> g:Value -> b:Value -> a:Value (1) -> Texture
source : src :: src:Source -> Texture
source : prev :: ? -> Texture
geometry : rotate :: what:Texture -> angle:Value (10) -> speed:Value -> Texture
geometry : scale :: what:Texture -> amount:Value (1.5) -> xMult:Value (1) -> yMult:Value (1) -> offsetX:Value (0.5) -> offsetY:Value (0.5) -> Texture
geometry : pixelate :: what:Texture -> pixelX:Value (20) -> pixelY:Value (20) -> Texture
geometry : repeat :: what:Texture -> repeatX:Value (3) -> repeatY:Value (3) -> offsetX:Value -> offsetY:Value -> Texture
geometry : repeatX :: what:Texture -> reps:Value (3) -> offset:Value -> Texture
geometry : repeatY :: what:Texture -> reps:Value (3) -> offset:Value -> Texture
geometry : kaleid :: what:Texture -> nSides:Value (3) -> Texture
geometry : scroll :: what:Texture -> scrollX:Value (0.5) -> scrollY:Value (0.5) -> speedX:Value -> speedY:Value -> Texture
geometry : scrollX :: what:Texture -> scrollX:Value (0.5) -> speed:Value -> Texture
geometry : scrollY :: what:Texture -> scrollY:Value (0.5) -> speed:Value -> Texture
color : posterize :: what:Texture -> bins:Value (3) -> gamma:Value (0.6) -> Texture
color : shift :: what:Texture -> r:Value (0.5) -> g:Value -> b:Value -> a:Value -> Texture
color : invert :: what:Texture -> amount:Value (1) -> Texture
color : contrast :: what:Texture -> amount:Value (1.6) -> Texture
color : brightness :: what:Texture -> amount:Value (0.4) -> Texture
color : luma :: what:Texture -> threshold:Value (0.5) -> tolerance:Value (0.1) -> Texture
color : thresh :: what:Texture -> threshold:Value (0.5) -> tolerance:Value (0.1) -> Texture
color : color :: r:Value (1) -> g:Value (1) -> b:Value (1) -> a:Value (1) -> Texture
color : saturate :: what:Texture -> amount:Value (2) -> Texture
color : hue :: what:Texture -> hue:Value (0.4) -> Texture
color : colorama :: what:Texture -> amount:Value (0.005) -> Texture
color : sum :: what:Texture -> ? -> Texture
color : r :: what:Texture -> scale:Value (1) -> offset:Value -> Texture
color : g :: what:Texture -> scale:Value (1) -> offset:Value -> Texture
color : b :: what:Texture -> scale:Value (1) -> offset:Value -> Texture
color : a :: what:Texture -> scale:Value (1) -> offset:Value -> Texture
blend : add :: what:Texture -> with:Texture -> amount:Value (1) -> Texture
blend : sub :: what:Texture -> with:Texture -> amount:Value (1) -> Texture
blend : layer :: what:Texture -> with:Texture -> amount:Value (1) -> Texture
blend : blend :: what:Texture -> with:Texture -> amount:Value (0.5) -> Texture
blend : mult :: what:Texture -> with:Texture -> amount:Value (1) -> Texture
blend : diff :: what:Texture -> with:Texture -> Texture
blend : mask :: what:Texture -> with:Texture -> Texture
modulate : modulateRepeat :: what:Texture -> with:Texture -> repeatX:Value (3) -> repeatY:Value (3) -> offsetX:Value (0.5) -> offsetY:Value (0.5) -> Texture
modulate : modulateRepeatX :: what:Texture -> with:Texture -> reps:Value (3) -> offset:Value (0.5) -> Texture
modulate : modulateRepeatY :: what:Texture -> with:Texture -> reps:Value (3) -> offset:Value (0.5) -> Texture
modulate : modulateKaleid :: what:Texture -> with:Texture -> nSides:Value (3) -> Texture
modulate : modulateScrollX :: what:Texture -> with:Texture -> scrollX:Value (0.5) -> speed:Value -> Texture
modulate : modulateScrollY :: what:Texture -> with:Texture -> scrollY:Value (0.5) -> speed:Value -> Texture
modulate : modulate :: what:Texture -> with:Texture -> amount:Value (0.1) -> Texture
modulate : modulateScale :: what:Texture -> with:Texture -> multiple:Value (1) -> offset:Value (1) -> Texture
modulate : modulatePixelate :: what:Texture -> with:Texture -> multiple:Value (10) -> offset:Value (3) -> Texture
modulate : modulateRotate :: what:Texture -> with:Texture -> multiple:Value (1) -> offset:Value -> Texture
modulate : modulateHue :: what:Texture -> with:Texture -> amount:Value (1) -> Texture
synth : render :: from:From (All) -> Unit
synth : update :: fn:UpdateFn -> Unit
synth : setResolution :: width:Value -> height:Value -> Unit
synth : hush :: Unit -> Unit
synth : setFunction :: fn:GlslFn -> Unit
synth : speed :: v:Value (1) -> Unit
synth : bpm :: v:Value (30) -> Unit
synth : width :: Value
synth : height :: Value
synth : pi :: Value
synth : time :: Value
synth : mouse :: Value
extsource : initCam :: where:Source -> index:Value -> Unit
extsource : initImage :: where:Source -> url:String -> Unit
extsource : initVideo :: where:Source -> url:String -> Unit
extsource : init :: where:SourceOptions -> Unit
extsource : initStream :: where:Source -> ? -> Unit
extsource : initScreen :: where:Source -> Unit
array : fast :: a:Array -> speed:Value (1) -> Value
array : smooth :: a:Array -> smooth:Value (1) -> Value
array : ease :: a:Array -> ease:Ease (Linear) -> Value
array : offset :: a:Array -> offset:Value (0.5) -> Value
array : fit :: a:Array -> low:Value (0) -> high:Value (1) -> Value
audio : fft :: a:Audio -> h:Harmonic -> Value
audio : setSmooth :: a:Audio -> smooth:Value (0.4) -> Unit
audio : setCutoff :: a:Audio -> cutoff:Value (2) -> Unit
audio : setBins :: a:Audio -> numBins:Value (4) -> Unit
audio : setScale :: a:Audio -> scale:Value (10) -> Unit
audio : hide :: a:Audio -> ? -> Unit
audio : show :: a:Audio -> ? -> Unit
out : out : what:Texture :: where:Output -> Unit
https://hydra.ojack.xyz/functions/
// from https://www.shadertoy.com/view/XsfGzn
setFunction({
name: 'chroma',
type: 'color',
inputs: [
],
glsl: `
float maxrb = max( _c0.r, _c0.b );
float k = clamp( (_c0.g-maxrb)*5.0, 0.0, 1.0 );
float dg = _c0.g;
_c0.g = min( _c0.g, maxrb*0.8 );
_c0 += vec4(dg - _c0.g);
return vec4(_c0.rgb, 1.0 - k);
`})
osc(60,0.1,1.5).chroma().out(o0)
(\w+)\s:\s(\w+)\s::\s
(\w+:\w+(\s\([\w\.]+\))?\s->\s)?
(\w+:\w+(\s\([\w\.]+\))?\s->\s)?
(\w+:\w+(\s\([\w\.]+\))?\s->\s)?
(\w+:\w+(\s\([\w\.]+\))?\s->\s)?
(\w+:\w+(\s\([\w\.]+\))?\s->\s)?
(\w+)
$1 $2 $3 $4 $5 >>>