@reearth/ezu 0.3.0 → 0.4.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.
package/bundler/ezu.d.ts CHANGED
@@ -38,6 +38,10 @@ export class LogSink {
38
38
  /**
39
39
  * Set (or clear with `null` / `undefined`) the per-event JS
40
40
  * callback. The callback receives a structured record object.
41
+ *
42
+ * No-op in multithreaded (`threads`) builds — events can originate
43
+ * on rayon worker threads, so live forwarding to a main-thread JS
44
+ * callback isn't available. Use `drain` / `drainLines` instead.
41
45
  */
42
46
  onEvent(callback?: Function | null): void;
43
47
  /**
@@ -61,11 +65,16 @@ export class Renderer {
61
65
  * Bind raw tile bytes under a `sources.<name>` entry from the style.
62
66
  * The renderer dispatches on the source's declared `type`:
63
67
  *
64
- * - `mvt` / `pmtiles` → decode MVT layers eagerly; layers are bound
65
- * as `tile.<layer>` when [`render_tile`] runs.
66
- * - `dem` → store the raw raster-DEM bytes per `(dx, dy)` neighbour
68
+ * - `mvt` / `pmtiles` → store raw MVT bytes per `(dx, dy)` neighbour
69
+ * offset (centre `coord: [0, 0]`, the default). Layers are bound as
70
+ * `<source>.<layer>` (centre) or `<source>.<layer>@dx,dy`
71
+ * (neighbours) when [`render_tile`] runs. Binding only the centre
72
+ * degrades cross-tile label collision to centre-only at borders.
73
+ * - `dem` / `raster` → store the raw bytes per `(dx, dy)` neighbour
67
74
  * offset. The centre tile is `coord: [0, 0]` (default). Decoding
68
75
  * and 3×3 stitching happen at render time once the tile id is known.
76
+ * - `geojson` (remote) → store raw bytes per `(dx, dy)` offset;
77
+ * projected per tile (and neighbour) at render time.
69
78
  *
70
79
  * `opts` is a JS object: `{ coord?: [dx, dy] }`. Throws
71
80
  * `UnknownSource` if `name` doesn't match any entry in the style's
@@ -102,6 +111,12 @@ export class Renderer {
102
111
  * the intermediate cache and drops any pending source bindings.
103
112
  */
104
113
  setStyle(style_json: string): number;
114
+ /**
115
+ * Effective attribution declared by the style (document +
116
+ * sources), joined with ` | `. Upstream TileJSON / PMTiles
117
+ * metadata is the JS host's concern — merge it on that side.
118
+ */
119
+ readonly attribution: string | undefined;
105
120
  /**
106
121
  * `tile-size` declared by the current style.
107
122
  */
@@ -113,3 +128,11 @@ export class Renderer {
113
128
  * page label the renderer build accurately.
114
129
  */
115
130
  export function simdEnabled(): boolean;
131
+
132
+ /**
133
+ * Whether this build supports multithreaded rendering (compiled with
134
+ * the `threads` feature). When `false`, `initThreadPool` is absent and
135
+ * `renderTile`'s `parallel` option is a no-op. Mirrors `simdEnabled` so
136
+ * the host can label the build.
137
+ */
138
+ export function threadsEnabled(): boolean;
package/bundler/ezu.js CHANGED
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./ezu_bg.js";
5
5
  __wbg_set_wasm(wasm);
6
6
  wasm.__wbindgen_start();
7
7
  export {
8
- LogSink, Renderer, simdEnabled
8
+ LogSink, Renderer, simdEnabled, threadsEnabled
9
9
  } from "./ezu_bg.js";
package/bundler/ezu_bg.js CHANGED
@@ -78,6 +78,10 @@ export class LogSink {
78
78
  /**
79
79
  * Set (or clear with `null` / `undefined`) the per-event JS
80
80
  * callback. The callback receives a structured record object.
81
+ *
82
+ * No-op in multithreaded (`threads`) builds — events can originate
83
+ * on rayon worker threads, so live forwarding to a main-thread JS
84
+ * callback isn't available. Use `drain` / `drainLines` instead.
81
85
  * @param {Function | null} [callback]
82
86
  */
83
87
  onEvent(callback) {
@@ -108,15 +112,35 @@ export class Renderer {
108
112
  const ptr = this.__destroy_into_raw();
109
113
  wasm.__wbg_renderer_free(ptr, 0);
110
114
  }
115
+ /**
116
+ * Effective attribution declared by the style (document +
117
+ * sources), joined with ` | `. Upstream TileJSON / PMTiles
118
+ * metadata is the JS host's concern — merge it on that side.
119
+ * @returns {string | undefined}
120
+ */
121
+ get attribution() {
122
+ const ret = wasm.renderer_attribution(this.__wbg_ptr);
123
+ let v1;
124
+ if (ret[0] !== 0) {
125
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
126
+ wasm.__wbindgen_free_command_export(ret[0], ret[1] * 1, 1);
127
+ }
128
+ return v1;
129
+ }
111
130
  /**
112
131
  * Bind raw tile bytes under a `sources.<name>` entry from the style.
113
132
  * The renderer dispatches on the source's declared `type`:
114
133
  *
115
- * - `mvt` / `pmtiles` → decode MVT layers eagerly; layers are bound
116
- * as `tile.<layer>` when [`render_tile`] runs.
117
- * - `dem` → store the raw raster-DEM bytes per `(dx, dy)` neighbour
134
+ * - `mvt` / `pmtiles` → store raw MVT bytes per `(dx, dy)` neighbour
135
+ * offset (centre `coord: [0, 0]`, the default). Layers are bound as
136
+ * `<source>.<layer>` (centre) or `<source>.<layer>@dx,dy`
137
+ * (neighbours) when [`render_tile`] runs. Binding only the centre
138
+ * degrades cross-tile label collision to centre-only at borders.
139
+ * - `dem` / `raster` → store the raw bytes per `(dx, dy)` neighbour
118
140
  * offset. The centre tile is `coord: [0, 0]` (default). Decoding
119
141
  * and 3×3 stitching happen at render time once the tile id is known.
142
+ * - `geojson` (remote) → store raw bytes per `(dx, dy)` offset;
143
+ * projected per tile (and neighbour) at render time.
120
144
  *
121
145
  * `opts` is a JS object: `{ coord?: [dx, dy] }`. Throws
122
146
  * `UnknownSource` if `name` doesn't match any entry in the style's
@@ -227,6 +251,23 @@ export function simdEnabled() {
227
251
  const ret = wasm.simdEnabled();
228
252
  return ret !== 0;
229
253
  }
254
+
255
+ /**
256
+ * Whether this build supports multithreaded rendering (compiled with
257
+ * the `threads` feature). When `false`, `initThreadPool` is absent and
258
+ * `renderTile`'s `parallel` option is a no-op. Mirrors `simdEnabled` so
259
+ * the host can label the build.
260
+ * @returns {boolean}
261
+ */
262
+ export function threadsEnabled() {
263
+ const ret = wasm.threadsEnabled();
264
+ return ret !== 0;
265
+ }
266
+ export function __wbg___wbindgen_boolean_get_2304fb8c853028c8(arg0) {
267
+ const v = arg0;
268
+ const ret = typeof(v) === 'boolean' ? v : undefined;
269
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
270
+ }
230
271
  export function __wbg___wbindgen_is_null_2042690d351e14f0(arg0) {
231
272
  const ret = arg0 === null;
232
273
  return ret;
Binary file
@@ -11,6 +11,7 @@ export const logsink_len: (a: number) => number;
11
11
  export const logsink_new: (a: number, b: number) => [number, number, number];
12
12
  export const logsink_onEvent: (a: number, b: number) => void;
13
13
  export const logsink_setCapacity: (a: number, b: number) => void;
14
+ export const renderer_attribution: (a: number) => [number, number];
14
15
  export const renderer_bindSource: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
15
16
  export const renderer_boundSources: (a: number) => [number, number];
16
17
  export const renderer_clearSources: (a: number) => void;
@@ -19,6 +20,7 @@ export const renderer_renderTile: (a: number, b: number, c: number, d: number, e
19
20
  export const renderer_setStyle: (a: number, b: number, c: number) => [number, number, number];
20
21
  export const renderer_tileSize: (a: number) => number;
21
22
  export const simdEnabled: () => number;
23
+ export const threadsEnabled: () => number;
22
24
  export const __wbindgen_malloc_command_export: (a: number, b: number) => number;
23
25
  export const __wbindgen_realloc_command_export: (a: number, b: number, c: number, d: number) => number;
24
26
  export const __wbindgen_exn_store_command_export: (a: number) => void;
package/nodejs/ezu.d.ts CHANGED
@@ -38,6 +38,10 @@ export class LogSink {
38
38
  /**
39
39
  * Set (or clear with `null` / `undefined`) the per-event JS
40
40
  * callback. The callback receives a structured record object.
41
+ *
42
+ * No-op in multithreaded (`threads`) builds — events can originate
43
+ * on rayon worker threads, so live forwarding to a main-thread JS
44
+ * callback isn't available. Use `drain` / `drainLines` instead.
41
45
  */
42
46
  onEvent(callback?: Function | null): void;
43
47
  /**
@@ -61,11 +65,16 @@ export class Renderer {
61
65
  * Bind raw tile bytes under a `sources.<name>` entry from the style.
62
66
  * The renderer dispatches on the source's declared `type`:
63
67
  *
64
- * - `mvt` / `pmtiles` → decode MVT layers eagerly; layers are bound
65
- * as `tile.<layer>` when [`render_tile`] runs.
66
- * - `dem` → store the raw raster-DEM bytes per `(dx, dy)` neighbour
68
+ * - `mvt` / `pmtiles` → store raw MVT bytes per `(dx, dy)` neighbour
69
+ * offset (centre `coord: [0, 0]`, the default). Layers are bound as
70
+ * `<source>.<layer>` (centre) or `<source>.<layer>@dx,dy`
71
+ * (neighbours) when [`render_tile`] runs. Binding only the centre
72
+ * degrades cross-tile label collision to centre-only at borders.
73
+ * - `dem` / `raster` → store the raw bytes per `(dx, dy)` neighbour
67
74
  * offset. The centre tile is `coord: [0, 0]` (default). Decoding
68
75
  * and 3×3 stitching happen at render time once the tile id is known.
76
+ * - `geojson` (remote) → store raw bytes per `(dx, dy)` offset;
77
+ * projected per tile (and neighbour) at render time.
69
78
  *
70
79
  * `opts` is a JS object: `{ coord?: [dx, dy] }`. Throws
71
80
  * `UnknownSource` if `name` doesn't match any entry in the style's
@@ -102,6 +111,12 @@ export class Renderer {
102
111
  * the intermediate cache and drops any pending source bindings.
103
112
  */
104
113
  setStyle(style_json: string): number;
114
+ /**
115
+ * Effective attribution declared by the style (document +
116
+ * sources), joined with ` | `. Upstream TileJSON / PMTiles
117
+ * metadata is the JS host's concern — merge it on that side.
118
+ */
119
+ readonly attribution: string | undefined;
105
120
  /**
106
121
  * `tile-size` declared by the current style.
107
122
  */
@@ -113,3 +128,11 @@ export class Renderer {
113
128
  * page label the renderer build accurately.
114
129
  */
115
130
  export function simdEnabled(): boolean;
131
+
132
+ /**
133
+ * Whether this build supports multithreaded rendering (compiled with
134
+ * the `threads` feature). When `false`, `initThreadPool` is absent and
135
+ * `renderTile`'s `parallel` option is a no-op. Mirrors `simdEnabled` so
136
+ * the host can label the build.
137
+ */
138
+ export function threadsEnabled(): boolean;
package/nodejs/ezu.js CHANGED
@@ -80,6 +80,10 @@ class LogSink {
80
80
  /**
81
81
  * Set (or clear with `null` / `undefined`) the per-event JS
82
82
  * callback. The callback receives a structured record object.
83
+ *
84
+ * No-op in multithreaded (`threads`) builds — events can originate
85
+ * on rayon worker threads, so live forwarding to a main-thread JS
86
+ * callback isn't available. Use `drain` / `drainLines` instead.
83
87
  * @param {Function | null} [callback]
84
88
  */
85
89
  onEvent(callback) {
@@ -111,15 +115,35 @@ class Renderer {
111
115
  const ptr = this.__destroy_into_raw();
112
116
  wasm.__wbg_renderer_free(ptr, 0);
113
117
  }
118
+ /**
119
+ * Effective attribution declared by the style (document +
120
+ * sources), joined with ` | `. Upstream TileJSON / PMTiles
121
+ * metadata is the JS host's concern — merge it on that side.
122
+ * @returns {string | undefined}
123
+ */
124
+ get attribution() {
125
+ const ret = wasm.renderer_attribution(this.__wbg_ptr);
126
+ let v1;
127
+ if (ret[0] !== 0) {
128
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
129
+ wasm.__wbindgen_free_command_export(ret[0], ret[1] * 1, 1);
130
+ }
131
+ return v1;
132
+ }
114
133
  /**
115
134
  * Bind raw tile bytes under a `sources.<name>` entry from the style.
116
135
  * The renderer dispatches on the source's declared `type`:
117
136
  *
118
- * - `mvt` / `pmtiles` → decode MVT layers eagerly; layers are bound
119
- * as `tile.<layer>` when [`render_tile`] runs.
120
- * - `dem` → store the raw raster-DEM bytes per `(dx, dy)` neighbour
137
+ * - `mvt` / `pmtiles` → store raw MVT bytes per `(dx, dy)` neighbour
138
+ * offset (centre `coord: [0, 0]`, the default). Layers are bound as
139
+ * `<source>.<layer>` (centre) or `<source>.<layer>@dx,dy`
140
+ * (neighbours) when [`render_tile`] runs. Binding only the centre
141
+ * degrades cross-tile label collision to centre-only at borders.
142
+ * - `dem` / `raster` → store the raw bytes per `(dx, dy)` neighbour
121
143
  * offset. The centre tile is `coord: [0, 0]` (default). Decoding
122
144
  * and 3×3 stitching happen at render time once the tile id is known.
145
+ * - `geojson` (remote) → store raw bytes per `(dx, dy)` offset;
146
+ * projected per tile (and neighbour) at render time.
123
147
  *
124
148
  * `opts` is a JS object: `{ coord?: [dx, dy] }`. Throws
125
149
  * `UnknownSource` if `name` doesn't match any entry in the style's
@@ -232,9 +256,27 @@ function simdEnabled() {
232
256
  return ret !== 0;
233
257
  }
234
258
  exports.simdEnabled = simdEnabled;
259
+
260
+ /**
261
+ * Whether this build supports multithreaded rendering (compiled with
262
+ * the `threads` feature). When `false`, `initThreadPool` is absent and
263
+ * `renderTile`'s `parallel` option is a no-op. Mirrors `simdEnabled` so
264
+ * the host can label the build.
265
+ * @returns {boolean}
266
+ */
267
+ function threadsEnabled() {
268
+ const ret = wasm.threadsEnabled();
269
+ return ret !== 0;
270
+ }
271
+ exports.threadsEnabled = threadsEnabled;
235
272
  function __wbg_get_imports() {
236
273
  const import0 = {
237
274
  __proto__: null,
275
+ __wbg___wbindgen_boolean_get_2304fb8c853028c8: function(arg0) {
276
+ const v = arg0;
277
+ const ret = typeof(v) === 'boolean' ? v : undefined;
278
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
279
+ },
238
280
  __wbg___wbindgen_is_null_2042690d351e14f0: function(arg0) {
239
281
  const ret = arg0 === null;
240
282
  return ret;
Binary file
@@ -11,6 +11,7 @@ export const logsink_len: (a: number) => number;
11
11
  export const logsink_new: (a: number, b: number) => [number, number, number];
12
12
  export const logsink_onEvent: (a: number, b: number) => void;
13
13
  export const logsink_setCapacity: (a: number, b: number) => void;
14
+ export const renderer_attribution: (a: number) => [number, number];
14
15
  export const renderer_bindSource: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
15
16
  export const renderer_boundSources: (a: number) => [number, number];
16
17
  export const renderer_clearSources: (a: number) => void;
@@ -19,6 +20,7 @@ export const renderer_renderTile: (a: number, b: number, c: number, d: number, e
19
20
  export const renderer_setStyle: (a: number, b: number, c: number) => [number, number, number];
20
21
  export const renderer_tileSize: (a: number) => number;
21
22
  export const simdEnabled: () => number;
23
+ export const threadsEnabled: () => number;
22
24
  export const __wbindgen_malloc_command_export: (a: number, b: number) => number;
23
25
  export const __wbindgen_realloc_command_export: (a: number, b: number, c: number, d: number) => number;
24
26
  export const __wbindgen_exn_store_command_export: (a: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reearth/ezu",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Painterly map renderer — WebAssembly bindings",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "repository": {
package/web/ezu.d.ts CHANGED
@@ -38,6 +38,10 @@ export class LogSink {
38
38
  /**
39
39
  * Set (or clear with `null` / `undefined`) the per-event JS
40
40
  * callback. The callback receives a structured record object.
41
+ *
42
+ * No-op in multithreaded (`threads`) builds — events can originate
43
+ * on rayon worker threads, so live forwarding to a main-thread JS
44
+ * callback isn't available. Use `drain` / `drainLines` instead.
41
45
  */
42
46
  onEvent(callback?: Function | null): void;
43
47
  /**
@@ -61,11 +65,16 @@ export class Renderer {
61
65
  * Bind raw tile bytes under a `sources.<name>` entry from the style.
62
66
  * The renderer dispatches on the source's declared `type`:
63
67
  *
64
- * - `mvt` / `pmtiles` → decode MVT layers eagerly; layers are bound
65
- * as `tile.<layer>` when [`render_tile`] runs.
66
- * - `dem` → store the raw raster-DEM bytes per `(dx, dy)` neighbour
68
+ * - `mvt` / `pmtiles` → store raw MVT bytes per `(dx, dy)` neighbour
69
+ * offset (centre `coord: [0, 0]`, the default). Layers are bound as
70
+ * `<source>.<layer>` (centre) or `<source>.<layer>@dx,dy`
71
+ * (neighbours) when [`render_tile`] runs. Binding only the centre
72
+ * degrades cross-tile label collision to centre-only at borders.
73
+ * - `dem` / `raster` → store the raw bytes per `(dx, dy)` neighbour
67
74
  * offset. The centre tile is `coord: [0, 0]` (default). Decoding
68
75
  * and 3×3 stitching happen at render time once the tile id is known.
76
+ * - `geojson` (remote) → store raw bytes per `(dx, dy)` offset;
77
+ * projected per tile (and neighbour) at render time.
69
78
  *
70
79
  * `opts` is a JS object: `{ coord?: [dx, dy] }`. Throws
71
80
  * `UnknownSource` if `name` doesn't match any entry in the style's
@@ -102,6 +111,12 @@ export class Renderer {
102
111
  * the intermediate cache and drops any pending source bindings.
103
112
  */
104
113
  setStyle(style_json: string): number;
114
+ /**
115
+ * Effective attribution declared by the style (document +
116
+ * sources), joined with ` | `. Upstream TileJSON / PMTiles
117
+ * metadata is the JS host's concern — merge it on that side.
118
+ */
119
+ readonly attribution: string | undefined;
105
120
  /**
106
121
  * `tile-size` declared by the current style.
107
122
  */
@@ -114,6 +129,14 @@ export class Renderer {
114
129
  */
115
130
  export function simdEnabled(): boolean;
116
131
 
132
+ /**
133
+ * Whether this build supports multithreaded rendering (compiled with
134
+ * the `threads` feature). When `false`, `initThreadPool` is absent and
135
+ * `renderTile`'s `parallel` option is a no-op. Mirrors `simdEnabled` so
136
+ * the host can label the build.
137
+ */
138
+ export function threadsEnabled(): boolean;
139
+
117
140
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
118
141
 
119
142
  export interface InitOutput {
@@ -128,6 +151,7 @@ export interface InitOutput {
128
151
  readonly logsink_new: (a: number, b: number) => [number, number, number];
129
152
  readonly logsink_onEvent: (a: number, b: number) => void;
130
153
  readonly logsink_setCapacity: (a: number, b: number) => void;
154
+ readonly renderer_attribution: (a: number) => [number, number];
131
155
  readonly renderer_bindSource: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
132
156
  readonly renderer_boundSources: (a: number) => [number, number];
133
157
  readonly renderer_clearSources: (a: number) => void;
@@ -136,6 +160,7 @@ export interface InitOutput {
136
160
  readonly renderer_setStyle: (a: number, b: number, c: number) => [number, number, number];
137
161
  readonly renderer_tileSize: (a: number) => number;
138
162
  readonly simdEnabled: () => number;
163
+ readonly threadsEnabled: () => number;
139
164
  readonly __wbindgen_malloc_command_export: (a: number, b: number) => number;
140
165
  readonly __wbindgen_realloc_command_export: (a: number, b: number, c: number, d: number) => number;
141
166
  readonly __wbindgen_exn_store_command_export: (a: number) => void;
package/web/ezu.js CHANGED
@@ -80,6 +80,10 @@ export class LogSink {
80
80
  /**
81
81
  * Set (or clear with `null` / `undefined`) the per-event JS
82
82
  * callback. The callback receives a structured record object.
83
+ *
84
+ * No-op in multithreaded (`threads`) builds — events can originate
85
+ * on rayon worker threads, so live forwarding to a main-thread JS
86
+ * callback isn't available. Use `drain` / `drainLines` instead.
83
87
  * @param {Function | null} [callback]
84
88
  */
85
89
  onEvent(callback) {
@@ -110,15 +114,35 @@ export class Renderer {
110
114
  const ptr = this.__destroy_into_raw();
111
115
  wasm.__wbg_renderer_free(ptr, 0);
112
116
  }
117
+ /**
118
+ * Effective attribution declared by the style (document +
119
+ * sources), joined with ` | `. Upstream TileJSON / PMTiles
120
+ * metadata is the JS host's concern — merge it on that side.
121
+ * @returns {string | undefined}
122
+ */
123
+ get attribution() {
124
+ const ret = wasm.renderer_attribution(this.__wbg_ptr);
125
+ let v1;
126
+ if (ret[0] !== 0) {
127
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
128
+ wasm.__wbindgen_free_command_export(ret[0], ret[1] * 1, 1);
129
+ }
130
+ return v1;
131
+ }
113
132
  /**
114
133
  * Bind raw tile bytes under a `sources.<name>` entry from the style.
115
134
  * The renderer dispatches on the source's declared `type`:
116
135
  *
117
- * - `mvt` / `pmtiles` → decode MVT layers eagerly; layers are bound
118
- * as `tile.<layer>` when [`render_tile`] runs.
119
- * - `dem` → store the raw raster-DEM bytes per `(dx, dy)` neighbour
136
+ * - `mvt` / `pmtiles` → store raw MVT bytes per `(dx, dy)` neighbour
137
+ * offset (centre `coord: [0, 0]`, the default). Layers are bound as
138
+ * `<source>.<layer>` (centre) or `<source>.<layer>@dx,dy`
139
+ * (neighbours) when [`render_tile`] runs. Binding only the centre
140
+ * degrades cross-tile label collision to centre-only at borders.
141
+ * - `dem` / `raster` → store the raw bytes per `(dx, dy)` neighbour
120
142
  * offset. The centre tile is `coord: [0, 0]` (default). Decoding
121
143
  * and 3×3 stitching happen at render time once the tile id is known.
144
+ * - `geojson` (remote) → store raw bytes per `(dx, dy)` offset;
145
+ * projected per tile (and neighbour) at render time.
122
146
  *
123
147
  * `opts` is a JS object: `{ coord?: [dx, dy] }`. Throws
124
148
  * `UnknownSource` if `name` doesn't match any entry in the style's
@@ -229,9 +253,26 @@ export function simdEnabled() {
229
253
  const ret = wasm.simdEnabled();
230
254
  return ret !== 0;
231
255
  }
256
+
257
+ /**
258
+ * Whether this build supports multithreaded rendering (compiled with
259
+ * the `threads` feature). When `false`, `initThreadPool` is absent and
260
+ * `renderTile`'s `parallel` option is a no-op. Mirrors `simdEnabled` so
261
+ * the host can label the build.
262
+ * @returns {boolean}
263
+ */
264
+ export function threadsEnabled() {
265
+ const ret = wasm.threadsEnabled();
266
+ return ret !== 0;
267
+ }
232
268
  function __wbg_get_imports() {
233
269
  const import0 = {
234
270
  __proto__: null,
271
+ __wbg___wbindgen_boolean_get_2304fb8c853028c8: function(arg0) {
272
+ const v = arg0;
273
+ const ret = typeof(v) === 'boolean' ? v : undefined;
274
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
275
+ },
235
276
  __wbg___wbindgen_is_null_2042690d351e14f0: function(arg0) {
236
277
  const ret = arg0 === null;
237
278
  return ret;
package/web/ezu_bg.wasm CHANGED
Binary file
@@ -11,6 +11,7 @@ export const logsink_len: (a: number) => number;
11
11
  export const logsink_new: (a: number, b: number) => [number, number, number];
12
12
  export const logsink_onEvent: (a: number, b: number) => void;
13
13
  export const logsink_setCapacity: (a: number, b: number) => void;
14
+ export const renderer_attribution: (a: number) => [number, number];
14
15
  export const renderer_bindSource: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
15
16
  export const renderer_boundSources: (a: number) => [number, number];
16
17
  export const renderer_clearSources: (a: number) => void;
@@ -19,6 +20,7 @@ export const renderer_renderTile: (a: number, b: number, c: number, d: number, e
19
20
  export const renderer_setStyle: (a: number, b: number, c: number) => [number, number, number];
20
21
  export const renderer_tileSize: (a: number) => number;
21
22
  export const simdEnabled: () => number;
23
+ export const threadsEnabled: () => number;
22
24
  export const __wbindgen_malloc_command_export: (a: number, b: number) => number;
23
25
  export const __wbindgen_realloc_command_export: (a: number, b: number, c: number, d: number) => number;
24
26
  export const __wbindgen_exn_store_command_export: (a: number) => void;