Last active
March 22, 2019 02:52
-
-
Save icarito/64d35a51f39ed5db1730c8f2e56f58d0 to your computer and use it in GitHub Desktop.
SCRIPT-8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// title: Water Effect #3 | |
const v = 20 | |
function waterLevel(x) { | |
// 16 springs | |
return 54 + Math.sin(x) * 2 | |
} | |
draw = function(state) { | |
state.t = state.t + 1 | |
clear() | |
for (let x of range(17)) { | |
sprite(x * 8 - state.t/8 % 8, waterLevel(x) - 8, | |
Math.round(state.t / v + (x/3 % 2)) % 3, 0, 1) | |
rectFill(x * 8 - state.t/8 % 8, waterLevel(x), 8, 127, 6) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"iframeVersion": "0.1.247", | |
"lines": [ | |
19, | |
0, | |
0, | |
0, | |
0, | |
0, | |
0, | |
0 | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"0": { | |
"notes": [ | |
"0a#37" | |
], | |
"tempo": 0 | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"0": [ | |
" ", | |
" ", | |
" ", | |
" ", | |
" 665 ", | |
" 66561 ", | |
" 6666661", | |
"66666656" | |
], | |
"1": [ | |
" ", | |
" ", | |
" ", | |
" ", | |
" ", | |
" 66 ", | |
" 6666 ", | |
" 666666 " | |
], | |
"2": [ | |
" ", | |
" ", | |
" ", | |
" ", | |
" ", | |
" ", | |
" 66 ", | |
" 6666 " | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment