@zakkster/lite-tools 2.0.1 → 2.0.3
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/LiteEngine.d.ts +1 -1
- package/LiteEngine.js +5 -5
- package/README.md +2 -29
- package/package.json +1 -1
package/LiteEngine.d.ts
CHANGED
|
@@ -99,7 +99,7 @@ export { easeInQuad, easeOutQuad, easeInOutQuad, easeInCubic, easeOutCubic, ease
|
|
|
99
99
|
export { Tween } from '@zakkster/lite-tween';
|
|
100
100
|
export { SpringStandalone, SpringPool } from '@zakkster/lite-spring';
|
|
101
101
|
export { Gradient } from '@zakkster/lite-gradient';
|
|
102
|
-
export {
|
|
102
|
+
export { seedNoise, simplex2, simplex3, fbm2, fbm3, curl2 } from '@zakkster/lite-noise';
|
|
103
103
|
export { Timeline } from '@zakkster/lite-timeline';
|
|
104
104
|
|
|
105
105
|
// Interaction + utility
|
package/LiteEngine.js
CHANGED
|
@@ -98,7 +98,7 @@ export {
|
|
|
98
98
|
export {Tween} from '@zakkster/lite-tween';
|
|
99
99
|
export {SpringStandalone, SpringPool} from '@zakkster/lite-spring';
|
|
100
100
|
export {Gradient} from '@zakkster/lite-gradient';
|
|
101
|
-
export {
|
|
101
|
+
export {seedNoise, simplex2, simplex3, fbm2, fbm3, curl2} from '@zakkster/lite-noise';
|
|
102
102
|
export {Timeline} from '@zakkster/lite-timeline';
|
|
103
103
|
|
|
104
104
|
// Interaction + utility
|
|
@@ -163,7 +163,7 @@ import {easeOutCubic, easeOutElastic, easeInOutCubic, easeOutBounce, easeOutBack
|
|
|
163
163
|
import {Tween} from '@zakkster/lite-tween';
|
|
164
164
|
import {SpringPool} from '@zakkster/lite-spring';
|
|
165
165
|
import {Gradient} from '@zakkster/lite-gradient';
|
|
166
|
-
import {
|
|
166
|
+
import {seedNoise, fbm2} from '@zakkster/lite-noise';
|
|
167
167
|
import {Timeline} from '@zakkster/lite-timeline';
|
|
168
168
|
import {GestureRecognizer} from '@zakkster/lite-gesture';
|
|
169
169
|
import {confetti as confettiFn} from '@zakkster/lite-confetti';
|
|
@@ -1015,7 +1015,7 @@ export const Recipes = {
|
|
|
1015
1015
|
const {seed = 42, cellSize = 8, scale = 0.02} = options;
|
|
1016
1016
|
const ctx = canvas.getContext('2d');
|
|
1017
1017
|
const rng = new Random(seed);
|
|
1018
|
-
|
|
1018
|
+
seedNoise(seed);
|
|
1019
1019
|
const cam = new Camera({smoothing: 0.08, deadzone: 40});
|
|
1020
1020
|
const gradient = new Gradient([
|
|
1021
1021
|
{l: 0.2, c: 0.15, h: 220}, // deep water
|
|
@@ -1040,7 +1040,7 @@ export const Recipes = {
|
|
|
1040
1040
|
for (let c = 0; c < cols; c++) {
|
|
1041
1041
|
const wx = (offX + c) * scale;
|
|
1042
1042
|
const wy = (offY + r) * scale;
|
|
1043
|
-
const n =
|
|
1043
|
+
const n = fbm2(wx, wy, 5, 2.0, 0.5) * 0.5 + 0.5;
|
|
1044
1044
|
const color = gradient.at(clamp(n, 0, 1));
|
|
1045
1045
|
ctx.fillStyle = toCssOklch(color);
|
|
1046
1046
|
ctx.fillRect((c - (camX / cellSize - offX)) * cellSize, (r - (camY / cellSize - offY)) * cellSize, cellSize + 1, cellSize + 1);
|
|
@@ -1054,7 +1054,7 @@ export const Recipes = {
|
|
|
1054
1054
|
target = {x, y};
|
|
1055
1055
|
},
|
|
1056
1056
|
reseed(s) {
|
|
1057
|
-
|
|
1057
|
+
seedNoise(s);
|
|
1058
1058
|
},
|
|
1059
1059
|
destroy() {
|
|
1060
1060
|
},
|
package/README.md
CHANGED
|
@@ -7,36 +7,9 @@
|
|
|
7
7
|

|
|
8
8
|
[](https://opensource.org/licenses/MIT)
|
|
9
9
|
|
|
10
|
-
The standard library for high-performance web presentation.
|
|
10
|
+
The standard library for high-performance web presentation.
|
|
11
11
|
|
|
12
|
-
**Stop installing 500KB of frameworks just to make your website feel alive.** LiteTools gives you GSAP-level scroll reveals, Framer-level magnetic physics, Three.js-level particle engines, Tailwind-level color generation
|
|
13
|
-
|
|
14
|
-
**[→ Live Recipes Gallery Demo](https://codepen.io/Zahari-Shinikchiev/full/qEarjVG)**
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Changelog
|
|
19
|
-
|
|
20
|
-
### v2.0.0
|
|
21
|
-
|
|
22
|
-
**28 new dependencies. 10 new recipes. Full game development layer.**
|
|
23
|
-
|
|
24
|
-
**Animation Primitives:**
|
|
25
|
-
`lite-ease` (31 Penner curves), `lite-tween` (SoA declarative tweening), `lite-spring` (SpringPool with per-spring stiffness/damping), `lite-gradient` (zero-GC OKLCH N-stop gradients), `lite-noise` (seeded Simplex 2D/3D + FBM + curl), `lite-timeline` (GSAP-style sequence runner)
|
|
26
|
-
|
|
27
|
-
**Interaction + Utility:**
|
|
28
|
-
`lite-gesture` (multi-touch pan/pinch/velocity), `lite-confetti` (deterministic OKLCH confetti, 5 shapes, reduced-motion), `lite-id` (seedable nanoid alternative), `lite-vec` (Float32Array 2D vector math), `lite-steer` (boids, seek, flee, wander, path follow)
|
|
29
|
-
|
|
30
|
-
**Game Layer:**
|
|
31
|
-
`lite-bmfont` (O(1) kerning bitmap font), `lite-gamepad` (unified keyboard + gamepad), `lite-camera` (cinematic 2D camera with shake), `lite-spatial` (spatial hash grid), `lite-sat` (SAT polygon collision + MTV), `lite-path` (A* pathfinding), `lite-shadow` (2D visibility casting), `lite-wfc` (wave function collapse), `lite-audio-pool` (Web Audio sprite pool)
|
|
32
|
-
|
|
33
|
-
**VFX Engines (composable weather/fire system):**
|
|
34
|
-
`lite-fireworks` (shell → explosion), `lite-sparks` (impact + floor bounce), `lite-rain` (Z-depth parallax streaks → splashes), `lite-snow` (drift + melt ellipses, 3 presets), `lite-embers` (localized spawn + buoyancy + death hooks), `lite-smoke` (DPI-aware radial puff buffers)
|
|
35
|
-
|
|
36
|
-
**New Recipes:**
|
|
37
|
-
`retroArcadeText`, `proceduralWorld`, `dungeonGenerator`, `campfireScene`, `weatherSystem`, `boidsSimulation`, `gestureCarousel`, `timelineShowcase`, `sparkImpact`, `audioReactiveVFX`
|
|
38
|
-
|
|
39
|
-
---
|
|
12
|
+
**Stop installing 500KB of frameworks just to make your website feel alive.** LiteTools gives you GSAP-level scroll reveals, Framer-level magnetic physics, Three.js-level particle engines, and Tailwind-level color generation in a single, tree-shakeable, zero-GC toolkit.
|
|
40
13
|
|
|
41
14
|
**[→ Live Recipes Gallery Demo](https://codepen.io/Zahari-Shinikchiev/full/qEarjVG)**
|
|
42
15
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zakkster/lite-tools",
|
|
3
3
|
"author": "Zahary Shinikchiev <shinikchiev@yahoo.com>",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.3",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "The standard library for high-performance web presentation — 45+ micro-libraries, 24 recipes, zero-GC, deterministic, tree-shakeable.",
|
|
7
7
|
"type": "module",
|