@zakkster/lite-scratch-fx 1.5.0 → 1.5.1
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 +20 -0
- package/README.md +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/src/ScratchRecipes.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.5.1] - 2026-08-23
|
|
4
|
+
|
|
5
|
+
Cover-fade fidelity patch for `iceBreath`. Backward compatible; no API change.
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **`iceBreath` brightness ramp is now eased, matching the game's tween (B-21).** The
|
|
9
|
+
`brightness()` filter followed a linear `1 + fadeT` while the opacity one line above
|
|
10
|
+
followed the cubic `1 - fadeT^3`. GSAP applies a tween's ease to its numeric filter
|
|
11
|
+
target too, so both should share the cubic `power2.in` curve. The tick now computes
|
|
12
|
+
`ez = easeIn(fadeT)` once and drives opacity as `1 - ez` and brightness as `1 + ez`;
|
|
13
|
+
binding both writes to the same value removes the drift that caused the bug. Observable
|
|
14
|
+
change: at the fade midpoint brightness is `1.125`, not `1.5` (the cover no longer blows
|
|
15
|
+
out to near-white by mid-reveal). No allocation added; the torture gate is unchanged.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Docs: `iceBreath`/`dragonBreath` `spread` is a jet half-angle (B-22).** The catalog
|
|
19
|
+
card now states `spread` is a half-angle in radians, matching `README.md` and `llms.txt`.
|
|
20
|
+
`IceBreathRecipe({ spread: FX_CONFIG.iceBreath.spread })` doubles the cone; pass
|
|
21
|
+
`spread / 2`. No code change.
|
|
22
|
+
|
|
3
23
|
## [1.5.0] - 2026-08-23
|
|
4
24
|
|
|
5
25
|
Cover-fade fidelity, live image reveals, and additive recipe/stage knobs. Backward
|
package/README.md
CHANGED
|
@@ -274,7 +274,7 @@ current built-in look:
|
|
|
274
274
|
|
|
275
275
|
| Constant | Value | Meaning |
|
|
276
276
|
| ------------------------- | ----------------------------------------------------------- | ---------------------------------------------------- |
|
|
277
|
-
| `VERSION` | `'1.5.
|
|
277
|
+
| `VERSION` | `'1.5.1'` | Package version string (synced to package.json). |
|
|
278
278
|
| `maxParticles` (default) | `2000` | Controller / stage pool capacity. |
|
|
279
279
|
| `scanPrecision` (default) | `32` | Horizontal resolution of the spawn-point scan. |
|
|
280
280
|
| stage `capacity` (default)| `300` | Slots a stage controller reserves from the pool. |
|
package/index.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
// Three-place version sync: this constant, package.json "version", and the top
|
|
15
15
|
// CHANGELOG.md heading must always match. /release keeps them locked.
|
|
16
|
-
export const VERSION = '1.5.
|
|
16
|
+
export const VERSION = '1.5.1';
|
|
17
17
|
|
|
18
18
|
export { createScratchController } from './src/ScratchController.js';
|
|
19
19
|
export { default as ScratchController } from './src/ScratchController.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zakkster/lite-scratch-fx",
|
|
3
3
|
"author": "Zahary Shinikchiev <shinikchiev@yahoo.com>",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.1",
|
|
5
5
|
"description": "One-shot scratch-card reveal effects on canvas. A controller scans the still-covered pixels of a scratch layer, spawns particles from them, and delegates physics and rendering to a recipe. 21 themeable recipes (burn, shatter, dissolve, glitch, gold dust, cosmic dust, and more), a registry with a register hook, zero GSAP, a zero-GC hot path, deterministic seeded RNG, and a stage that runs a grid of simultaneous reveals over one shared pool.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
package/src/ScratchRecipes.js
CHANGED
|
@@ -275,8 +275,9 @@ export function IceBreathRecipe({count = 450, duration = 1500, spread = 0.225, s
|
|
|
275
275
|
const dv = Math.pow(0.96, ds);
|
|
276
276
|
let alive = 0;
|
|
277
277
|
const fadeT = clamp((elapsed - 100) / 500, 0, 1);
|
|
278
|
-
|
|
279
|
-
src.style.
|
|
278
|
+
const ez = easeIn(fadeT);
|
|
279
|
+
src.style.opacity = 1 - ez;
|
|
280
|
+
src.style.filter = `brightness(${1 + ez})`;
|
|
280
281
|
|
|
281
282
|
for (let i = 0; i < max; i++) {
|
|
282
283
|
if (life[i] <= 0) continue;
|