Skip to content

Commit

Permalink
docs(grid-iterators): update all anims, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Mar 25, 2023
1 parent 1047a2d commit 5e2531a
Show file tree
Hide file tree
Showing 18 changed files with 15 additions and 11 deletions.
Binary file modified assets/grid-iterators/columns2d-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/grid-iterators/diagonal2d-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/grid-iterators/diagonalslopex-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/grid-iterators/diagonalslopey-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/grid-iterators/hilbert2d-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/grid-iterators/interleavecolumns2d-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/grid-iterators/interleaverows2d-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/grid-iterators/random2d-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/grid-iterators/rows2d-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/grid-iterators/spiral2d-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/grid-iterators/zcurve2d-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/grid-iterators/zigzagcolumns2d-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/grid-iterators/zigzagdiag2d-small.gif
Binary file not shown.
Binary file added assets/grid-iterators/zigzagdiagonal2d-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/grid-iterators/zigzagrows2d-small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/grid-iterators/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ which only includes the end points of each row.

### Zigzag diagonal

![anim](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/grid-iterators/zigzagdiag2d-small.gif)
![anim](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/grid-iterators/zigzagdiagonal2d-small.gif)

[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/grid-iterators/src/zigzag-diagonal.ts)

Expand Down
22 changes: 13 additions & 9 deletions packages/grid-iterators/tools/build-assets.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { lch } from "@thi.ng/color";
import { asSvg, group, polyline, rect, svgDoc } from "@thi.ng/geom";
import {
columns2d,
Expand Down Expand Up @@ -54,19 +55,22 @@ iterators.forEach(([fn, opts]) => {
width: 600,
height: 600,
viewBox: "-1 -1 18 18",
stroke: "black",
"stroke-width": 0.1,
stroke: "none",
},
polyline(
pts.slice(0, i * 2).map(([x, y]) => [x + 0.5, y + 0.5])
),
group(
{ fill: [0, 1, 0.5, 0.25], stroke: "none" },
pts.slice(0, i * 2 - 1).map((p) => rect(p, 1))
{},
pts.slice(0, i * 2 - 1).map((p, j) =>
rect(p, 1, {
fill: lch(0.8, 0.6, j / 256, 0.5),
})
)
),
polyline(
pts.slice(0, i * 2).map(([x, y]) => [x + 0.5, y + 0.5]),
{ stroke: "black", "stroke-width": 0.1 }
),
rect(pts[i * 2 - 1], 1, {
fill: [0, 1, 0.5, 0.85],
stroke: "none",
fill: "black",
})
)
)
Expand Down
2 changes: 1 addition & 1 deletion packages/grid-iterators/tpl.readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ which only includes the end points of each row.

### Zigzag diagonal

![anim](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/grid-iterators/zigzagdiag2d-small.gif)
![anim](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/grid-iterators/zigzagdiagonal2d-small.gif)

[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/grid-iterators/src/zigzag-diagonal.ts)

Expand Down

0 comments on commit 5e2531a

Please sign in to comment.