Releases: nylki/lindenmayer
1.5.3
-
IE11 support: The browser builds (
lindenmayer.browser.js
andlindenmayer.browser.min.js
) are now transpiled to ES5, supporting IE11. -
regular build are targeted for node support, esm builds support all environments that have native es6 import syntax.
-
updated dev packages, replaced uglify-es with terser
-
renamed
lindenmayer.es.js
tolindemayer.esm.js
according the common practice for ES module. This is relevant only if you have been directly importing the module file via its full filename. If you have been importing lindenmayer via webpack or rollup likeimport {LSystem} from 'lindenmayer'
, you shouldn't see a difference.
In general:
lindenmayer.js
for Node.jslindenmayer.browser.js
for browsers (supports IE11)lindenmayer.esm.js
for browsers and environments that natively support theimport
syntax
1.5 (important bug fix and ES6 class syntax)
Thanks to @TMiguelT this release makes use of ES6 class syntax resulting in clearer and more concise syntax and easier extendability for users.
Also a critical bug was fixed that was not tested before and therefore slipped through for a long time: When using a context sensitive production that should match for both sides, eg: 'A<B>C:' 'X'
, only the left side was checked, instead of both. This would lead to incorrect results in situation that the left matches but the right side does not. It has been fixed and a new test case has been added to cover this situation.
1.4.0
1.3.7
1.3.3
1.3.0
- New object-based productions: allows context sensitivity:
setProduction('F', {leftCtx: 'A+BC', rightCtx: 'YZ', successor: 'FF'}
stochastic productions:
setProduction('F', {successor: [{successor: 'F-', weight: 25}, {successor: 'F+', weight: 75}]
and conditions:
setProduction('F', {successor: 'FF', condition: () => foo() === 'bar']
in more streamlined way than defining your own function for those very common use cases.
1.2.1
1.1.0
Better parametric L-System support:
- match() works now for parametric L-Systems (that use objects as symbols), by parsing only the
.symbol
parameter inside match, when matching against objects instead of strings. - classic syntax stuff like
A<B>C
does therefore work aswell for parametric L-Systems