@taole/giftstage 0.1.31 → 0.1.32

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.
@@ -528,6 +528,12 @@ export interface AddGiftOptions {
528
528
  /** Whether to auto-remove after playback stops. Default: true. */
529
529
  clearsAfterStop?: boolean;
530
530
  mute?: boolean;
531
+ /**
532
+ * SVGA only: called when the visible frame advances. Slow frames may be
533
+ * skipped, so consumers should compare with a threshold instead of requiring
534
+ * an exact frame number.
535
+ */
536
+ onFrame?: (frame: number, gift: GiftHandle) => void;
531
537
  onComplete?: (gift: GiftHandle) => void;
532
538
  }
533
539
  export interface GiftHandle {
@@ -605,6 +611,7 @@ export interface GiftSlot {
605
611
  map: unknown;
606
612
  size: number;
607
613
  };
614
+ onFrame?: (frame: number, gift: GiftHandle) => void;
608
615
  onComplete?: (gift: GiftHandle) => void;
609
616
  }
610
617
  export interface VAPConfig {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taole/giftstage",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "description": "High-performance WebGPU/WebGL gift animation player unifying SVGA, VAP, AlphaVideo, and images",
5
5
  "type": "module",
6
6
  "main": "dist/gift-stage.cjs.js",