@algorisys/tinyfly 0.74.0 → 0.74.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/README.md +4 -4
- package/lib/addons/characters.js +100 -93
- package/lib/browser/tinyfly.iife.js +4 -4
- package/lib/browser/tinyfly.js +797 -790
- package/lib/browser/tinyfly.umd.js +4 -4
- package/lib/types/characters/stick-figure.d.ts +13 -1
- package/package.json +1 -1
|
@@ -96,9 +96,21 @@ export type PoseName = keyof typeof POSES;
|
|
|
96
96
|
export declare function blendPose(from: StickPose, to: StickPose, t: number): StickPose;
|
|
97
97
|
/**
|
|
98
98
|
* A walking stride at `phase` (in strides: 0 → 1 is one full cycle), built on
|
|
99
|
-
* `base
|
|
99
|
+
* `base`: the legs walk, hanging arms swing, and raised arms (a wave, a point)
|
|
100
|
+
* and the face keep `base`'s pose. `stride` scales the swing.
|
|
101
|
+
*
|
|
102
|
+
* Limb angles are measured outward from each side, so the same angle moves the
|
|
103
|
+
* left limb one way on screen and the right limb the other. Giving both hips the
|
|
104
|
+
* same angle therefore puts one foot forward (+x, the way the figure faces) and
|
|
105
|
+
* the other back, evenly about the vertical, which is what a stride looks like.
|
|
100
106
|
*/
|
|
101
107
|
export declare function walkPose(phase: number, base?: StickPose, stride?: number): StickPose;
|
|
108
|
+
/**
|
|
109
|
+
* Ground covered by one full walk cycle (two steps) for a figure `height` px
|
|
110
|
+
* tall: each step the foot sweeps from one side of the hip to the other.
|
|
111
|
+
* Set the walk phase to distance / strideLength so the feet stay planted.
|
|
112
|
+
*/
|
|
113
|
+
export declare function strideLength(height: number, stride?: number): number;
|
|
102
114
|
/** How open a talking mouth is at `time` ms: a deterministic chatter, 0..1. */
|
|
103
115
|
export declare function talkingMouth(time: number): number;
|
|
104
116
|
/** How the figure looks, apart from its pose. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algorisys/tinyfly",
|
|
3
|
-
"version": "0.74.
|
|
3
|
+
"version": "0.74.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Lightweight, API-driven animation engine and editor. The engine is framework-agnostic and runs in browsers, Web Workers, and Node.",
|
|
6
6
|
"license": "MIT",
|