summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lsys.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lsys.js b/lsys.js
index 9a027e7..f492f84 100644
--- a/lsys.js
+++ b/lsys.js
@@ -75,7 +75,9 @@ function LSystem(axiom, rules, draw_constants) {
geometry = [[x,y,z]];
break;
case ']':
- coords.push(geometry);
+ if (geometry.length > 1) {
+ coords.push(geometry);
+ }
geometry = stack.pop();
U = stack.pop();
L = stack.pop();