Skip to content

Commit

Permalink
lindsvg v1.3.2: Update project info and dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Amphiluke committed Jun 1, 2020
1 parent e943a70 commit 335b361
Show file tree
Hide file tree
Showing 7 changed files with 288 additions and 249 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ let svgCode = getSVGCode(lsParams, svgParams);
let {pathData, minX, minY, width, height} = getSVGData(lsParams);
```

An object returned by `getSVGData` contains [path data](https://www.w3.org/TR/SVG11/paths.html#PathData) needed to draw the L-system, and also the drawing boundaries that are essential for the `viewBox` attribute.
An object returned by `getSVGData` contains [path data](https://www.w3.org/TR/SVG11/paths.html#PathData) needed to draw the L-system, as well as the drawing boundaries that are essential for the `viewBox` attribute.

### Using “multi-path” methods

Expand Down Expand Up @@ -122,7 +122,7 @@ let svgParams = {
pathAttributes: {
stroke: "#514d3a",
"stroke-width": ["16", "11", "9", "7", "6", "5", "3", "2", "1"],
"stroke-linecap": ["square", "round"] // the rest items are equal to the last one
"stroke-linecap": ["square", "round" /* the rest items are equal to the last one */]
}
};

Expand All @@ -133,7 +133,7 @@ let svgCode = getMultiPathSVGCode(lsParams, svgParams);
let {multiPathData, minX, minY, width, height} = getMultiPathSVGData(lsParams);
```

If an attribute array contains less elements than the maximum branching depth (e.g. see `stroke-linecap` in the example above), the missing items are considered equal to the last one. So you don’t need to repeat the same value in the end of the list.
If an attribute array contains fewer elements than the maximum branching depth (e.g. see `stroke-linecap` in the example above), the missing items are implicitly made equal to the last one. So you don’t need to repeat the same value in the end of the list.

The property `multiPathData` in the object returned by `getMultiPathSVGData` is a _list_ of path data for every `<path>` element. The list is sorted in the order of increasing branch level (the deeper the branch the higher the index in the array).

Expand Down Expand Up @@ -164,4 +164,6 @@ lindsvg utilizes the ECMAScript 2018 syntax. If you want to use the module in en

## Demos

Please, check out [this collection](https://codepen.io/collection/DVzqWb) on CodePen to get a few live examples of using lindsvg.
Please, visit the project’s [demo web page](https://amphiluke.github.io/lindsvg/). You will find a few built-in L-system collections there, and will also be able to experiment with lindsvg while building your own L-systems.

Also, check out [this collection](https://codepen.io/collection/DVzqWb) on CodePen to get a few advanced examples of using lindsvg.
4 changes: 2 additions & 2 deletions dist/lindsvg.esm.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
lindsvg v1.3.1
https://amphiluke.github.io/l-systems/
lindsvg v1.3.2
https://amphiluke.github.io/lindsvg/
(c) 2020 Amphiluke
*/
let messages = {
Expand Down
6 changes: 3 additions & 3 deletions dist/lindsvg.esm.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/lindsvg.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
lindsvg v1.3.1
https://amphiluke.github.io/l-systems/
lindsvg v1.3.2
https://amphiluke.github.io/lindsvg/
(c) 2020 Amphiluke
*/
(function (global, factory) {
Expand Down
Loading

0 comments on commit 335b361

Please sign in to comment.