My App
JavaScript Kodu
var c = document.querySelector('canvas');
var c = c.getContext('2d');
setInterval(function(){
c.clearRect(0,0,innerWidth, innerHeight);
for (var i = 0 ;i < 100 ; i++) {
var x = Math.random() * 545;
var y = Math.random() * 250;
c.fillStyle= "hsla("+360 * Math.random()+", 100%, 50%,1)";
c.fillRect(x,y,10,10);
c.fill();
};
for (var i = 0 ;i < 100 ; i++) {
var x = Math.random() * 543;
var y = Math.random() * 248;
c.beginPath();
c.arc(x,y,5,0,Math.PI*2,true);
c.fillStyle = "hsla("+360 * Math.random()+", 100%, 50%,1)";
c.fill();
};
for (var i = 0 ;i < 100 ; i++) {
var x = Math.random() * 543;
var y = Math.random() * 250;
c.strokeStyle= "hsla("+360 * Math.random()+", 100%, 50%,1)";
c.rect(x,y,10,10);
c.stroke();
};
for (var i = 0 ;i < 100 ; i++) {
var x = Math.random() * 543;
var y = Math.random() * 248;
c.beginPath();
c.arc(x,y,5,0,Math.PI*2,true);
c.strokeStyle = "hsla("+360 * Math.random()+", 100%, 50%,1)";
c.stroke();
};
}, 300);
|