Commit 44cca328 by doszhang

dos

parent 22f7008a
...@@ -78,6 +78,12 @@ function onLoad() { ...@@ -78,6 +78,12 @@ 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);
} }
...@@ -109,7 +115,7 @@ function update() { ...@@ -109,7 +115,7 @@ function update() {
function paint() { function paint() {
ctx.globalCompositeOperation = 'source-over'; ctx.globalCompositeOperation = 'source-over';
ctx.fillStyle = "rgba(0,0,0,1)"; ctx.fillStyle = "rgba(0,0,0,0.2)";
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++) {
......
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