-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathgsuiLFO.html.js
52 lines (51 loc) · 2.31 KB
/
gsuiLFO.html.js
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
"use strict";
GSUsetTemplate( "gsui-lfo", () => [
GSUcreateDiv( { class: "gsuiLFO-graph" },
GSUcreateDiv( { class: "gsuiLFO-wave" },
GSUcreateElement( "gsui-beatlines", { coloredbeats: "" } ),
GSUcreateElement( "gsui-periodicwave" ),
),
GSUcreateDiv( { class: "gsuiLFO-ampSigns" },
GSUcreateLabel( { class: "gsuiLFO-btn gsuiLFO-ampSign" },
GSUcreateInput( { class: "gsuiLFO-btnInput gsuiLFO-ampSignRadio", name: "gsuiLFO-ampSign", type: "radio", value: "1" } ),
GSUcreateI( { class: "gsuiLFO-btnIcon gsuiLFO-ampSignIcon gsuiIcon", "data-icon": "caret-up" } ),
),
GSUcreateLabel( { class: "gsuiLFO-btn gsuiLFO-ampSign" },
GSUcreateInput( { class: "gsuiLFO-btnInput gsuiLFO-ampSignRadio", name: "gsuiLFO-ampSign", type: "radio", value: "-1" } ),
GSUcreateI( { class: "gsuiLFO-btnIcon gsuiLFO-ampSignIcon gsuiIcon", "data-icon": "caret-down" } ),
),
),
),
[
[ "delay", "delay", "del", 0, 4, .03125 ],
[ "attack", "attack", "att", 0, 4, .03125 ],
[ "speed", "speed", "spd", .25, 18, .125 ],
[ "amp", "amplitude", "amp", .001, 1, .001 ],
].map( ( [ prop, title, text, min, max, step ] ) =>
GSUcreateDiv( { class: "gsuiLFO-prop", title, "data-prop": prop },
GSUcreateDiv( { class: "gsuiLFO-propLabel" },
GSUcreateSpan( null, text ),
GSUcreateSpan( { class: "gsuiLFO-propValue" } ),
),
GSUcreateDiv( { class: "gsuiLFO-propContent" },
GSUcreateElement( "gsui-slider", { type: "linear-x", disabled: true, min, max, step, "mousemove-size": "800", "data-prop": prop } ),
),
)
),
GSUcreateDiv( { class: "gsuiLFO-prop gsuiLFO-type" },
GSUcreateDiv( { class: "gsuiLFO-propLabel" }, "wave" ),
GSUcreateDiv( { class: "gsuiLFO-propContent" },
[
[ "sine", "M 1 5 C 1 4 1 1 4 1 C 7 1 7 4 7 5 C 7 6 7 9 10 9 C 13 9 13 6 13 5" ],
[ "triangle", "M 1 5 L 4 1 L 10 9 L 13 5" ],
[ "sawtooth", "M 1 5 L 7 1 L 7 9 L 13 5" ],
[ "square", "M 1 5 L 1 1 L 7 1 L 7 9 L 13 9 L 13 5" ],
].map( ( [ w, dots ] ) =>
GSUcreateLabel( { class: "gsuiLFO-btn gsuiLFO-typeBtn", title: w },
GSUcreateInput( { class: "gsuiLFO-btnInput gsuiLFO-typeRadio", name: "gsuiLFO-type", type: "radio", value: w } ),
GSUcreateElementSVG( "svg", { class: "gsuiLFO-btnIcon gsuiLFO-typeSVG", viewBox: "0 0 14 10" }, GSUcreateElementSVG( "path", { d: dots } ) ),
)
)
),
),
].flat( 1 ) );