mesh-avatar 0.3.0 → 0.3.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/dist/engine/sprites.d.ts +5 -1
- package/dist/index.js +954 -951
- package/package.json +2 -2
package/dist/engine/sprites.d.ts
CHANGED
|
@@ -4,14 +4,18 @@ export function createSpriteModule(engine: ReturnType<typeof import("./rig.js").
|
|
|
4
4
|
createSprites: (R: any, sheet: any, imgs: void, buildGrid: any, alphaOf: any) => {
|
|
5
5
|
/**
|
|
6
6
|
* Show / hide and deform the sprites for this frame.
|
|
7
|
-
* Returns which eyes are covered by a sprite, so the layered eye parts can be hidden
|
|
7
|
+
* Returns which eyes are covered by a sprite, so the layered eye parts can be hidden, and
|
|
8
|
+
* whether a drawing shows the mouth, so the shader mouth can be left out.
|
|
8
9
|
* `mood` (angry / sad / surprise) picks drawn expression eyes (sad, surprise) and closed
|
|
9
10
|
* mouths (angry, sad) when the avatar has them.
|
|
10
11
|
*/
|
|
11
12
|
update(P: any, phys: any, dt?: number, mood?: null): {
|
|
12
13
|
eyes: boolean[];
|
|
13
14
|
mouth: any;
|
|
15
|
+
mouthDrawn: boolean;
|
|
14
16
|
};
|
|
17
|
+
/** Whether each eye has the closed and half-closed drawings, so the layered eye stays open. */
|
|
18
|
+
eyesDrawn: boolean[];
|
|
15
19
|
};
|
|
16
20
|
mouthShape: (open: any, form: any, prev?: null) => any;
|
|
17
21
|
eyeSprite: (open: any, smile: any, mood?: null) => "eyes_smile" | "eyes_closed" | "eyes_half" | null;
|