Skip to content

Instantly share code, notes, and snippets.

@alexbourt
alexbourt / gist:ca5b9e44f6ecbfcc6b8a52d805caa9f6
Last active September 8, 2017 22:42
trying to simulate fluids
var defaultCellSize = 48 * window.devicePixelRatio;
function createParticles(canvas, width, height, cellSize = defaultCellSize)
{
canvas.width = width;
canvas.height = height;
// defaults
canvas.showCells = false;