grid = {
const context = DOM.context2d(width, height);
flowField.forEach((column, columnIndex) => {
column.forEach((row, rowIndex) => {
context.save();
context.translate(gridSize * columnIndex, gridSize * rowIndex);
context.rotate(row)
context.strokeStyle = "black";
context.beginPath();
context.moveTo(0, 0);
context.lineTo(0,gridSize/2);
context.stroke();
context.restore();
});
});
return context.canvas;
}