Commit 42e9be0b by doszhang

dos

parent eecef4a2
...@@ -91,6 +91,8 @@ function resizeCanvas() { ...@@ -91,6 +91,8 @@ function resizeCanvas() {
} }
function updateWorld() { function updateWorld() {
canvas.width = 641;
canvas.height = 640;
update(); update();
paint(); paint();
window.requestAnimationFrame(updateWorld); window.requestAnimationFrame(updateWorld);
...@@ -98,6 +100,7 @@ function updateWorld() { ...@@ -98,6 +100,7 @@ function updateWorld() {
function update() { function update() {
if (particles.length < 500 && Math.random() < probability) { if (particles.length < 500 && Math.random() < probability) {
console.log(particles);
createFirework(); createFirework();
} }
var alive = []; var alive = [];
......
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