kaplay
Version:
KAPLAY is a JavaScript & TypeScript game library that helps you make games fast and fun! (formerly known as Kaboom.js)
327 lines (326 loc) • 13.6 kB
TypeScript
import { KAPLAYCtx, default as KAPLAY } from "../doc"
declare global {
const _k: KAPLAYCtx["_k"]
const add: KAPLAYCtx["add"]
const make: KAPLAYCtx["make"]
const readd: KAPLAYCtx["readd"]
const get: KAPLAYCtx["get"]
const query: KAPLAYCtx["query"]
const destroy: KAPLAYCtx["destroy"]
const destroyAll: KAPLAYCtx["destroyAll"]
const pos: KAPLAYCtx["pos"]
const scale: KAPLAYCtx["scale"]
const rotate: KAPLAYCtx["rotate"]
const color: KAPLAYCtx["color"]
const opacity: KAPLAYCtx["opacity"]
const sprite: KAPLAYCtx["sprite"]
const text: KAPLAYCtx["text"]
const polygon: KAPLAYCtx["polygon"]
const rect: KAPLAYCtx["rect"]
const circle: KAPLAYCtx["circle"]
const uvquad: KAPLAYCtx["uvquad"]
const area: KAPLAYCtx["area"]
const anchor: KAPLAYCtx["anchor"]
const z: KAPLAYCtx["z"]
const layer: KAPLAYCtx["layer"]
const outline: KAPLAYCtx["outline"]
const particles: KAPLAYCtx["particles"]
const body: KAPLAYCtx["body"]
const surfaceEffector: KAPLAYCtx["surfaceEffector"]
const areaEffector: KAPLAYCtx["areaEffector"]
const pointEffector: KAPLAYCtx["pointEffector"]
const platformEffector: KAPLAYCtx["platformEffector"]
const buoyancyEffector: KAPLAYCtx["buoyancyEffector"]
const constantForce: KAPLAYCtx["constantForce"]
const doubleJump: KAPLAYCtx["doubleJump"]
const move: KAPLAYCtx["move"]
const offscreen: KAPLAYCtx["offscreen"]
const follow: KAPLAYCtx["follow"]
const shader: KAPLAYCtx["shader"]
const textInput: KAPLAYCtx["textInput"]
const timer: KAPLAYCtx["timer"]
const fixed: KAPLAYCtx["fixed"]
const stay: KAPLAYCtx["stay"]
const health: KAPLAYCtx["health"]
const lifespan: KAPLAYCtx["lifespan"]
const named: KAPLAYCtx["named"]
const state: KAPLAYCtx["state"]
const fadeIn: KAPLAYCtx["fadeIn"]
const mask: KAPLAYCtx["mask"]
const drawon: KAPLAYCtx["drawon"]
const tile: KAPLAYCtx["tile"]
const agent: KAPLAYCtx["agent"]
const animate: KAPLAYCtx["animate"]
const serializeAnimation: KAPLAYCtx["serializeAnimation"]
const sentry: KAPLAYCtx["sentry"]
const patrol: KAPLAYCtx["patrol"]
const pathfinder: KAPLAYCtx["pathfinder"]
const raycast: KAPLAYCtx["raycast"]
const trigger: KAPLAYCtx["trigger"]
const on: KAPLAYCtx["on"]
const onFixedUpdate: KAPLAYCtx["onFixedUpdate"]
const onUpdate: KAPLAYCtx["onUpdate"]
const onDraw: KAPLAYCtx["onDraw"]
const onAdd: KAPLAYCtx["onAdd"]
const onDestroy: KAPLAYCtx["onDestroy"]
const onUse: KAPLAYCtx["onUse"]
const onUnuse: KAPLAYCtx["onUnuse"]
const onTag: KAPLAYCtx["onTag"]
const onUntag: KAPLAYCtx["onUntag"]
const onLoad: KAPLAYCtx["onLoad"]
const onLoadError: KAPLAYCtx["onLoadError"]
const onLoading: KAPLAYCtx["onLoading"]
const onError: KAPLAYCtx["onError"]
const onResize: KAPLAYCtx["onResize"]
const onCleanup: KAPLAYCtx["onCleanup"]
const onGamepadConnect: KAPLAYCtx["onGamepadConnect"]
const onGamepadDisconnect: KAPLAYCtx["onGamepadDisconnect"]
const onCollide: KAPLAYCtx["onCollide"]
const onCollideUpdate: KAPLAYCtx["onCollideUpdate"]
const onCollideEnd: KAPLAYCtx["onCollideEnd"]
const onClick: KAPLAYCtx["onClick"]
const onHover: KAPLAYCtx["onHover"]
const onHoverUpdate: KAPLAYCtx["onHoverUpdate"]
const onHoverEnd: KAPLAYCtx["onHoverEnd"]
const onKeyDown: KAPLAYCtx["onKeyDown"]
const onKeyPress: KAPLAYCtx["onKeyPress"]
const onKeyPressRepeat: KAPLAYCtx["onKeyPressRepeat"]
const onKeyRelease: KAPLAYCtx["onKeyRelease"]
const onCharInput: KAPLAYCtx["onCharInput"]
const onMouseDown: KAPLAYCtx["onMouseDown"]
const onMousePress: KAPLAYCtx["onMousePress"]
const onMouseRelease: KAPLAYCtx["onMouseRelease"]
const onMouseMove: KAPLAYCtx["onMouseMove"]
const onTouchStart: KAPLAYCtx["onTouchStart"]
const onTouchMove: KAPLAYCtx["onTouchMove"]
const onTouchEnd: KAPLAYCtx["onTouchEnd"]
const onScroll: KAPLAYCtx["onScroll"]
const onHide: KAPLAYCtx["onHide"]
const onShow: KAPLAYCtx["onShow"]
const onGamepadButtonDown: KAPLAYCtx["onGamepadButtonDown"]
const onGamepadButtonPress: KAPLAYCtx["onGamepadButtonPress"]
const onGamepadButtonRelease: KAPLAYCtx["onGamepadButtonRelease"]
const onGamepadStick: KAPLAYCtx["onGamepadStick"]
const onButtonPress: KAPLAYCtx["onButtonPress"]
const onButtonRelease: KAPLAYCtx["onButtonRelease"]
const onButtonDown: KAPLAYCtx["onButtonDown"]
const onSceneLeave: KAPLAYCtx["onSceneLeave"]
const getSceneName: KAPLAYCtx["getSceneName"]
const loadRoot: KAPLAYCtx["loadRoot"]
const loadSprite: KAPLAYCtx["loadSprite"]
const loadSpriteAtlas: KAPLAYCtx["loadSpriteAtlas"]
const loadAseprite: KAPLAYCtx["loadAseprite"]
const loadPedit: KAPLAYCtx["loadPedit"]
const loadBean: KAPLAYCtx["loadBean"]
const loadJSON: KAPLAYCtx["loadJSON"]
const loadSound: KAPLAYCtx["loadSound"]
const loadMusic: KAPLAYCtx["loadMusic"]
const loadFont: KAPLAYCtx["loadFont"]
const loadBitmapFont: KAPLAYCtx["loadBitmapFont"]
const loadShader: KAPLAYCtx["loadShader"]
const loadShaderURL: KAPLAYCtx["loadShaderURL"]
const load: KAPLAYCtx["load"]
const loadProgress: KAPLAYCtx["loadProgress"]
const getSprite: KAPLAYCtx["getSprite"]
const getSound: KAPLAYCtx["getSound"]
const getFont: KAPLAYCtx["getFont"]
const getBitmapFont: KAPLAYCtx["getBitmapFont"]
const getShader: KAPLAYCtx["getShader"]
const getAsset: KAPLAYCtx["getAsset"]
const Asset: KAPLAYCtx["Asset"]
const SpriteData: KAPLAYCtx["SpriteData"]
const SoundData: KAPLAYCtx["SoundData"]
const width: KAPLAYCtx["width"]
const getTreeRoot: KAPLAYCtx["getTreeRoot"]
const height: KAPLAYCtx["height"]
const center: KAPLAYCtx["center"]
const dt: KAPLAYCtx["dt"]
const fixedDt: KAPLAYCtx["fixedDt"]
const restDt: KAPLAYCtx["restDt"]
const time: KAPLAYCtx["time"]
const isFocused: KAPLAYCtx["isFocused"]
const isTouchscreen: KAPLAYCtx["isTouchscreen"]
const mousePos: KAPLAYCtx["mousePos"]
const mouseDeltaPos: KAPLAYCtx["mouseDeltaPos"]
const isKeyDown: KAPLAYCtx["isKeyDown"]
const isKeyPressed: KAPLAYCtx["isKeyPressed"]
const isKeyPressedRepeat: KAPLAYCtx["isKeyPressedRepeat"]
const isKeyReleased: KAPLAYCtx["isKeyReleased"]
const isMouseDown: KAPLAYCtx["isMouseDown"]
const isMousePressed: KAPLAYCtx["isMousePressed"]
const isMouseReleased: KAPLAYCtx["isMouseReleased"]
const isMouseMoved: KAPLAYCtx["isMouseMoved"]
const isGamepadButtonPressed: KAPLAYCtx["isGamepadButtonPressed"]
const isGamepadButtonDown: KAPLAYCtx["isGamepadButtonDown"]
const isGamepadButtonReleased: KAPLAYCtx["isGamepadButtonReleased"]
const isButtonPressed: KAPLAYCtx["isButtonPressed"]
const isButtonDown: KAPLAYCtx["isButtonDown"]
const isButtonReleased: KAPLAYCtx["isButtonReleased"]
const getButton: KAPLAYCtx["getButton"]
const setButton: KAPLAYCtx["setButton"]
const pressButton: KAPLAYCtx["pressButton"]
const releaseButton: KAPLAYCtx["releaseButton"]
const getGamepadStick: KAPLAYCtx["getGamepadStick"]
const getLastInputDeviceType: KAPLAYCtx["getLastInputDeviceType"]
const charInputted: KAPLAYCtx["charInputted"]
const setCamPos: KAPLAYCtx["setCamPos"]
const getCamPos: KAPLAYCtx["getCamPos"]
const setCamScale: KAPLAYCtx["setCamScale"]
const getCamScale: KAPLAYCtx["getCamScale"]
const setCamRot: KAPLAYCtx["setCamRot"]
const getCamRot: KAPLAYCtx["getCamRot"]
const getCamTransform: KAPLAYCtx["getCamTransform"]
const shake: KAPLAYCtx["shake"]
const flash: KAPLAYCtx["flash"]
const camPos: KAPLAYCtx["camPos"]
const camScale: KAPLAYCtx["camScale"]
const camRot: KAPLAYCtx["camRot"]
const camFlash: KAPLAYCtx["camFlash"]
const camTransform: KAPLAYCtx["camTransform"]
const toScreen: KAPLAYCtx["toScreen"]
const toWorld: KAPLAYCtx["toWorld"]
const setGravity: KAPLAYCtx["setGravity"]
const getGravity: KAPLAYCtx["getGravity"]
const setGravityDirection: KAPLAYCtx["setGravityDirection"]
const getGravityDirection: KAPLAYCtx["getGravityDirection"]
const setBackground: KAPLAYCtx["setBackground"]
const getBackground: KAPLAYCtx["getBackground"]
const getGamepads: KAPLAYCtx["getGamepads"]
const setCursor: KAPLAYCtx["setCursor"]
const getCursor: KAPLAYCtx["getCursor"]
const setCursorLocked: KAPLAYCtx["setCursorLocked"]
const isCursorLocked: KAPLAYCtx["isCursorLocked"]
const setFullscreen: KAPLAYCtx["setFullscreen"]
const isFullscreen: KAPLAYCtx["isFullscreen"]
const wait: KAPLAYCtx["wait"]
const loop: KAPLAYCtx["loop"]
const play: KAPLAYCtx["play"]
const burp: KAPLAYCtx["burp"]
const setVolume: KAPLAYCtx["setVolume"]
const getVolume: KAPLAYCtx["getVolume"]
const volume: KAPLAYCtx["volume"]
const audioCtx: KAPLAYCtx["audioCtx"]
const rand: KAPLAYCtx["rand"]
const randi: KAPLAYCtx["randi"]
const randSeed: KAPLAYCtx["randSeed"]
const vec2: KAPLAYCtx["vec2"]
const rgb: KAPLAYCtx["rgb"]
const hsl2rgb: KAPLAYCtx["hsl2rgb"]
const quad: KAPLAYCtx["quad"]
const choose: KAPLAYCtx["choose"]
const chooseMultiple: KAPLAYCtx["chooseMultiple"]
const shuffle: KAPLAYCtx["shuffle"]
const chance: KAPLAYCtx["chance"]
const lerp: KAPLAYCtx["lerp"]
const tween: KAPLAYCtx["tween"]
const easings: KAPLAYCtx["easings"]
const easingSteps: KAPLAYCtx["easingSteps"]
const easingLinear: KAPLAYCtx["easingLinear"]
const easingCubicBezier: KAPLAYCtx["easingCubicBezier"]
const map: KAPLAYCtx["map"]
const mapc: KAPLAYCtx["mapc"]
const wave: KAPLAYCtx["wave"]
const deg2rad: KAPLAYCtx["deg2rad"]
const rad2deg: KAPLAYCtx["rad2deg"]
const clamp: KAPLAYCtx["clamp"]
const evaluateQuadratic: KAPLAYCtx["evaluateQuadratic"]
const evaluateQuadraticFirstDerivative: KAPLAYCtx["evaluateQuadraticFirstDerivative"]
const evaluateQuadraticSecondDerivative: KAPLAYCtx["evaluateQuadraticSecondDerivative"]
const evaluateBezier: KAPLAYCtx["evaluateBezier"]
const evaluateBezierFirstDerivative: KAPLAYCtx["evaluateBezierFirstDerivative"]
const evaluateBezierSecondDerivative: KAPLAYCtx["evaluateBezierSecondDerivative"]
const evaluateCatmullRom: KAPLAYCtx["evaluateCatmullRom"]
const evaluateCatmullRomFirstDerivative: KAPLAYCtx["evaluateCatmullRomFirstDerivative"]
const curveLengthApproximation: KAPLAYCtx["curveLengthApproximation"]
const normalizedCurve: KAPLAYCtx["normalizedCurve"]
const hermite: KAPLAYCtx["hermite"]
const cardinal: KAPLAYCtx["cardinal"]
const catmullRom: KAPLAYCtx["catmullRom"]
const bezier: KAPLAYCtx["bezier"]
const kochanekBartels: KAPLAYCtx["kochanekBartels"]
const testLinePoint: KAPLAYCtx["testLinePoint"]
const testLineLine: KAPLAYCtx["testLineLine"]
const testLineCircle: KAPLAYCtx["testLineCircle"]
const testRectRect: KAPLAYCtx["testRectRect"]
const testRectLine: KAPLAYCtx["testRectLine"]
const testRectPoint: KAPLAYCtx["testRectPoint"]
const testCirclePolygon: KAPLAYCtx["testCirclePolygon"]
const isConvex: KAPLAYCtx["isConvex"]
const triangulate: KAPLAYCtx["triangulate"]
const NavMesh: KAPLAYCtx["NavMesh"]
const Point: KAPLAYCtx["Point"]
const Line: KAPLAYCtx["Line"]
const Rect: KAPLAYCtx["Rect"]
const Circle: KAPLAYCtx["Circle"]
const Ellipse: KAPLAYCtx["Ellipse"]
const Polygon: KAPLAYCtx["Polygon"]
const Vec2: KAPLAYCtx["Vec2"]
const Color: KAPLAYCtx["Color"]
const Mat4: KAPLAYCtx["Mat4"]
const Quad: KAPLAYCtx["Quad"]
const RNG: KAPLAYCtx["RNG"]
const scene: KAPLAYCtx["scene"]
const go: KAPLAYCtx["go"]
const setLayers: KAPLAYCtx["setLayers"]
const getLayers: KAPLAYCtx["getLayers"]
const getDefaultLayer: KAPLAYCtx["getDefaultLayer"]
const layers: KAPLAYCtx["layers"]
const addLevel: KAPLAYCtx["addLevel"]
const getData: KAPLAYCtx["getData"]
const setData: KAPLAYCtx["setData"]
const drawSprite: KAPLAYCtx["drawSprite"]
const drawText: KAPLAYCtx["drawText"]
const drawRect: KAPLAYCtx["drawRect"]
const drawLine: KAPLAYCtx["drawLine"]
const drawLines: KAPLAYCtx["drawLines"]
const drawCurve: KAPLAYCtx["drawCurve"]
const drawBezier: KAPLAYCtx["drawBezier"]
const drawTriangle: KAPLAYCtx["drawTriangle"]
const drawCircle: KAPLAYCtx["drawCircle"]
const drawEllipse: KAPLAYCtx["drawEllipse"]
const drawPolygon: KAPLAYCtx["drawPolygon"]
const drawUVQuad: KAPLAYCtx["drawUVQuad"]
const drawFormattedText: KAPLAYCtx["drawFormattedText"]
const drawMasked: KAPLAYCtx["drawMasked"]
const drawSubtracted: KAPLAYCtx["drawSubtracted"]
const pushTransform: KAPLAYCtx["pushTransform"]
const popTransform: KAPLAYCtx["popTransform"]
const pushTranslate: KAPLAYCtx["pushTranslate"]
const pushScale: KAPLAYCtx["pushScale"]
const pushRotate: KAPLAYCtx["pushRotate"]
const pushMatrix: KAPLAYCtx["pushMatrix"]
const usePostEffect: KAPLAYCtx["usePostEffect"]
const formatText: KAPLAYCtx["formatText"]
const makeCanvas: KAPLAYCtx["makeCanvas"]
const debug: KAPLAYCtx["debug"]
const plug: KAPLAYCtx["plug"]
const screenshot: KAPLAYCtx["screenshot"]
const download: KAPLAYCtx["download"]
const downloadText: KAPLAYCtx["downloadText"]
const downloadJSON: KAPLAYCtx["downloadJSON"]
const downloadBlob: KAPLAYCtx["downloadBlob"]
const record: KAPLAYCtx["record"]
const addKaboom: KAPLAYCtx["addKaboom"]
const ASCII_CHARS: KAPLAYCtx["ASCII_CHARS"]
const LEFT: KAPLAYCtx["LEFT"]
const RIGHT: KAPLAYCtx["RIGHT"]
const UP: KAPLAYCtx["UP"]
const DOWN: KAPLAYCtx["DOWN"]
const RED: KAPLAYCtx["RED"]
const GREEN: KAPLAYCtx["GREEN"]
const BLUE: KAPLAYCtx["BLUE"]
const YELLOW: KAPLAYCtx["YELLOW"]
const MAGENTA: KAPLAYCtx["MAGENTA"]
const CYAN: KAPLAYCtx["CYAN"]
const WHITE: KAPLAYCtx["WHITE"]
const BLACK: KAPLAYCtx["BLACK"]
const canvas: KAPLAYCtx["canvas"]
const quit: KAPLAYCtx["quit"]
const KEvent: KAPLAYCtx["KEvent"]
const KEventHandler: KAPLAYCtx["KEventHandler"]
const KEventController: KAPLAYCtx["KEventController"]
const cancel: KAPLAYCtx["cancel"]
const VERSION: KAPLAYCtx["VERSION"]
const kaplay: typeof KAPLAY
const kaboom: typeof KAPLAY
}