Commit 7916808e by doszhang

dos

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