Cool find! Usually we don't write code for you, but this one's on me.
First, change the CSS code to this:
canvas {
position: absolute;
width: 100%; height: 200px;
bottom: 0px; left: 0px;
}
This will span the canvas across the entire page, but there won't be enough "smoke".
To add more smoke, replace the spawn()
function with this!
function spawn() {
if(new Date().getTime() > lastTime + minSpawnTime) {
lastTime = new Date().getTime();
parts.push(new smoke(0, emitterY));
parts.push(new smoke(50, emitterY));
parts.push(new smoke(100, emitterY));
parts.push(new smoke(150, emitterY));
parts.push(new smoke(200, emitterY));
parts.push(new smoke(250, emitterY));
parts.push(new smoke(300, emitterY));
}
}
Hope you enjoy!