@zakkster/lite-tools 2.0.7 → 2.0.9
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 +3 -3
- package/LiteEngine.js +7 -7
- package/README.md +3 -3
- package/package.json +1 -1
package/LiteEngine.d.ts
CHANGED
|
@@ -100,7 +100,7 @@ export { Tween } from '@zakkster/lite-tween';
|
|
|
100
100
|
export { SpringStandalone, SpringPool } from '@zakkster/lite-spring';
|
|
101
101
|
export { Gradient } from '@zakkster/lite-gradient';
|
|
102
102
|
export { seedNoise, simplex2, simplex3, fbm2, fbm3, curl2 } from '@zakkster/lite-noise';
|
|
103
|
-
export {
|
|
103
|
+
export { createTimeline } from '@zakkster/lite-timeline';
|
|
104
104
|
|
|
105
105
|
// Interaction + utility
|
|
106
106
|
export { GestureTracker } from '@zakkster/lite-gesture';
|
|
@@ -115,7 +115,7 @@ export { InputPoller } from '@zakkster/lite-gamepad';
|
|
|
115
115
|
export { CinematicCamera } from '@zakkster/lite-camera';
|
|
116
116
|
export { SpatialHash } from '@zakkster/lite-spatial';
|
|
117
117
|
export { testPolygonPolygon, translatePoly, rotatePoly } from '@zakkster/lite-sat';
|
|
118
|
-
export {
|
|
118
|
+
export { Pathfinder } from '@zakkster/lite-path';
|
|
119
119
|
export { ShadowCaster } from '@zakkster/lite-shadow';
|
|
120
120
|
export { WFC } from '@zakkster/lite-wfc';
|
|
121
121
|
export { AudioPool } from '@zakkster/lite-audio-pool';
|
|
@@ -155,7 +155,7 @@ import type {SnowEngine} from '@zakkster/lite-snow';
|
|
|
155
155
|
import type {SparkEngine} from '@zakkster/lite-sparks';
|
|
156
156
|
import type {FireworksEngine} from '@zakkster/lite-fireworks';
|
|
157
157
|
import type {GestureTracker} from '@zakkster/lite-gesture';
|
|
158
|
-
import type {
|
|
158
|
+
import type {createTimeline} from '@zakkster/lite-timeline';
|
|
159
159
|
|
|
160
160
|
/** All recipes return at least a destroy() method. */
|
|
161
161
|
interface Destroyable {
|
package/LiteEngine.js
CHANGED
|
@@ -99,7 +99,7 @@ export {Tween} from '@zakkster/lite-tween';
|
|
|
99
99
|
export {SpringStandalone, SpringPool} from '@zakkster/lite-spring';
|
|
100
100
|
export {Gradient} from '@zakkster/lite-gradient';
|
|
101
101
|
export {seedNoise, simplex2, simplex3, fbm2, fbm3, curl2} from '@zakkster/lite-noise';
|
|
102
|
-
export {
|
|
102
|
+
export {createTimeline} from '@zakkster/lite-timeline';
|
|
103
103
|
|
|
104
104
|
// Interaction + utility
|
|
105
105
|
export {GestureTracker} from '@zakkster/lite-gesture';
|
|
@@ -116,7 +116,7 @@ export {InputPoller} from '@zakkster/lite-gamepad';
|
|
|
116
116
|
export {CinematicCamera} from '@zakkster/lite-camera';
|
|
117
117
|
export {SpatialHash} from '@zakkster/lite-spatial';
|
|
118
118
|
export {testPolygonPolygon, translatePoly, rotatePoly} from '@zakkster/lite-sat';
|
|
119
|
-
export {
|
|
119
|
+
export {Pathfinder} from '@zakkster/lite-path';
|
|
120
120
|
export {ShadowCaster} from '@zakkster/lite-shadow';
|
|
121
121
|
export {WFC} from '@zakkster/lite-wfc';
|
|
122
122
|
export {AudioPool} from '@zakkster/lite-audio-pool';
|
|
@@ -164,7 +164,7 @@ import {Tween} from '@zakkster/lite-tween';
|
|
|
164
164
|
import {SpringPool} from '@zakkster/lite-spring';
|
|
165
165
|
import {Gradient} from '@zakkster/lite-gradient';
|
|
166
166
|
import {seedNoise, fbm2} from '@zakkster/lite-noise';
|
|
167
|
-
import {
|
|
167
|
+
import {createTimeline} from '@zakkster/lite-timeline';
|
|
168
168
|
import {GestureTracker} from '@zakkster/lite-gesture';
|
|
169
169
|
import {confetti as confettiFn} from '@zakkster/lite-confetti';
|
|
170
170
|
import {liteId} from '@zakkster/lite-id';
|
|
@@ -174,7 +174,7 @@ import {BitmapFont} from '@zakkster/lite-bmfont';
|
|
|
174
174
|
import {InputPoller} from '@zakkster/lite-gamepad';
|
|
175
175
|
import {CinematicCamera} from '@zakkster/lite-camera';
|
|
176
176
|
import {SpatialHash} from '@zakkster/lite-spatial';
|
|
177
|
-
import {
|
|
177
|
+
import {Pathfinder} from '@zakkster/lite-path';
|
|
178
178
|
import {WFC} from '@zakkster/lite-wfc';
|
|
179
179
|
import {AudioPool} from '@zakkster/lite-audio-pool';
|
|
180
180
|
import {FireworksEngine} from '@zakkster/lite-fireworks';
|
|
@@ -1092,7 +1092,7 @@ export const Recipes = {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
|
|
1094
1094
|
function findPath(sx, sy, ex, ey) {
|
|
1095
|
-
const finder = new
|
|
1095
|
+
const finder = new Pathfinder(width, height, (x, y) => isWalkable(x, y));
|
|
1096
1096
|
return finder.find(sx, sy, ex, ey);
|
|
1097
1097
|
}
|
|
1098
1098
|
|
|
@@ -1292,7 +1292,7 @@ export const Recipes = {
|
|
|
1292
1292
|
currentIndex = clamp(idx, 0, slides.length - 1);
|
|
1293
1293
|
const targetX = -currentIndex * slideWidth;
|
|
1294
1294
|
const startX = offsetX;
|
|
1295
|
-
const tl =
|
|
1295
|
+
const tl = createTimeline();
|
|
1296
1296
|
tl.add({
|
|
1297
1297
|
duration: 400, onUpdate(t) {
|
|
1298
1298
|
offsetX = startX + (targetX - startX) * easeOutCubic(t);
|
|
@@ -1335,7 +1335,7 @@ export const Recipes = {
|
|
|
1335
1335
|
timelineShowcase(elements, overlayCanvas, options = {}) {
|
|
1336
1336
|
const {brandColor = {l: 0.6, c: 0.25, h: 280}} = options;
|
|
1337
1337
|
const els = typeof elements === 'string' ? document.querySelectorAll(elements) : elements;
|
|
1338
|
-
const tl =
|
|
1338
|
+
const tl = createTimeline({loop: false});
|
|
1339
1339
|
|
|
1340
1340
|
// Stagger each element in with eased opacity + translateY
|
|
1341
1341
|
let offset = 0;
|
package/README.md
CHANGED
|
@@ -467,7 +467,7 @@ dungeon.spatial.insert(enemy, enemy.x, enemy.y, 8, 8);
|
|
|
467
467
|
const nearby = dungeon.spatial.query(player.x - 64, player.y - 64, 128, 128);
|
|
468
468
|
```
|
|
469
469
|
|
|
470
|
-
**Composes:** `Random` + `SpatialHash` + `
|
|
470
|
+
**Composes:** `Random` + `SpatialHash` + `Pathfinder`
|
|
471
471
|
|
|
472
472
|
</details>
|
|
473
473
|
|
|
@@ -558,7 +558,7 @@ carousel.goTo(2);
|
|
|
558
558
|
console.log(carousel.getCurrentIndex()); // 2
|
|
559
559
|
```
|
|
560
560
|
|
|
561
|
-
**Composes:** `GestureTracker` (pan + panEnd with velocity) + `
|
|
561
|
+
**Composes:** `GestureTracker` (pan + panEnd with velocity) + `createTimeline` + `easeOutCubic`
|
|
562
562
|
|
|
563
563
|
</details>
|
|
564
564
|
|
|
@@ -577,7 +577,7 @@ const show = Recipes.timelineShowcase('.feature-card', overlayCanvas, {
|
|
|
577
577
|
show.play(); // stagger in → confetti burst
|
|
578
578
|
```
|
|
579
579
|
|
|
580
|
-
**Composes:** `
|
|
580
|
+
**Composes:** `createTimeline` + `easeOutBack` (overshoot entrance) + `confetti()` (fire-and-forget)
|
|
581
581
|
|
|
582
582
|
</details>
|
|
583
583
|
|
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.9",
|
|
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",
|