@ml2drender/wasm 0.4.0 → 0.4.2
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.
- package/README.md +4 -3
- package/package.json +1 -1
- package/wasm/ml2drender_wasm.wasm +0 -0
package/README.md
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
**A 2D map renderer for MapLibre styles, written in Rust. It needs no GPU.** It compiles to WebAssembly and runs in browsers, Cloudflare Workers, Deno and Node.js. Node-API and Python bindings are also included.
|
|
4
4
|
|
|
5
|
-
[Live demo](https://kanahiro.github.io/ml2drender/) · [API reference](https://kanahiro.github.io/ml2drender/api/) · [Quick start](#quick-start) · [Projected CRSs](#projected-coordinate-reference-systems) · [Node.js addon](https://github.com/Kanahiro/ml2drender/tree/main/packages/ml2drender-node#readme) · [Python](https://github.com/Kanahiro/ml2drender/tree/main/crates/python#readme)
|
|
5
|
+
[Live demo](https://kanahiro.github.io/ml2drender/) · [API reference](https://kanahiro.github.io/ml2drender/api/) · [Quick start](#quick-start) · [Projected CRSs](#projected-coordinate-reference-systems) · [Node.js addon](https://github.com/Kanahiro/ml2drender/tree/main/packages/ml2drender-node#readme) · [Python](https://github.com/Kanahiro/ml2drender/tree/main/crates/python#readme) ([Colab notebook](https://colab.research.google.com/github/Kanahiro/ml2drender/blob/main/examples/python/quickstart.ipynb))
|
|
6
6
|
|
|
7
7
|
- **No GPU, no native dependencies.** It is a software rasterizer in pure Rust. It runs on `wasm32-unknown-unknown` and links no C libraries.
|
|
8
|
-
- **Faithful to MapLibre.** Bucket building, shader math and quantization are ported from MapLibre GL JS. It passes 98.
|
|
8
|
+
- **Faithful to MapLibre.** Bucket building, shader math and quantization are ported from MapLibre GL JS. It passes 98.3% of the applicable upstream render tests at GL JS's own tolerances ([conformance](#conformance)).
|
|
9
9
|
- **Any projected CRS.** It draws maps directly in a CRS given as PROJJSON: UTM, national grids (including US State Plane in feet), Albers, LAEA, polar and oblique stereographic, world maps (Equal Earth, Robinson, Mollweide, Winkel Tripel…), orthographic and geostationary views and more.
|
|
10
10
|
- **MapLibre GL JS in any CRS.** Every source of a style (vector tiles, GeoJSON, raster, DEM) can be reprojected and served on a CRS's tile grid. MapLibre GL JS can then draw the original style in that CRS, with interaction and feature queries.
|
|
11
11
|
- **Made for serverless.** The core does no network or file I/O; the host fetches everything.
|
|
@@ -226,7 +226,7 @@ The [MapLibre GL JS render tests](https://github.com/maplibre/maplibre-gl-js/tre
|
|
|
226
226
|
|
|
227
227
|
| Suite | Result |
|
|
228
228
|
|---|---|
|
|
229
|
-
| Render tests (1008 applicable) |
|
|
229
|
+
| Render tests (1008 applicable) | 991 pass / 17 fail (98.3%) |
|
|
230
230
|
| Expression tests (Style Spec, 583) | 581 pass / 2 fail (99.7%) |
|
|
231
231
|
|
|
232
232
|
The 727 tests out of scope cover 3D, pitch, non-Mercator GL projections and runtime style changes. Main known gaps:
|
|
@@ -234,6 +234,7 @@ The 727 tests out of scope cover 3D, pitch, non-Mercator GL projections and runt
|
|
|
234
234
|
- Bidirectional text and Arabic shaping. Glyphs drawn with browser fonts (TinySDF) are not available either.
|
|
235
235
|
- History-dependent placement (`prevAnchor`, CrossTileSymbolIndex). Single still images cannot reproduce it.
|
|
236
236
|
- Locale-sensitive collation, and `number-format` in locales other than en-US.
|
|
237
|
+
- Sub-pixel rounding of the GPU the reference images were drawn with (SwiftShader snaps vertices to 1/16 px). It moves a pixel row or texel in a few tests.
|
|
237
238
|
|
|
238
239
|
## Architecture
|
|
239
240
|
|
package/package.json
CHANGED
|
Binary file
|