mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 18:06:07 +01:00
19 lines
No EOL
385 B
JavaScript
19 lines
No EOL
385 B
JavaScript
var counter = 0;
|
|
|
|
function startup() {
|
|
setInterval('animate()',10);
|
|
}
|
|
|
|
function animate() {
|
|
var is;
|
|
var mult;
|
|
var cells = document.getElementsByTagName('polygon');
|
|
for (cell in cells) {
|
|
if (cell >= 0) {
|
|
is = cells[cell].getAttribute('rel');
|
|
mult = Math.cos((1 - is) * counter * 0.05);
|
|
cells[cell].setAttribute('fill-opacity',1- mult*mult*(1 - is));
|
|
}
|
|
}
|
|
counter++;
|
|
} |