Skip to content

Commit 6026a58

Browse files
committed
Merge upstream changes
1 parent db545d6 commit 6026a58

2 files changed

Lines changed: 41 additions & 1 deletion

File tree

examples/wave.html

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!DOCTYPE HTML>
2+
<html>
3+
<head>
4+
<title>Wave example</title>
5+
</head>
6+
<body>
7+
<button id="bPiano">Piano left</button>
8+
<button id="bGuitar">Guitar itched</button>
9+
<button id="bXylo">Xylophone slow</button>
10+
<button id="bAll">All in one</button>
11+
12+
<script src="../lib/wave.js"></script>
13+
<script>
14+
function piano() {
15+
wave(':piano:zxcvbn').balance(-1).play()
16+
}
17+
function guitar() {
18+
wave(':guitar:zxcvbn').itch(0.5).play()
19+
}
20+
function xylo() {
21+
wave(':xylophone:zxcvbn').pace(100).play()
22+
}
23+
function all() {
24+
wave(`
25+
:pace 400: :itch 0: :balance 0:
26+
27+
:piano: :balance -1: zxcvbn
28+
29+
:guitar: :balance 0: :itch 0.5: zxcvbn
30+
31+
:xylophone: :itch 0: :pace 100: zxcvbn
32+
`).play()
33+
}
34+
document.querySelector('#bPiano').addEventListener("click", piano)
35+
document.querySelector('#bGuitar').addEventListener("click", guitar)
36+
document.querySelector('#bXylo').addEventListener("click", xylo)
37+
document.querySelector('#bAll').addEventListener("click", all)
38+
</script>
39+
</body>
40+
</html>

lib/wave.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1239,4 +1239,4 @@ return edide.global.wave = (str) => {
12391239
return obj
12401240
}
12411241
return this;
1242-
}).call({}, edide);
1242+
}).call({}, edide);

0 commit comments

Comments
 (0)