Line 16: | Line 16: | ||
var particlesQuantity = 100, | var particlesQuantity = 100, | ||
velocity = 0.3, | velocity = 0.3, | ||
− | maxRadius = 20; | + | maxRadius = 20, |
+ | maxOpacity = 0.5; | ||
var canvas = document.getElementById("myCanvas"), | var canvas = document.getElementById("myCanvas"), | ||
Line 25: | Line 26: | ||
for (var i = 0; i < particlesQuantity; i++) { | for (var i = 0; i < particlesQuantity; i++) { | ||
− | var alpha = Math.random(); | + | var alpha = Math.random()*maxOpacity; |
particles.push({ | particles.push({ | ||
Line 117: | Line 118: | ||
</script> | </script> | ||
+ | |||
</body> | </body> |
Revision as of 02:21, 1 November 2017