var TOGGLE_CLEAR = 'C'.charCodeAt(0);
var TOGGLE_BOX = 'B'.charCodeAt(0);
var TOGGLE_UNDO_BOX = 'U'.charCodeAt(0);
var TOGGLE_FLIPFLOP = 'F'.charCodeAt(0);
var TOGGLE_RENDER = 'R'.charCodeAt(0);
var TOGGLE_DEBUG = 'N'.charCodeAt(0);
There's definitely room for experimentation! At some point I want to incorporate the cloth more in the actual gameplay itself, whether it's in this demo or something else.
It's a bit limited though, the forces exerted on the grid need to be within a relatively narrow range if the simulation is to obey the laws of sanity.
var TOGGLE_CLEAR = 'C'.charCodeAt(0); var TOGGLE_BOX = 'B'.charCodeAt(0); var TOGGLE_UNDO_BOX = 'U'.charCodeAt(0); var TOGGLE_FLIPFLOP = 'F'.charCodeAt(0); var TOGGLE_RENDER = 'R'.charCodeAt(0); var TOGGLE_DEBUG = 'N'.charCodeAt(0);