var big = false; // Num nodes var NODE_COUNT = 50; // Radius, anything closer than this becomes a neighbour. var NEIGHBOUR_PROXIMITY = 20; // Flat array of x, y, dx, dy. var nodes = Array(NODE_COUNT); // Flat array of flavours for each node. var flavours = Array(NODE_COUNT); // Flat array of neighbours, proximity for each node. var neighbours = Array(NODE_COUNT); var canvas = document.getElementById('canvas'); var context = canvas.
Read more →