Commit 7916808e by doszhang

dos

parent 44cca328
...@@ -78,12 +78,6 @@ function onLoad() { ...@@ -78,12 +78,6 @@ function onLoad() {
ctx = canvas.getContext("2d"); ctx = canvas.getContext("2d");
resizeCanvas(); resizeCanvas();
ctx.beginPath();
ctx.lineWidth = "6";
ctx.strokeStyle = "red";
ctx.rect(0, 0, canvas.width, canvas.height);
ctx.stroke();
window.requestAnimationFrame(updateWorld); window.requestAnimationFrame(updateWorld);
} }
...@@ -161,11 +155,11 @@ Particle.prototype = { ...@@ -161,11 +155,11 @@ Particle.prototype = {
this.vy += this.gravity; this.vy += this.gravity;
this.y += this.vy; this.y += this.vy;
this.alpha -= 0.01; this.alpha -= 0.01;
if (this.x <= -this.w || this.x >= screen.width || // if (this.x <= -this.w || this.x >= screen.width ||
this.y >= screen.height || // this.y >= screen.height ||
this.alpha <= 0) { // this.alpha <= 0) {
return false; // return false;
} // }
return true; return true;
}, },
draw: function (c) { draw: function (c) {
......
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