diff options
| author | Yuval Adam <yuv.adm@gmail.com> | 2012-05-21 13:40:40 +0300 |
|---|---|---|
| committer | Yuval Adam <yuv.adm@gmail.com> | 2012-05-21 13:40:40 +0300 |
| commit | 87d7b6eca56cfac6e7d55364a817e7f777c8e3a4 (patch) | |
| tree | 55898979c08c4d8c476b11a1106bad03862c892d | |
| parent | 236d03825f0760c1b7b84baef5f9dbfcb10bd599 (diff) | |
API change, all functions now return this, added print()
| -rw-r--r-- | lsys.js | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -9,6 +9,10 @@ function LSystem(axiom, rules) { return rules[c] || c; }); } + return this; + }; + + this.print = function() { return this.tree; }; @@ -125,7 +129,7 @@ function LSystem(axiom, rules) { this.reset = function() { this.tree = axiom; - return this.tree; + return this; }; this.debug = function() { |
