evotars 0.0.13 → 0.0.14

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/index.d.ts CHANGED
@@ -97,6 +97,7 @@ declare class Evotar {
97
97
  duration: number;
98
98
  }): void;
99
99
  addJumpHit(count: number): void;
100
+ canDoAction(): boolean;
100
101
  jump(options?: EvotarJumpProps): Promise<void>;
101
102
  dash(options: {
102
103
  force: number;
@@ -149,7 +150,7 @@ export declare class Evotars {
149
150
  processMessage: (data: MessageEntity) => Promise<void>;
150
151
  processAction: (data: UserActionEntity) => Promise<void>;
151
152
  processChatters: (data: TwitchChatterEntity[]) => Promise<void>;
152
- processRaid: (data: RaidEntity) => void;
153
+ processRaid: (data: RaidEntity) => Promise<void>;
153
154
  get manager(): {
154
155
  viewers: Record<string, Evotar | undefined>;
155
156
  tombstones: TombStone[];
@@ -164,18 +165,18 @@ export declare class Evotars {
164
165
  onDelete: (evotar: Evotar) => void;
165
166
  }): void;
166
167
  update(): void;
167
- getViewerEvotars(): Record<string, Evotar | undefined>;
168
- getViewerEvotar(id: number): Evotar | undefined;
168
+ getEvotars(): (Evotar | undefined)[];
169
169
  spawnViewerEvotar(userId: string, props: EvotarProps, spawnProps: EvotarSpawnProps): Promise<Evotar>;
170
- processRaid(data: RaidEntity): void;
171
- despawnEvotar(id: string, evotar: Evotar): void;
170
+ processRaid(data: RaidEntity): Promise<void>;
171
+ despawnTombStone(evotar: Evotar): void;
172
+ despawnRaider(evotar: Evotar): void;
173
+ despawnViewer(id: string, evotar: Evotar): void;
172
174
  processChatters(data: TwitchChatterEntity[]): Promise<void>;
173
175
  hasActivity: (userId: string) => boolean;
174
176
  doAction(action: UserActionEntity, evotar: Evotar): void;
175
177
  prepareEvotarProps(name: string, color?: string | undefined, sprite?: string | undefined): EvotarProps;
176
178
  processAction(action: UserActionEntity): Promise<void>;
177
179
  processMessage(data: MessageEntity): Promise<void>;
178
- getViewerId(evotar: Evotar): string | undefined;
179
180
  resurrect(evotar: Evotar): void;
180
181
  kill(evotar: Evotar): void;
181
182
  addTombStone(object: TombStone): void;
@@ -357,24 +358,19 @@ declare class Timer {
357
358
  }
358
359
 
359
360
  declare class TombStone {
360
- readonly id: string;
361
+ readonly evotar: Evotar;
361
362
  container: PIXI.Container;
362
363
  private sprite;
363
364
  private gravity;
364
365
  private velocity;
365
366
  fadeTween?: TWEEN.Tween<PIXI.Container>;
366
- constructor(id: string);
367
+ constructor(evotar: Evotar);
367
368
  isOnGround(y: number): boolean;
368
369
  update(): void;
369
370
  despawn(smooth?: boolean, onComplete?: () => void): void;
370
- spawn(props: TombStoneProps): void;
371
+ spawn(): void;
371
372
  }
372
373
 
373
- declare type TombStoneProps = {
374
- position: Point;
375
- scale: number;
376
- };
377
-
378
374
  export declare type TwitchChatterEntity = {
379
375
  userId: string;
380
376
  name: string;
@@ -1,7 +1,7 @@
1
- import { E as b, U as pt, T as pe, O as q, M as U, N as Fe, c as Me, w as L, j as R, P as gt, t as Re, K as k, L as H, b as Q, B as D, I, Q as mt, V as xt, a as _t, W as re, X as z, R as V, Y as bt, Z as M, _ as E, $ as yt, q as B, a0 as Tt, D as $, a1 as wt, a2 as Z, a3 as vt, m as St, a4 as Ct, a5 as se, n as ge, e as P, a6 as Bt } from "./index-RgERw5ms.js";
2
- import { U as Y, T as A, R as ne, S as Ae, i as ae, b as ke, c as Ue, j as Ge, e as Pt, r as ze, o as Ft, n as He, a as Mt, g as Rt, k as At, m as kt, B as Ie } from "./colorToUniform-ZnVvWd8z.js";
3
- import { C as W } from "./CanvasPool-323z5Bgc.js";
4
- import { g as Ut } from "./getBatchSamplersUniformGroup-DIigPB-W.js";
1
+ import { E as b, U as pt, T as pe, O as q, M as U, N as Fe, c as Me, w as L, j as R, P as gt, t as Re, K as k, L as H, b as Q, B as D, I, Q as mt, V as xt, a as _t, W as re, X as z, R as V, Y as bt, Z as M, _ as E, $ as yt, q as B, a0 as Tt, D as $, a1 as wt, a2 as Z, a3 as vt, m as St, a4 as Ct, a5 as se, n as ge, e as P, a6 as Bt } from "./index-B90O-olH.js";
2
+ import { U as Y, T as A, R as ne, S as Ae, i as ae, b as ke, c as Ue, j as Ge, e as Pt, r as ze, o as Ft, n as He, a as Mt, g as Rt, k as At, m as kt, B as Ie } from "./colorToUniform-B386n34M.js";
3
+ import { C as W } from "./CanvasPool-CVUDTUp2.js";
4
+ import { g as Ut } from "./getBatchSamplersUniformGroup-DAYmfPu3.js";
5
5
  class We {
6
6
  /**
7
7
  * Initialize the plugin with scope of application instance
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.13",
2
+ "version": "0.0.14",
3
3
  "name": "evotars",
4
4
  "description": "Show animated characters on stream",
5
5
  "author": "Mikhail Morozov",