KaboomCtx {
    burp(conf?: AudioPlayConf) => AudioPlay
    loadRoot(path?: string) => string
    loadSprite(id: string, src: SpriteLoadSrc, conf?: SpriteLoadConf) => Promise<SpriteData>
    loadSound(id: string, src: string) => Promise<SoundData>
    loadFont(id: string, src: string, gw: number, gh: number, chars?: string) => Promise<FontData>
    loadShader(name: string, vert?: string, frag?: string, isUrl?: boolean) => Promise<ShaderData>
    addLoader(l: Promise<T>) => void
    width() => number
    height() => number
    center() => Vec2
    dt() => number
    time() => number
    screenshot() => string
    focused() => boolean
    focus() => void
    ready(cb: () => void) => void
    isTouch() => boolean
    add(comps: ReadonlyArray<T | Tag | CustomData>) => GameObj<T>
    readd(obj: GameObj<any>) => GameObj<any>
    destroy(obj: GameObj<any>) => void
    destroyAll(tag: string) => void
    get(tag?: string) => GameObj<any>[]
    every(t: string, f: (obj: GameObj<any>) => T) => T[]
    every(f: (obj: GameObj<any>) => T) => T[]
    revery(t: string, f: (obj: GameObj<any>) => T) => T[]
    revery(f: (obj: GameObj<any>) => T) => T[]
    layers(list: string[], def?: string) => void
    on(event: string, tag: string, cb: (obj: GameObj<any>) => void) => EventCanceller
    action(tag: string, cb: (obj: GameObj<any>) => void) => EventCanceller
    action(cb: () => void) => EventCanceller
    render(tag: string, cb: (obj: GameObj<any>) => void) => EventCanceller
    render(cb: () => void) => EventCanceller
    collides(t1: string, t2: string, f: (a: GameObj<any>, b: GameObj<any>) => void) => EventCanceller
    overlaps(t1: string, t2: string, f: (a: GameObj<any>, b: GameObj<any>) => void) => EventCanceller
    clicks(tag: string, f: (a: GameObj<any>) => void) => EventCanceller
    camPos(p: Vec2) => Vec2
    camScale(p: Vec2) => Vec2
    camRot(a: number) => number
    camIgnore(layers: string[]) => void
    shake(n: number) => void
    gravity(g: number) => number
    recv(ty: string, handler: MsgHandler) => void
    send(ty: string, data: any) => void
    pos(x: number, y: number) => PosComp
    pos(xy: number) => PosComp
    pos(p: Vec2) => PosComp
    pos() => PosComp
    scale(x: number, y: number) => ScaleComp
    scale(xy: number) => ScaleComp
    scale(p: Vec2) => ScaleComp
    scale() => ScaleComp
    rotate(a: number) => RotateComp
    color(r: number, g: number, b: number, a?: number) => ColorComp
    color(c: Color) => ColorComp
    color() => ColorComp
    origin(o: Origin | Vec2) => OriginComp
    layer(l: string) => LayerComp
    area() => AreaComp
    area(scale: number) => AreaComp
    area(sx: number, sy: number) => AreaComp
    area(p1: Vec2, p2: Vec2) => AreaComp
    sprite(id: string, conf?: SpriteCompConf) => SpriteComp
    text(t: string, size?: number, conf?: TextCompConf) => TextComp
    rect(w: number, h: number) => RectComp
    solid() => SolidComp
    body(conf?: BodyCompConf) => BodyComp
    shader(id: string) => ShaderComp
    cursor(c?: string) => void
    mousePos(layer?: string) => Vec2
    mouseDeltaPos() => Vec2
    keyDown(k: string, f: () => void) => EventCanceller
    keyPress(k: string, f: () => void) => EventCanceller
    keyPressRep(k: string, f: () => void) => EventCanceller
    keyRelease(k: string, f: () => void) => EventCanceller
    charInput(f: (ch: string) => void) => EventCanceller
    mouseDown(f: (pos: Vec2) => void) => EventCanceller
    mouseClick(f: (pos: Vec2) => void) => EventCanceller
    mouseRelease(f: (pos: Vec2) => void) => EventCanceller
    mouseMove(f: (pos: Vec2) => void) => EventCanceller
    touchStart(f: (id: TouchID, pos: Vec2) => void) => EventCanceller
    touchMove(f: (id: TouchID, pos: Vec2) => void) => EventCanceller
    touchEnd(f: (id: TouchID, pos: Vec2) => void) => EventCanceller
    keyIsDown(k: string) => boolean
    keyIsPressed(k: string) => boolean
    keyIsPressedRep(k: string) => boolean
    keyIsReleased(k: string) => boolean
    mouseIsDown() => boolean
    mouseIsClicked() => boolean
    mouseIsReleased() => boolean
    mouseIsMoved() => boolean
    loop(t: number, f: () => void) => EventCanceller
    wait(t: number, f?: () => void) => Promise<void>
    play(id: string, conf?: AudioPlayConf) => AudioPlay
    volume(v?: number) => number
    audioCtx() => AudioContext
    makeRng(seed: number) => RNG
    rand() => number
    rand(n: T) => T
    rand(a: T, b: T) => T
    randSeed(seed: number) => number
    vec2(x: number, y: number) => Vec2
    vec2(p: Vec2) => Vec2
    vec2(xy: number) => Vec2
    vec2() => Vec2
    rgb(r: number, g: number, b: number) => Color
    rgba(r: number, g: number, b: number, a: number) => Color
    quad(x: number, y: number, w: number, h: number) => Quad
    choose(lst: T[]) => T
    chance(p: number) => boolean
    lerp(from: number, to: number, t: number) => number
    map(v: number, l1: number, h1: number, l2: number, h2: number) => number
    mapc(v: number, l1: number, h1: number, l2: number, h2: number) => number
    wave(lo: number, hi: number, t: number) => number
    deg2rad(deg: number) => number
    rad2deg(rad: number) => number
    drawSprite(id: string | SpriteData, conf?: DrawSpriteConf) => void
    drawText(txt: string, conf?: ) => void
    drawRect(pos: Vec2, w: number, h: number, conf?: DrawRectConf) => void
    drawRectStroke(pos: Vec2, w: number, h: number, conf?: DrawRectStrokeConf) => void
    drawLine(p1: Vec2, p2: Vec2, conf?: DrawLineConf) => void
    drawTri(p1: Vec2, p2: Vec2, p3: Vec2, conf?: DrawTriConf) => void
    scene(id: SceneID, def: SceneDef) => void
    go(id: SceneID, args: ...) => void
    getData(key: string, def?: T) => T
    setData(key: string, data: any) => void
    plug(plugin: KaboomPlugin<T>) =>
    debug: Debug
    ASCII_CHARS: string
    CP437_CHARS: string
    canvas: HTMLCanvasElement
    undefined
}