@zakkster/lite-tools 2.0.5 → 2.0.6
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 +4 -4
- package/LiteEngine.js +4 -4
- package/README.md +1 -1
- package/package.json +1 -1
package/LiteEngine.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export { Seek, Flee, Wander, Arrive, Pursuit, Evade, PathFollow, Separation, Ali
|
|
|
112
112
|
// Game layer
|
|
113
113
|
export { BmFont } from '@zakkster/lite-bmfont';
|
|
114
114
|
export { InputPoller } from '@zakkster/lite-gamepad';
|
|
115
|
-
export {
|
|
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
118
|
export { PathFinder } from '@zakkster/lite-path';
|
|
@@ -146,7 +146,7 @@ import type {FSM} from 'lite-states';
|
|
|
146
146
|
import type {FPSMeter} from 'lite-fps-meter';
|
|
147
147
|
import type {PointerTracker} from 'lite-pointer-tracker';
|
|
148
148
|
import type {BmFont} from '@zakkster/lite-bmfont';
|
|
149
|
-
import type {
|
|
149
|
+
import type {CinematicCamera} from '@zakkster/lite-camera';
|
|
150
150
|
import type {SpatialHash} from '@zakkster/lite-spatial';
|
|
151
151
|
import type {EmberEngine} from '@zakkster/lite-embers';
|
|
152
152
|
import type {SmokeEngine} from '@zakkster/lite-smoke';
|
|
@@ -328,7 +328,7 @@ export interface RetroArcadeTextResult extends Destroyable {
|
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
export interface ProceduralWorldResult extends Destroyable {
|
|
331
|
-
cam:
|
|
331
|
+
cam: CinematicCamera;
|
|
332
332
|
render(dt: number): void;
|
|
333
333
|
moveTo(x: number, y: number): void;
|
|
334
334
|
reseed(s?: number): void;
|
|
@@ -375,7 +375,7 @@ export interface TimelineShowcaseResult extends Destroyable {
|
|
|
375
375
|
export interface SparkImpactResult extends Destroyable {
|
|
376
376
|
sparks: SparkEngine;
|
|
377
377
|
fireworks: FireworksEngine;
|
|
378
|
-
cam:
|
|
378
|
+
cam: CinematicCamera;
|
|
379
379
|
explodeAt(x: number, y: number): void;
|
|
380
380
|
update(dt: number): void;
|
|
381
381
|
}
|
package/LiteEngine.js
CHANGED
|
@@ -113,7 +113,7 @@ export {
|
|
|
113
113
|
// Game layer
|
|
114
114
|
export {BmFont} from '@zakkster/lite-bmfont';
|
|
115
115
|
export {InputPoller} from '@zakkster/lite-gamepad';
|
|
116
|
-
export {
|
|
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
119
|
export {PathFinder} from '@zakkster/lite-path';
|
|
@@ -172,7 +172,7 @@ import {Vec2} from '@zakkster/lite-vec';
|
|
|
172
172
|
import {Flock, Wander, Separation, Alignment, Cohesion} from '@zakkster/lite-steer';
|
|
173
173
|
import {BmFont} from '@zakkster/lite-bmfont';
|
|
174
174
|
import {InputPoller} from '@zakkster/lite-gamepad';
|
|
175
|
-
import {
|
|
175
|
+
import {CinematicCamera} from '@zakkster/lite-camera';
|
|
176
176
|
import {SpatialHash} from '@zakkster/lite-spatial';
|
|
177
177
|
import {PathFinder} from '@zakkster/lite-path';
|
|
178
178
|
import {WFC} from '@zakkster/lite-wfc';
|
|
@@ -1016,7 +1016,7 @@ export const Recipes = {
|
|
|
1016
1016
|
const ctx = canvas.getContext('2d');
|
|
1017
1017
|
const rng = new Random(seed);
|
|
1018
1018
|
seedNoise(seed);
|
|
1019
|
-
const cam = new
|
|
1019
|
+
const cam = new CinematicCamera({smoothing: 0.08, deadzone: 40});
|
|
1020
1020
|
const gradient = new Gradient([
|
|
1021
1021
|
{l: 0.2, c: 0.15, h: 220}, // deep water
|
|
1022
1022
|
{l: 0.4, c: 0.2, h: 200}, // shallow
|
|
@@ -1384,7 +1384,7 @@ export const Recipes = {
|
|
|
1384
1384
|
const ctx = canvas.getContext('2d');
|
|
1385
1385
|
const sparks = new SparkEngine(maxSparks);
|
|
1386
1386
|
const fireworks = new FireworksEngine(maxFireworks);
|
|
1387
|
-
const cam = new
|
|
1387
|
+
const cam = new CinematicCamera({smoothing: 0.05});
|
|
1388
1388
|
let w = canvas.width, h = canvas.height;
|
|
1389
1389
|
|
|
1390
1390
|
function explodeAt(x, y) {
|
package/README.md
CHANGED
|
@@ -442,7 +442,7 @@ world.render(dt);
|
|
|
442
442
|
world.reseed(9999);
|
|
443
443
|
```
|
|
444
444
|
|
|
445
|
-
**Composes:** `Noise.fbm2()` + `Gradient.at()` + `
|
|
445
|
+
**Composes:** `Noise.fbm2()` + `Gradient.at()` + `CinematicCamera` (deadzone + smoothing) + `toCssOklch()`
|
|
446
446
|
|
|
447
447
|
</details>
|
|
448
448
|
|
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.6",
|
|
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",
|