squares4 = {
const wonk = () => (Math.random() - 0.5 + animation) * wonkiness;
const square = (x, y, column) => {
const startx = x + wonk() * column;
const starty = y + wonk() * column;
return svg`
<path d="M ${startx} ${starty}
L ${x + wonk() * column} ${y + squareSize + wonk() * column}
L ${x + squareSize + wonk() * column} ${y +
squareSize +
wonk() * column}
L ${x + squareSize + wonk() * column} ${y + wonk() * column}
L ${startx} ${starty} z"
fill="none" stroke="black"/>
`;
};
const squares = squarePositions2
.map(({ x, y, column }) =>
new Array(column + 1).fill(1).map(() => square(x, y, column + 1))
)
.flat();
return svg`<svg width=${width} height=${rows *
squareSize *
1.3}>${squares}</svg>`;
}