mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
13 lines
345 B
JavaScript
13 lines
345 B
JavaScript
var pos=0;
|
|
function getPattern() {
|
|
var rgb = "";
|
|
pos++;
|
|
for (var i=0;i<75;i+=3) {
|
|
rgb += String.fromCharCode((1 + Math.sin((i+pos)*0.1324)) * 127) +
|
|
String.fromCharCode((1 + Math.sin((i+pos)*0.1654)) * 127) +
|
|
String.fromCharCode((1 + Math.sin((i+pos)*0.1)) * 127);
|
|
}
|
|
}
|
|
|
|
for (var i=0;i<100;i++) getPattern();
|