nucleation 0.3.9 → 0.3.10

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/Palette.d.ts CHANGED
@@ -66,6 +66,15 @@ export class Palette {
66
66
  */
67
67
  static wood(): Palette;
68
68
 
69
+ /**
70
+ * A copy of this palette with ordered dithering enabled: brushes
71
+ * snapping through it alternate between the two nearest blocks per
72
+ * voxel (4x4 Bayer threshold, deterministic in position), which
73
+ * reads as intermediate shades at a distance — the classic map-art
74
+ * trick. Ramp and list queries are unaffected.
75
+ */
76
+ dithered(): Palette;
77
+
69
78
  /**
70
79
  * A copy of this palette ordered by perceptual lightness (Oklab L,
71
80
  * dark → light). Combined with `block_ids_json`, gives a
package/Palette.mjs CHANGED
@@ -190,6 +190,26 @@ export class Palette {
190
190
  }
191
191
  }
192
192
 
193
+ /**
194
+ * A copy of this palette with ordered dithering enabled: brushes
195
+ * snapping through it alternate between the two nearest blocks per
196
+ * voxel (4x4 Bayer threshold, deterministic in position), which
197
+ * reads as intermediate shades at a distance — the classic map-art
198
+ * trick. Ramp and list queries are unaffected.
199
+ */
200
+ dithered() {
201
+
202
+ const result = wasm.Palette_dithered(this.ffiValue);
203
+
204
+ try {
205
+ return new Palette(diplomatRuntime.internalConstructor, result, []);
206
+ }
207
+
208
+ finally {
209
+ diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
210
+ }
211
+ }
212
+
193
213
  /**
194
214
  * A copy of this palette ordered by perceptual lightness (Oklab L,
195
215
  * dark → light). Combined with `block_ids_json`, gives a
package/nucleation.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nucleation",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "description": "A high-performance Minecraft schematic parser and utility library",
5
5
  "type": "module",
6
6
  "main": "index.mjs",