Skip to content

Commit

Permalink
Added Kampos type declaration (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
ydaniv authored Nov 17, 2024
1 parent 7fde157 commit e65055c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions types.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {defaultExclude} from "vitest/config";

declare type KamposConfig = {
target: HTMLCanvasElement;
effects: EffectConfig[];
Expand Down Expand Up @@ -115,4 +117,15 @@ declare type Ticker = {
remove: (instance: Drawable) => void;
};

declare type Kampos = {
constructor: (config: KamposConfig) => Kampos;
init: (config: KamposConfig) => void;
draw: (time: number) => void;
destroy: (keepState: boolean) => void;
play: (beforeDraw: (time: number) => void, afterDraw: (time: number) => void) => void;
stop: () => void;
setSource: (source: KamposSource | KamposSource['media'], skipTextureCreation: boolean) => void;
restoreContext: () => void;
}

declare module 'kampos';

0 comments on commit e65055c

Please sign in to comment.