stipple-maplibre 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +55 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,9 +8,10 @@ It supports geometric patterns, repeated text, and SVG symbols. Patterns can
8
8
  be configured in JavaScript or prepared in the playground and exported as
9
9
  MapLibre code.
10
10
 
11
- <p align="center"><strong><a href="https://stipple.pages.dev/">Run the playground</a></strong></p>
11
+ <img width="1456" alt="Stipple playground showing pattern customization on a MapLibre map" src="./assets/readme/playground.png" />
12
+
13
+ <p align="center"><strong><a href="https://stipple.pages.dev/">➞ Run the playground</a></strong></p>
12
14
 
13
- <img width="1456" height="858" alt="Stipple playground showing a patterned polygon on a MapLibre map" src="https://github.com/user-attachments/assets/f7d28a0f-267a-4bd3-b7a2-30b49eabf709" />
14
15
 
15
16
  ## What problem does it solve?
16
17
 
@@ -20,8 +21,7 @@ map, and kept at an appropriate resolution when the display or style changes.
20
21
 
21
22
  Stipple generates this image from a small set of pattern parameters. It draws
22
23
  the tile in the browser, installs it with MapLibre's public `addImage` API,
23
- and provides the corresponding `fill-pattern` value. It does not patch or
24
- fork MapLibre.
24
+ and provides the corresponding `fill-pattern` value.
25
25
 
26
26
  ## What can I make with it?
27
27
 
@@ -30,6 +30,47 @@ fork MapLibre.
30
30
  - SVG fills: repeat one of the bundled symbols or bring your own SVG.
31
31
  - A background colour and polygon outline to go with the pattern.
32
32
 
33
+ ### Examples
34
+
35
+ <table>
36
+ <tr>
37
+ <td align="center" width="25%">
38
+ <img src="./assets/readme/example-solid.png" alt="Polygon with a solid fill" width="100%"><br>
39
+ <sub><em>Solid</em></sub>
40
+ </td>
41
+ <td align="center" width="25%">
42
+ <img src="./assets/readme/example-stipple.png" alt="Polygon filled with a stipple pattern" width="100%"><br>
43
+ <sub><em>Stipple</em></sub>
44
+ </td>
45
+ <td align="center" width="25%">
46
+ <img src="./assets/readme/example-hatches.png" alt="Polygon filled with diagonal hatches" width="100%"><br>
47
+ <sub><em>Hatches</em></sub>
48
+ </td>
49
+ <td align="center" width="25%">
50
+ <img src="./assets/readme/example-dots.png" alt="Polygon filled with a regular dot pattern" width="100%"><br>
51
+ <sub><em>Dots</em></sub>
52
+ </td>
53
+ </tr>
54
+ <tr>
55
+ <td align="center" width="25%">
56
+ <img src="./assets/readme/example-grid.png" alt="Polygon filled with a grid pattern" width="100%"><br>
57
+ <sub><em>Grid</em></sub>
58
+ </td>
59
+ <td align="center" width="25%">
60
+ <img src="./assets/readme/example-font-fill.png" alt="Polygon filled with repeated text" width="100%"><br>
61
+ <sub><em>Font fill</em></sub>
62
+ </td>
63
+ <td align="center" width="25%">
64
+ <img src="./assets/readme/example-svg-symbol.png" alt="Polygon filled with a bundled SVG motif" width="100%"><br>
65
+ <sub><em>SVG fill</em></sub>
66
+ </td>
67
+ <td align="center" width="25%">
68
+ <img src="./assets/readme/example-custom-svg.png" alt="Polygon filled with a custom SVG motif" width="100%"><br>
69
+ <sub><em>Or even your custom SVG</em></sub>
70
+ </td>
71
+ </tr>
72
+ </table>
73
+
33
74
  You can change the colour, opacity, spacing, weight, angle, scale, and layout.
34
75
  Font fills also let you choose the typeface, style, and letter spacing. SVG
35
76
  fills can use regular rows, offset rows, or a more natural-looking seeded
@@ -39,7 +80,6 @@ The playground includes 34 SVG motifs covering vegetation, trees,
39
80
  agriculture, water, terrain, land use, and simple shapes. The same seed always
40
81
  produces the same arrangement.
41
82
 
42
- <!-- Add a small gallery here: geometric, font, SVG, and custom SVG. -->
43
83
 
44
84
  ## But can’t I just ask AI to do this?
45
85
 
@@ -64,16 +104,17 @@ locally in the browser and are not uploaded to a server.
64
104
 
65
105
  ### Run it locally
66
106
 
67
- To work from the source repository, install the dependencies and build the
68
- library:
107
+ From a clone of this repository, install the development dependencies and
108
+ build Stipple:
69
109
 
70
110
  ```sh
71
111
  npm install
72
112
  npm run build
73
113
  ```
74
114
 
75
- Then open the local [`demo/index.html`](./demo/index.html) file in your
76
- browser.
115
+ The repository itself is the `stipple-maplibre` package, so you do not need to
116
+ install it separately. Then open the local
117
+ [`demo/index.html`](./demo/index.html) file in your browser.
77
118
 
78
119
  ## Supported file formats
79
120
 
@@ -90,8 +131,7 @@ Formats with a known CRS are reprojected to WGS84 in the browser.
90
131
 
91
132
  ## Installation
92
133
 
93
- The npm package is being prepared for its first release and is not published
94
- yet. Once it is available, install it alongside MapLibre GL JS:
134
+ Install the package alongside MapLibre GL JS:
95
135
 
96
136
  ```sh
97
137
  npm install stipple-maplibre maplibre-gl
@@ -118,7 +158,7 @@ map.on("load", () => {
118
158
  syncPatternTexture(map, {
119
159
  imageId: "my-hatches",
120
160
  pattern: "hachures",
121
- size: 16,
161
+ size: 33,
122
162
  color: "#2c6a5b",
123
163
  weight: 2,
124
164
  angle: 45,
@@ -281,8 +321,9 @@ in Node.
281
321
 
282
322
  ## Project status
283
323
 
284
- Version `0.1.0` is functional and being prepared for its first npm release.
285
- The whole-symbol scatter API is the only part currently marked experimental.
324
+ Version `0.2.0` is available on
325
+ [npm](https://www.npmjs.com/package/stipple-maplibre). The whole-symbol
326
+ scatter API is the only part currently marked experimental.
286
327
 
287
328
  ## Licence
288
329
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stipple-maplibre",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Runtime-generated geometric and SVG fill patterns for MapLibre GL JS, with deterministic styling and a visual playground.",
5
5
  "license": "MIT",
6
6
  "type": "module",