mesh-avatar 0.1.1 → 0.2.0

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.
@@ -5,12 +5,16 @@ export function createSpriteModule(engine: ReturnType<typeof import("./rig.js").
5
5
  /**
6
6
  * Show / hide and deform the sprites for this frame.
7
7
  * Returns which eyes are covered by a sprite, so the layered eye parts can be hidden.
8
+ * `mood` (angry / sad / surprise) picks drawn expression eyes (sad, surprise) and closed
9
+ * mouths (angry, sad) when the avatar has them.
8
10
  */
9
- update(P: any, phys: any, dt?: number): {
11
+ update(P: any, phys: any, dt?: number, mood?: null): {
10
12
  eyes: boolean[];
11
13
  mouth: any;
12
14
  };
13
15
  };
14
16
  mouthShape: (open: any, form: any, prev?: null) => any;
15
- eyeSprite: (open: any, smile: any) => "eyes_smile" | "eyes_closed" | "eyes_half" | null;
17
+ eyeSprite: (open: any, smile: any, mood?: null) => "eyes_smile" | "eyes_closed" | "eyes_half" | null;
16
18
  };
19
+ /** The drawn-eye / mouth mood for the live expression, else for the motion expression (if it is applied). */
20
+ export function eyeMood(overlay: any, expression: any): any;