Commits

Anonymous committed 0c533f9

fixed stupid bug that led to slower execution the less cas you have

Comments (0)

Files changed (1)

 var nrSimsRows = 5;
 var nrSimsCols = 5;
 
-var nrSims = nrSimsRows * nrSimsCols;
+var nrSims;
 var caCanvas, caSims = [];
 var timer, time;
 var width, height, colWidth, rowHeight;
 	
 	nrSimsCols = parseInt(ctlNrSims.value);
 	nrSimsRows = nrSimsCols;
+	nrSims = nrSimsRows * nrSimsCols;
 	
 	colWidth = Math.floor((width / nrSimsCols) - 1);
 	rowHeight = Math.floor((height / nrSimsRows) - 1);
 	<input type="number" id="xres" name="xres" min="100" max="4000" value="1000" onchange="handleReset();" />
 	<input type="number" id="yres" name="yres" min="100" max="4000" value="3333" onchange="handleReset();" />
 	<input type="number" id="randomDensity" min="0" max="1" step="0.001" value="0.01" onchange="handleReset();">
-	<input type="number" id="nrSims" min="1" max="6" step="1" value="5" onchange="handleReset();" style="display:none;">
+	<input type="number" id="nrSims" min="1" max="6" step="1" value="5" onchange="handleReset();">
 	<input type="button" value="Reset" onclick="handleReset();">
 	<input type="file" value="evocellFile" id="evocellFile" />
 	fps<input size="1" id="framerate">