@mathzetta/qblur 0.2.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0
4
+
5
+ - **`away`** in filters: how far each pixel is from the selection, in pixels (0 inside it, and everywhere when nothing
6
+ is selected). The runners make it from the `selection` picture themselves, only for a filter that uses it: the exact
7
+ Euclidean distance transform (Felzenszwalb & Huttenlocher), measured at most `AWAY_SIZE` (512) on the long side.
8
+ New exports for making it elsewhere: `awayPicture`, `encodeAway`, `distanceTo`, `awayFromChannels`, `usesAway`,
9
+ `AWAY_SIZE`. Needs mathzetta 1.5.0 (`away` in `filterShader`): the peer range is now `^1.5.0`.
10
+ - Two built-in filters use it: "Glow round the selection" and "Blur away from the selection".
11
+ - The site: Color splash is on hold (its code stays in `demo/splash/`, unlisted); the profile picture, Make it move
12
+ and Fancy text apps were reworked, with a shared `kit.js`; a new sample portrait.
13
+
3
14
  ## 0.2.0
4
15
 
5
16
  - American spelling everywhere people read it (color, gray, center, neighborhood, math, license…): the docs, the
package/README.md CHANGED
@@ -19,7 +19,7 @@ const png = await toBlob(mine);
19
19
 
20
20
  ```html
21
21
  <qblur-image src="photo.jpg" filter="Vignette" params='{"strength": 2}' alt="…"></qblur-image>
22
- <script type="module" src="https://cdn.jsdelivr.net/npm/@mathzetta/qblur@0.2/dist/qblur-element.js"></script>
22
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@mathzetta/qblur@0.3/dist/qblur-element.js"></script>
23
23
  ```
24
24
 
25
25
  For live knobs and video, a runner of your own:
@@ -76,10 +76,10 @@ Every npm release's `dist/` is on jsDelivr (and unpkg), MathZetta's GLSL output
76
76
 
77
77
  ```html
78
78
  <script type="module">
79
- import { compileFilter, createRunner } from 'https://cdn.jsdelivr.net/npm/@mathzetta/qblur@0.2/dist/qblur.js';
79
+ import { compileFilter, createRunner } from 'https://cdn.jsdelivr.net/npm/@mathzetta/qblur@0.3/dist/qblur.js';
80
80
  </script>
81
81
  <!-- or a classic script: window.QBlur -->
82
- <script src="https://cdn.jsdelivr.net/npm/@mathzetta/qblur@0.2/dist/qblur.global.min.js"></script>
82
+ <script src="https://cdn.jsdelivr.net/npm/@mathzetta/qblur@0.3/dist/qblur.global.min.js"></script>
83
83
  ```
84
84
 
85
85
  Every build comes **with MathZetta inside or without it** (`*.external.*`). Sizes as the CDN sends them (compressed):
@@ -112,7 +112,7 @@ Publishing is `npm publish` (`prepublishOnly` runs the tests and the build).
112
112
  | `src/cpu-runner.js`, `src/cpu-worker.js` | the CPU runner (draw / drawAsync over workers) |
113
113
  | `src/auto.js` | `createRunner` / `chooseEngine`: GPU or CPU, and why |
114
114
  | `src/library.js` | `LIBRARY`: the built-in filters, each with a `group` (`GROUPS`); every one validated, compiled and round-tripped by `npm test`. Canny edges is a nine-pass chain of plain expressions |
115
- | `demo/avatar/`, `demo/splash/`, `demo/move/`, `demo/text/` | the small apps: a profile picture (framed on the person, a style, the background blurred, replaced or removed; a circle, a square or a cut-out sticker), a color splash (click colors to keep), a photo that moves (saved as a GIF or video), fancy text (letters and border each colored by a formula — gold, chrome, fire, a picture, or your own — as a transparent PNG or a GIF) — a few choices each; `npm run check:apps` |
115
+ | `demo/avatar/`, `demo/move/`, `demo/text/` (and `demo/splash/`, Color splash, on hold: not on the site) | the small apps: a profile picture (framed on the person, a style, the background blurred, replaced or removed; a circle, a square or a cut-out sticker), a color splash (click colors to keep), a photo that moves (saved as a GIF or video), fancy text (letters and border each colored by a formula — gold, chrome, fire, a picture, or your own — as a transparent PNG or a GIF) — a few choices each; `npm run check:apps` |
116
116
  | `demo/kit.js`, `demo/apps.css` | what the small apps share: open a picture, the sample photos, a filter on the GPU or CPU (`createView`), download, GIF |
117
117
  | `demo/gif.js` | a GIF decoder (all frames, delays, disposal) so GIFs play and filter frame by frame; `gifenc` (a dev dependency, bundled) writes "Save as GIF" |
118
118
  | `demo/png.js` | a PNG writer for what the browser's cannot do: indexed (1/2/4/8-bit) when the picture has few colors, RGB when nothing is transparent, forced palettes with dithering |