Lindenmayer Versions Save

Feature complete classic L-System library (branching, context sensitive, parametric) & multi-purpose modern L-System/LSystem implementation that can take javascript functions as productions. It is not opinionated about how you do visualisations.

15.3

4 years ago
  • IE11 support: The browser builds ( lindenmayer.browser.js and lindenmayer.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 to lindemayer.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 like import {LSystem} from 'lindenmayer', you shouldn't see a difference.

In general:

  • lindenmayer.js for Node.js
  • lindenmayer.browser.js for browsers (supports IE11)
  • lindenmayer.esm.js for browsers and environments that natively support the import syntax

1.5

5 years ago

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

5 years ago
  • add missing default ignoredSymbols as expected from the README. Be advised that this could break your results if you previously relyied on an empty ignoredSymbols for some reason, when using CS-prods.

1.3.7

5 years ago
  • minor version bump, built with more ES6 language features resulting in smaller packages.

1.3.3

7 years ago

1.3.0

7 years ago
  • 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

7 years ago
  • using rollup for packaging now: there are now two distributables: lindenmayer.js for node/browserify/etc and lindenmayer.browser.js for script tags in HTML
  • preparation for more classic syntax sugar

1.1.0

7 years ago

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

1.0.1

7 years ago

Added LSystem.clearProductions()

1.0

7 years ago