Commit 22f7008a by doszhang

dos

parent 6e481d27
...@@ -109,7 +109,7 @@ function update() { ...@@ -109,7 +109,7 @@ function update() {
function paint() { function paint() {
ctx.globalCompositeOperation = 'source-over'; ctx.globalCompositeOperation = 'source-over';
ctx.fillStyle = "rgba(0,0,0,0.2)"; ctx.fillStyle = "rgba(0,0,0,1)";
ctx.fillRect(0, 0, w, h); ctx.fillRect(0, 0, w, h);
ctx.globalCompositeOperation = 'lighter'; ctx.globalCompositeOperation = 'lighter';
for (var i = 0; i < particles.length; i++) { for (var i = 0; i < particles.length; i++) {
...@@ -118,8 +118,8 @@ function paint() { ...@@ -118,8 +118,8 @@ function paint() {
} }
function createFirework() { function createFirework() {
xPoint = Math.random() * (w) + 100; xPoint = Math.random() * (w - 200) + 100;
yPoint = Math.random() * (h) + 100; yPoint = Math.random() * (h - 200) + 100;
var nFire = Math.random() * 50 + 100; var nFire = Math.random() * 50 + 100;
var c = "rgb(" + (~~(Math.random() * 200 + 55)) + "," + var c = "rgb(" + (~~(Math.random() * 200 + 55)) + "," +
(~~(Math.random() * 200 + 55)) + "," + (~~(Math.random() * 200 + 55)) + ")"; (~~(Math.random() * 200 + 55)) + "," + (~~(Math.random() * 200 + 55)) + ")";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment