Commit 25f5dc73 authored by Olivier Bouwman's avatar Olivier Bouwman
Browse files

add option to disable clear on redraw

parent 4bb83f89
......@@ -15,6 +15,7 @@
var gridWidth = 250;
var gridHeight = 250;
var drawInterval = 0; //draw every x updates;
var disableClearOnDraw = true;
var bunnyLifeExpectancy = 3 * 356; //3 years in days
var bunnyMinimumMatingAge = (356 / 12) * 6; //6 months in days
......@@ -170,7 +171,7 @@
}
function drawGrid() {
ctx.clearRect(0, 0, gridWidth, gridHeight);
if (!disableClearOnDraw) {ctx.clearRect(0, 0, gridWidth, gridHeight);}
for (var x = 0; x < gridWidth; x++) {
for (var y = 0; y < gridHeight; y++) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment