From b2de4d7a3fcc7bcb0d105491d68ad1a0d1ad384e Mon Sep 17 00:00:00 2001 From: lajbel Date: Fri, 4 Oct 2024 09:21:54 -0300 Subject: [PATCH] feat: add doc.json to public folder --- .gitignore | 5 ++--- doc.json | 1 + public/doc.json | 1 + scripts/buildDoc.js | 8 ++++++++ 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 doc.json create mode 100644 public/doc.json diff --git a/.gitignore b/.gitignore index 91b1730..3c025cc 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ dist/ # dependencies node_modules/ +kaplay/ # logs npm-debug.log* @@ -23,8 +24,6 @@ pnpm-debug.log* # jetbrains setting folder .idea/ -doc.json - -kaplay/ +# integrationns .wrangler/ public/pagefind \ No newline at end of file diff --git a/doc.json b/doc.json new file mode 100644 index 0000000..9dc84f8 --- /dev/null +++ b/doc.json @@ -0,0 +1 @@ +{"types":{"GfxCtx":[{"kind":"TypeAliasDeclaration","id":0,"name":"GfxCtx","type":{"kind":"TypeReference","id":0,"typeName":"ReturnType","typeArguments":[{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"initGfx"}}]}}],"Texture":[{"kind":"ClassDeclaration","id":0,"name":"Texture","members":{"ctx":[{"kind":"PropertyDeclaration","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"src":[{"kind":"PropertyDeclaration","id":0,"name":"src","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}},{"kind":"TypeReference","id":0,"typeName":"ImageSource"}]}}],"glTex":[{"kind":"PropertyDeclaration","id":0,"name":"glTex","type":{"kind":"TypeReference","id":0,"typeName":"WebGLTexture"}}],"width":[{"kind":"PropertyDeclaration","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertyDeclaration","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"fromImage":[{"kind":"MethodDeclaration","id":0,"name":"fromImage","parameters":[{"kind":"Parameter","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}},{"kind":"Parameter","id":0,"name":"img","type":{"kind":"TypeReference","id":0,"typeName":"ImageSource"}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"TextureOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"update":[{"kind":"MethodDeclaration","id":0,"name":"update","parameters":[{"kind":"Parameter","id":0,"name":"img","type":{"kind":"TypeReference","id":0,"typeName":"ImageSource"}},{"kind":"Parameter","id":0,"name":"x","questionToken":true,"type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"bind":[{"kind":"MethodDeclaration","id":0,"name":"bind","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"unbind":[{"kind":"MethodDeclaration","id":0,"name":"unbind","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"free":[{"kind":"MethodDeclaration","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Frees up texture memory. Call this once the texture is no longer being used to avoid memory leaks.","tags":{}}}]}}],"FrameBuffer":[{"kind":"ClassDeclaration","id":0,"name":"FrameBuffer","members":{"ctx":[{"kind":"PropertyDeclaration","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"tex":[{"kind":"PropertyDeclaration","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"glFramebuffer":[{"kind":"PropertyDeclaration","id":0,"name":"glFramebuffer","type":{"kind":"TypeReference","id":0,"typeName":"WebGLFramebuffer"}}],"glRenderbuffer":[{"kind":"PropertyDeclaration","id":0,"name":"glRenderbuffer","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderbuffer"}}],"width":[{"kind":"GetAccessor","id":0,"name":"width","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"GetAccessor","id":0,"name":"height","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"toImageData":[{"kind":"MethodDeclaration","id":0,"name":"toImageData","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"ImageData"}}],"toDataURL":[{"kind":"MethodDeclaration","id":0,"name":"toDataURL","parameters":[],"type":{"kind":"StringKeyword","id":0}}],"clear":[{"kind":"MethodDeclaration","id":0,"name":"clear","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"draw":[{"kind":"MethodDeclaration","id":0,"name":"draw","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}],"bind":[{"kind":"MethodDeclaration","id":0,"name":"bind","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"unbind":[{"kind":"MethodDeclaration","id":0,"name":"unbind","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"free":[{"kind":"MethodDeclaration","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]},"jsDoc":{"tags":{"group":["GFX"]}}}],"VertexFormat":[{"kind":"TypeAliasDeclaration","id":0,"name":"VertexFormat","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeLiteral","id":0,"members":{"size":[{"kind":"PropertySignature","id":0,"name":"size","type":{"kind":"NumberKeyword","id":0}}]}}}}],"BatchRenderer":[{"kind":"ClassDeclaration","id":0,"name":"BatchRenderer","members":{"ctx":[{"kind":"PropertyDeclaration","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"glVBuf":[{"kind":"PropertyDeclaration","id":0,"name":"glVBuf","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"glIBuf":[{"kind":"PropertyDeclaration","id":0,"name":"glIBuf","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"vqueue":[{"kind":"PropertyDeclaration","id":0,"name":"vqueue","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"iqueue":[{"kind":"PropertyDeclaration","id":0,"name":"iqueue","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"stride":[{"kind":"PropertyDeclaration","id":0,"name":"stride","type":{"kind":"NumberKeyword","id":0}}],"maxVertices":[{"kind":"PropertyDeclaration","id":0,"name":"maxVertices","type":{"kind":"NumberKeyword","id":0}}],"maxIndices":[{"kind":"PropertyDeclaration","id":0,"name":"maxIndices","type":{"kind":"NumberKeyword","id":0}}],"vertexFormat":[{"kind":"PropertyDeclaration","id":0,"name":"vertexFormat","type":{"kind":"TypeReference","id":0,"typeName":"VertexFormat"}}],"numDraws":[{"kind":"PropertyDeclaration","id":0,"name":"numDraws","type":{"kind":"NumberKeyword","id":0}}],"curPrimitive":[{"kind":"PropertyDeclaration","id":0,"name":"curPrimitive","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GLenum"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"curTex":[{"kind":"PropertyDeclaration","id":0,"name":"curTex","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Texture"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"curShader":[{"kind":"PropertyDeclaration","id":0,"name":"curShader","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Shader"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"curUniform":[{"kind":"PropertyDeclaration","id":0,"name":"curUniform","type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}],"push":[{"kind":"MethodDeclaration","id":0,"name":"push","parameters":[{"kind":"Parameter","id":0,"name":"primitive","type":{"kind":"TypeReference","id":0,"typeName":"GLenum"}},{"kind":"Parameter","id":0,"name":"verts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"indices","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"shader","type":{"kind":"TypeReference","id":0,"typeName":"Shader"}},{"kind":"Parameter","id":0,"name":"tex","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Texture"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"uniform","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}],"type":{"kind":"VoidKeyword","id":0}}],"flush":[{"kind":"MethodDeclaration","id":0,"name":"flush","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"free":[{"kind":"MethodDeclaration","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]}}],"Mesh":[{"kind":"ClassDeclaration","id":0,"name":"Mesh","members":{"ctx":[{"kind":"PropertyDeclaration","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"glVBuf":[{"kind":"PropertyDeclaration","id":0,"name":"glVBuf","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"glIBuf":[{"kind":"PropertyDeclaration","id":0,"name":"glIBuf","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"vertexFormat":[{"kind":"PropertyDeclaration","id":0,"name":"vertexFormat","type":{"kind":"TypeReference","id":0,"typeName":"VertexFormat"}}],"count":[{"kind":"PropertyDeclaration","id":0,"name":"count","type":{"kind":"NumberKeyword","id":0}}],"draw":[{"kind":"MethodDeclaration","id":0,"name":"draw","parameters":[{"kind":"Parameter","id":0,"name":"primitive","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"GLenum"}}],"type":{"kind":"VoidKeyword","id":0}}],"free":[{"kind":"MethodDeclaration","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]}}],"initGfx":[{"kind":"FunctionDeclaration","id":0,"name":"initGfx","parameters":[{"kind":"Parameter","id":0,"name":"gl","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderingContext"}},{"kind":"Parameter","id":0,"name":"opts","questionToken":true,"type":{"kind":"TypeLiteral","id":0,"members":{"texFilter":[{"kind":"PropertySignature","id":0,"name":"texFilter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}]}}}],"type":{"kind":"TypeLiteral","id":0,"members":{"gl":[{"kind":"PropertySignature","id":0,"name":"gl","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderingContext"}}],"opts":[{"kind":"PropertySignature","id":0,"name":"opts","type":{"kind":"TypeLiteral","id":0,"members":{"texFilter":[{"kind":"PropertySignature","id":0,"name":"texFilter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}]}}}],"onDestroy":[{"kind":"PropertySignature","id":0,"name":"onDestroy","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"UnknownKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushTexture2D":[{"kind":"PropertySignature","id":0,"name":"pushTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLTexture"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popTexture2D":[{"kind":"PropertySignature","id":0,"name":"popTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushFramebuffer":[{"kind":"PropertySignature","id":0,"name":"pushFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLFramebuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popFramebuffer":[{"kind":"PropertySignature","id":0,"name":"popFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"pushRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderbuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"popRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushViewport":[{"kind":"PropertySignature","id":0,"name":"pushViewport","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"w":[{"kind":"PropertySignature","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertySignature","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}]}}}],"type":{"kind":"VoidKeyword","id":0}}}],"popViewport":[{"kind":"PropertySignature","id":0,"name":"popViewport","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushProgram":[{"kind":"PropertySignature","id":0,"name":"pushProgram","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLProgram"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popProgram":[{"kind":"PropertySignature","id":0,"name":"popProgram","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"setVertexFormat":[{"kind":"PropertySignature","id":0,"name":"setVertexFormat","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"fmt","type":{"kind":"TypeReference","id":0,"typeName":"VertexFormat"}}],"type":{"kind":"VoidKeyword","id":0}}}]}}}],"RGBValue":[{"kind":"TypeAliasDeclaration","id":0,"name":"RGBValue","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]}}],"RGBAValue":[{"kind":"TypeAliasDeclaration","id":0,"name":"RGBAValue","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]}}],"Color":[{"kind":"ClassDeclaration","id":0,"name":"Color","members":{"r":[{"kind":"PropertyDeclaration","id":0,"name":"r","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Red (0-255.","tags":{}}}],"g":[{"kind":"PropertyDeclaration","id":0,"name":"g","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Green (0-255).","tags":{}}}],"b":[{"kind":"PropertyDeclaration","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Blue (0-255).","tags":{}}}],"fromArray":[{"kind":"MethodDeclaration","id":0,"name":"fromArray","parameters":[{"kind":"Parameter","id":0,"name":"arr","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"fromHex":[{"kind":"MethodDeclaration","id":0,"name":"fromHex","parameters":[{"kind":"Parameter","id":0,"name":"hex","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"NumberKeyword","id":0}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Create color from hex string or literal.","tags":{"example":["```js\nColor.fromHex(0xfcef8d)\nColor.fromHex(\"#5ba675\")\nColor.fromHex(\"d46eb3\")\n```"],"since":["v3000.0"]}}}],"fromHSL":[{"kind":"MethodDeclaration","id":0,"name":"fromHSL","parameters":[{"kind":"Parameter","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"s","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"l","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"RED":[{"kind":"PropertyDeclaration","id":0,"name":"RED","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"GREEN":[{"kind":"PropertyDeclaration","id":0,"name":"GREEN","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"BLUE":[{"kind":"PropertyDeclaration","id":0,"name":"BLUE","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"YELLOW":[{"kind":"PropertyDeclaration","id":0,"name":"YELLOW","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"MAGENTA":[{"kind":"PropertyDeclaration","id":0,"name":"MAGENTA","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"CYAN":[{"kind":"PropertyDeclaration","id":0,"name":"CYAN","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"WHITE":[{"kind":"PropertyDeclaration","id":0,"name":"WHITE","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"BLACK":[{"kind":"PropertyDeclaration","id":0,"name":"BLACK","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"lighten":[{"kind":"MethodDeclaration","id":0,"name":"lighten","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Lighten the color (adds RGB by n).","tags":{}}}],"darken":[{"kind":"MethodDeclaration","id":0,"name":"darken","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Darkens the color (subtracts RGB by n).","tags":{}}}],"invert":[{"kind":"MethodDeclaration","id":0,"name":"invert","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"mult":[{"kind":"MethodDeclaration","id":0,"name":"mult","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"lerp":[{"kind":"MethodDeclaration","id":0,"name":"lerp","parameters":[{"kind":"Parameter","id":0,"name":"dest","type":{"kind":"TypeReference","id":0,"typeName":"Color"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Linear interpolate to a destination color.","tags":{"since":["v3000.0"]}}}],"toHSL":[{"kind":"MethodDeclaration","id":0,"name":"toHSL","parameters":[],"type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},"jsDoc":{"doc":"Convert color into HSL format.","tags":{"since":["v3001.0"]}}}],"eq":[{"kind":"MethodDeclaration","id":0,"name":"eq","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"type":{"kind":"BooleanKeyword","id":0}}],"toHex":[{"kind":"MethodDeclaration","id":0,"name":"toHex","parameters":[],"type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"Return the hex string of color.","tags":{"since":["v3000.0"]}}}],"toArray":[{"kind":"MethodDeclaration","id":0,"name":"toArray","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"NumberKeyword","id":0}]},"jsDoc":{"doc":"Return the color converted to an array.","tags":{"since":["v3001.0"]}}}]},"jsDoc":{"doc":"0-255 RGBA color.","tags":{"group":["Math"]}}}],"ColorArgs":[{"kind":"TypeAliasDeclaration","id":0,"name":"ColorArgs","type":{"kind":"UnionType","id":0,"types":[{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Color"}]},{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"NumberKeyword","id":0}]},{"kind":"TypeReference","id":0,"typeName":"RGBValue"},{"kind":"TypeReference","id":0,"typeName":"RGBAValue"},{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]},{"kind":"TupleType","id":0,"elements":[{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}]},{"kind":"TupleType","id":0,"elements":[]}]}}],"Vec2Args":[{"kind":"TypeAliasDeclaration","id":0,"name":"Vec2Args","type":{"kind":"UnionType","id":0,"types":[{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0}]},{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},{"kind":"TupleType","id":0,"elements":[{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}]},{"kind":"TupleType","id":0,"elements":[]}]},"jsDoc":{"doc":"Possible arguments for a Vec2.","tags":{"group":["Math"]}}}],"Vec2":[{"kind":"ClassDeclaration","id":0,"name":"Vec2","members":{"x":[{"kind":"PropertyDeclaration","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The x coordinate","tags":{}}}],"y":[{"kind":"PropertyDeclaration","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The y coordinate","tags":{}}}],"fromAngle":[{"kind":"MethodDeclaration","id":0,"name":"fromAngle","parameters":[{"kind":"Parameter","id":0,"name":"deg","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Create a new Vec2 from an angle in degrees","tags":{}}}],"fromArray":[{"kind":"MethodDeclaration","id":0,"name":"fromArray","parameters":[{"kind":"Parameter","id":0,"name":"arr","type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"NumberKeyword","id":0}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Create a new Vec2 from an array","tags":{}}}],"LEFT":[{"kind":"PropertyDeclaration","id":0,"name":"LEFT","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"RIGHT":[{"kind":"PropertyDeclaration","id":0,"name":"RIGHT","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"UP":[{"kind":"PropertyDeclaration","id":0,"name":"UP","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"DOWN":[{"kind":"PropertyDeclaration","id":0,"name":"DOWN","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Clone the vector","tags":{}}}],"add":[{"kind":"MethodDeclaration","id":0,"name":"add","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Returns the addition with another vector.","tags":{}}}],"sub":[{"kind":"MethodDeclaration","id":0,"name":"sub","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Returns the subtraction with another vector.","tags":{}}}],"scale":[{"kind":"MethodDeclaration","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Scale by another vector. or a single number","tags":{}}}],"dist":[{"kind":"MethodDeclaration","id":0,"name":"dist","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get distance between another vector","tags":{}}}],"sdist":[{"kind":"MethodDeclaration","id":0,"name":"sdist","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get squared distance between another vector","tags":{}}}],"len":[{"kind":"MethodDeclaration","id":0,"name":"len","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"slen":[{"kind":"MethodDeclaration","id":0,"name":"slen","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get squared length of the vector","tags":{"since":["v3000.0"]}}}],"unit":[{"kind":"MethodDeclaration","id":0,"name":"unit","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the unit vector (length of 1).","tags":{}}}],"normal":[{"kind":"MethodDeclaration","id":0,"name":"normal","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the perpendicular vector.","tags":{}}}],"reflect":[{"kind":"MethodDeclaration","id":0,"name":"reflect","parameters":[{"kind":"Parameter","id":0,"name":"normal","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the reflection of a vector with a normal.","tags":{"since":["v3000.0"]}}}],"project":[{"kind":"MethodDeclaration","id":0,"name":"project","parameters":[{"kind":"Parameter","id":0,"name":"on","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the projection of a vector onto another vector.","tags":{"since":["v3000.0"]}}}],"reject":[{"kind":"MethodDeclaration","id":0,"name":"reject","parameters":[{"kind":"Parameter","id":0,"name":"on","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the rejection of a vector onto another vector.","tags":{"since":["v3000.0"]}}}],"dot":[{"kind":"MethodDeclaration","id":0,"name":"dot","parameters":[{"kind":"Parameter","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the dot product with another vector.","tags":{}}}],"cross":[{"kind":"MethodDeclaration","id":0,"name":"cross","parameters":[{"kind":"Parameter","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the cross product with another vector.","tags":{"since":["v3000.0"]}}}],"angle":[{"kind":"MethodDeclaration","id":0,"name":"angle","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the angle of the vector in degrees.","tags":{}}}],"angleBetween":[{"kind":"MethodDeclaration","id":0,"name":"angleBetween","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the angle between this vector and another vector.","tags":{"since":["v3000.0"]}}}],"lerp":[{"kind":"MethodDeclaration","id":0,"name":"lerp","parameters":[{"kind":"Parameter","id":0,"name":"dest","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Linear interpolate to a destination vector (for positions).","tags":{}}}],"slerp":[{"kind":"MethodDeclaration","id":0,"name":"slerp","parameters":[{"kind":"Parameter","id":0,"name":"dest","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Spherical linear interpolate to a destination vector (for rotations).","tags":{"since":["v3000.0"]}}}],"isZero":[{"kind":"MethodDeclaration","id":0,"name":"isZero","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the vector (x, y) is zero.","tags":{"since":["v3000.0"]}}}],"toFixed":[{"kind":"MethodDeclaration","id":0,"name":"toFixed","parameters":[{"kind":"Parameter","id":0,"name":"n","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"To n precision floating point.","tags":{}}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Multiply by a Mat4.","tags":{"since":["v3000.0"]}}}],"eq":[{"kind":"MethodDeclaration","id":0,"name":"eq","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"toArray":[{"kind":"MethodDeclaration","id":0,"name":"toArray","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"NumberKeyword","id":0}]}}]},"jsDoc":{"doc":"A 2D vector.","tags":{"group":["Math"]}}}],"Quad":[{"kind":"ClassDeclaration","id":0,"name":"Quad","members":{"x":[{"kind":"PropertyDeclaration","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertyDeclaration","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"w":[{"kind":"PropertyDeclaration","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertyDeclaration","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}],"scale":[{"kind":"MethodDeclaration","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Quad"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Quad"}}],"pos":[{"kind":"MethodDeclaration","id":0,"name":"pos","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Quad"}}],"eq":[{"kind":"MethodDeclaration","id":0,"name":"eq","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Quad"}}],"type":{"kind":"BooleanKeyword","id":0}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Mat2":[{"kind":"ClassDeclaration","id":0,"name":"Mat2","members":{"a":[{"kind":"PropertyDeclaration","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"b":[{"kind":"PropertyDeclaration","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"c":[{"kind":"PropertyDeclaration","id":0,"name":"c","type":{"kind":"NumberKeyword","id":0}}],"d":[{"kind":"PropertyDeclaration","id":0,"name":"d","type":{"kind":"NumberKeyword","id":0}}],"mul":[{"kind":"MethodDeclaration","id":0,"name":"mul","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"inverse":[{"kind":"GetAccessor","id":0,"name":"inverse","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"transpose":[{"kind":"GetAccessor","id":0,"name":"transpose","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"eigenvalues":[{"kind":"GetAccessor","id":0,"name":"eigenvalues","parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"eigenvectors":[{"kind":"MethodDeclaration","id":0,"name":"eigenvectors","parameters":[{"kind":"Parameter","id":0,"name":"e1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"e2","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}}],"det":[{"kind":"GetAccessor","id":0,"name":"det","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"trace":[{"kind":"GetAccessor","id":0,"name":"trace","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"rotation":[{"kind":"MethodDeclaration","id":0,"name":"rotation","parameters":[{"kind":"Parameter","id":0,"name":"radians","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"scale":[{"kind":"MethodDeclaration","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}]}}],"Mat4":[{"kind":"ClassDeclaration","id":0,"name":"Mat4","members":{"m":[{"kind":"PropertyDeclaration","id":0,"name":"m","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"translate":[{"kind":"MethodDeclaration","id":0,"name":"translate","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}},{"kind":"MethodDeclaration","id":0,"name":"translate","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"ThisType","id":0}}],"scale":[{"kind":"MethodDeclaration","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}},{"kind":"MethodDeclaration","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"ThisType","id":0}}],"rotateX":[{"kind":"MethodDeclaration","id":0,"name":"rotateX","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"rotateY":[{"kind":"MethodDeclaration","id":0,"name":"rotateY","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"rotateZ":[{"kind":"MethodDeclaration","id":0,"name":"rotateZ","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"rotate":[{"kind":"MethodDeclaration","id":0,"name":"rotate","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"mult":[{"kind":"MethodDeclaration","id":0,"name":"mult","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"multVec2":[{"kind":"MethodDeclaration","id":0,"name":"multVec2","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"getTranslation":[{"kind":"MethodDeclaration","id":0,"name":"getTranslation","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"getScale":[{"kind":"MethodDeclaration","id":0,"name":"getScale","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"getRotation":[{"kind":"MethodDeclaration","id":0,"name":"getRotation","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"getSkew":[{"kind":"MethodDeclaration","id":0,"name":"getSkew","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"invert":[{"kind":"MethodDeclaration","id":0,"name":"invert","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"RNG":[{"kind":"ClassDeclaration","id":0,"name":"RNG","members":{"seed":[{"kind":"PropertyDeclaration","id":0,"name":"seed","type":{"kind":"NumberKeyword","id":0}}],"gen":[{"kind":"MethodDeclaration","id":0,"name":"gen","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"genNumber":[{"kind":"MethodDeclaration","id":0,"name":"genNumber","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"genVec2":[{"kind":"MethodDeclaration","id":0,"name":"genVec2","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"genColor":[{"kind":"MethodDeclaration","id":0,"name":"genColor","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"Color"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"genAny":[{"kind":"MethodDeclaration","id":0,"name":"genAny","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","default":{"kind":"TypeReference","id":0,"typeName":"RNGValue"}}],"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"UnionType","id":0,"types":[{"kind":"TupleType","id":0,"elements":[]},{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"T"}]},{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"TypeReference","id":0,"typeName":"T"}]}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"T"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"ShapeType":[{"kind":"TypeAliasDeclaration","id":0,"name":"ShapeType","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Point"},{"kind":"TypeReference","id":0,"typeName":"Circle"},{"kind":"TypeReference","id":0,"typeName":"Line"},{"kind":"TypeReference","id":0,"typeName":"Rect"},{"kind":"TypeReference","id":0,"typeName":"Polygon"},{"kind":"TypeReference","id":0,"typeName":"Ellipse"}]},"jsDoc":{"tags":{"group":["Math"]}}}],"RaycastHit":[{"kind":"TypeAliasDeclaration","id":0,"name":"RaycastHit","type":{"kind":"TypeLiteral","id":0,"members":{"fraction":[{"kind":"PropertySignature","id":0,"name":"fraction","type":{"kind":"NumberKeyword","id":0}}],"normal":[{"kind":"PropertySignature","id":0,"name":"normal","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"point":[{"kind":"PropertySignature","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"gridPos":[{"kind":"PropertySignature","id":0,"name":"gridPos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true}],"object":[{"kind":"PropertySignature","id":0,"name":"object","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"},"questionToken":true}]}},"jsDoc":{"tags":{"group":["Math"]}}}],"RaycastResult":[{"kind":"TypeAliasDeclaration","id":0,"name":"RaycastResult","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RaycastHit"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Point":[{"kind":"ClassDeclaration","id":0,"name":"Point","members":{"pt":[{"kind":"PropertyDeclaration","id":0,"name":"pt","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Point"}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"area":[{"kind":"MethodDeclaration","id":0,"name":"area","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Point"}}],"collides":[{"kind":"MethodDeclaration","id":0,"name":"collides","parameters":[{"kind":"Parameter","id":0,"name":"shape","type":{"kind":"TypeReference","id":0,"typeName":"ShapeType"}}],"type":{"kind":"BooleanKeyword","id":0}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"raycast":[{"kind":"MethodDeclaration","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"}}],"random":[{"kind":"MethodDeclaration","id":0,"name":"random","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]}}],"Line":[{"kind":"ClassDeclaration","id":0,"name":"Line","members":{"p1":[{"kind":"PropertyDeclaration","id":0,"name":"p1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"p2":[{"kind":"PropertyDeclaration","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Line"}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"area":[{"kind":"MethodDeclaration","id":0,"name":"area","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Line"}}],"collides":[{"kind":"MethodDeclaration","id":0,"name":"collides","parameters":[{"kind":"Parameter","id":0,"name":"shape","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"ShapeType"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"type":{"kind":"BooleanKeyword","id":0}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"raycast":[{"kind":"MethodDeclaration","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"}}],"random":[{"kind":"MethodDeclaration","id":0,"name":"random","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Rect":[{"kind":"ClassDeclaration","id":0,"name":"Rect","members":{"pos":[{"kind":"PropertyDeclaration","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"width":[{"kind":"PropertyDeclaration","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertyDeclaration","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"fromPoints":[{"kind":"MethodDeclaration","id":0,"name":"fromPoints","parameters":[{"kind":"Parameter","id":0,"name":"p1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"center":[{"kind":"MethodDeclaration","id":0,"name":"center","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"points":[{"kind":"MethodDeclaration","id":0,"name":"points","parameters":[],"type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"area":[{"kind":"MethodDeclaration","id":0,"name":"area","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"distToPoint":[{"kind":"MethodDeclaration","id":0,"name":"distToPoint","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"NumberKeyword","id":0}}],"sdistToPoint":[{"kind":"MethodDeclaration","id":0,"name":"sdistToPoint","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"NumberKeyword","id":0}}],"collides":[{"kind":"MethodDeclaration","id":0,"name":"collides","parameters":[{"kind":"Parameter","id":0,"name":"shape","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"ShapeType"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"type":{"kind":"BooleanKeyword","id":0}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"raycast":[{"kind":"MethodDeclaration","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"}}],"random":[{"kind":"MethodDeclaration","id":0,"name":"random","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Circle":[{"kind":"ClassDeclaration","id":0,"name":"Circle","members":{"center":[{"kind":"PropertyDeclaration","id":0,"name":"center","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"radius":[{"kind":"PropertyDeclaration","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"tr","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Ellipse"}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"area":[{"kind":"MethodDeclaration","id":0,"name":"area","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Circle"}}],"collides":[{"kind":"MethodDeclaration","id":0,"name":"collides","parameters":[{"kind":"Parameter","id":0,"name":"shape","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"ShapeType"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"type":{"kind":"BooleanKeyword","id":0}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"raycast":[{"kind":"MethodDeclaration","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"}}],"random":[{"kind":"MethodDeclaration","id":0,"name":"random","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Ellipse":[{"kind":"ClassDeclaration","id":0,"name":"Ellipse","members":{"center":[{"kind":"PropertyDeclaration","id":0,"name":"center","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"radiusX":[{"kind":"PropertyDeclaration","id":0,"name":"radiusX","type":{"kind":"NumberKeyword","id":0}}],"radiusY":[{"kind":"PropertyDeclaration","id":0,"name":"radiusY","type":{"kind":"NumberKeyword","id":0}}],"angle":[{"kind":"PropertyDeclaration","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"fromMat2":[{"kind":"MethodDeclaration","id":0,"name":"fromMat2","parameters":[{"kind":"Parameter","id":0,"name":"tr","type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Ellipse"}}],"toMat2":[{"kind":"MethodDeclaration","id":0,"name":"toMat2","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"tr","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Ellipse"}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"area":[{"kind":"MethodDeclaration","id":0,"name":"area","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Ellipse"}}],"collides":[{"kind":"MethodDeclaration","id":0,"name":"collides","parameters":[{"kind":"Parameter","id":0,"name":"shape","type":{"kind":"TypeReference","id":0,"typeName":"ShapeType"}}],"type":{"kind":"BooleanKeyword","id":0}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"raycast":[{"kind":"MethodDeclaration","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"}}],"random":[{"kind":"MethodDeclaration","id":0,"name":"random","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Polygon":[{"kind":"ClassDeclaration","id":0,"name":"Polygon","members":{"pts":[{"kind":"PropertyDeclaration","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"area":[{"kind":"MethodDeclaration","id":0,"name":"area","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}],"collides":[{"kind":"MethodDeclaration","id":0,"name":"collides","parameters":[{"kind":"Parameter","id":0,"name":"shape","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"ShapeType"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"type":{"kind":"BooleanKeyword","id":0}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"raycast":[{"kind":"MethodDeclaration","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"}}],"random":[{"kind":"MethodDeclaration","id":0,"name":"random","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"cut":[{"kind":"MethodDeclaration","id":0,"name":"cut","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TupleType","id":0,"elements":[{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Polygon"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Polygon"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}]}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"StepPosition":[{"kind":"TypeAliasDeclaration","id":0,"name":"StepPosition","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"jump-start","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"jump-end","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"jump-none","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"jump-both","hasExtendedUnicodeEscape":false}}]}}],"DrawCurveOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawCurveOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"segments":[{"kind":"PropertySignature","id":0,"name":"segments","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The amount of line segments to draw.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The width of the line.","tags":{}}}]}}]}}],"DrawBezierOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawBezierOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"DrawCurveOpt"},{"kind":"TypeLiteral","id":0,"members":{"pt1":[{"kind":"PropertySignature","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The first point.","tags":{}}}],"pt2":[{"kind":"PropertySignature","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The the first control point.","tags":{}}}],"pt3":[{"kind":"PropertySignature","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The the second control point.","tags":{}}}],"pt4":[{"kind":"PropertySignature","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The second point.","tags":{}}}]}}]}}],"DrawCircleOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawCircleOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Omit","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"angle","hasExtendedUnicodeEscape":false}}]},{"kind":"TypeLiteral","id":0,"members":{"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Radius of the circle.","tags":{}}}],"start":[{"kind":"PropertySignature","id":0,"name":"start","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Starting angle.","tags":{}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the shape with color (set this to false if you only want an outline).","tags":{}}}],"gradient":[{"kind":"PropertySignature","id":0,"name":"gradient","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"TypeReference","id":0,"typeName":"Color"}]},"questionToken":true,"jsDoc":{"doc":"Use gradient instead of solid color.","tags":{"since":["v3000.0"]}}}],"resolution":[{"kind":"PropertySignature","id":0,"name":"resolution","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Multiplier for circle vertices resolution (default 1)","tags":{}}}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"The anchor point, or the pivot point. Default to \"topleft\".","tags":{}}}]}}]},"jsDoc":{"doc":"How the circle should look like.","tags":{}}}],"GfxFont":[{"kind":"InterfaceDeclaration","id":0,"name":"GfxFont","members":{"tex":[{"kind":"PropertySignature","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"map":[{"kind":"PropertySignature","id":0,"name":"map","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Quad"}]}}],"size":[{"kind":"PropertySignature","id":0,"name":"size","type":{"kind":"NumberKeyword","id":0}}]}}],"BitmapFontData":[{"kind":"TypeAliasDeclaration","id":0,"name":"BitmapFontData","type":{"kind":"TypeReference","id":0,"typeName":"GfxFont"}}],"LoadBitmapFontOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"LoadBitmapFontOpt","members":{"chars":[{"kind":"PropertySignature","id":0,"name":"chars","type":{"kind":"StringKeyword","id":0},"questionToken":true}],"filter":[{"kind":"PropertySignature","id":0,"name":"filter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}],"outline":[{"kind":"PropertySignature","id":0,"name":"outline","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]}}],"FontData":[{"kind":"ClassDeclaration","id":0,"name":"FontData","members":{"fontface":[{"kind":"PropertyDeclaration","id":0,"name":"fontface","type":{"kind":"TypeReference","id":0,"typeName":"FontFace"}}],"filter":[{"kind":"PropertyDeclaration","id":0,"name":"filter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"}}],"outline":[{"kind":"PropertyDeclaration","id":0,"name":"outline","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Outline"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"size":[{"kind":"PropertyDeclaration","id":0,"name":"size","type":{"kind":"NumberKeyword","id":0}}]}}],"DrawTextOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawTextOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"text":[{"kind":"PropertySignature","id":0,"name":"text","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"The text to render.","tags":{}}}],"font":[{"kind":"PropertySignature","id":0,"name":"font","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"FontData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"FontData"}]},{"kind":"TypeReference","id":0,"typeName":"BitmapFontData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"BitmapFontData"}]}]},"questionToken":true,"jsDoc":{"doc":"The name of font to use.","tags":{}}}],"size":[{"kind":"PropertySignature","id":0,"name":"size","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The size of text (the height of each character).","tags":{}}}],"align":[{"kind":"PropertySignature","id":0,"name":"align","type":{"kind":"TypeReference","id":0,"typeName":"TextAlign"},"questionToken":true,"jsDoc":{"doc":"Text alignment (default \"left\")","tags":{"since":["v3000.0"]}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The maximum width. Will wrap word around if exceed.","tags":{}}}],"lineSpacing":[{"kind":"PropertySignature","id":0,"name":"lineSpacing","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The gap between each line (only available for bitmap fonts).","tags":{"since":["v2000.2"]}}}],"letterSpacing":[{"kind":"PropertySignature","id":0,"name":"letterSpacing","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The gap between each character (only available for bitmap fonts).","tags":{"since":["v2000.2"]}}}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"The anchor point, or the pivot point. Default to \"topleft\".","tags":{}}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CharTransform"},{"kind":"TypeReference","id":0,"typeName":"CharTransformFunc"}]},"questionToken":true,"jsDoc":{"doc":"Transform the pos, scale, rotation or color for each character based on the index or char (only available for bitmap fonts).","tags":{"since":["v2000.1"]}}}],"styles":[{"kind":"PropertySignature","id":0,"name":"styles","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CharTransform"},{"kind":"TypeReference","id":0,"typeName":"CharTransformFunc"}]}]},"questionToken":true,"jsDoc":{"doc":"Stylesheet for styled chunks, in the syntax of \"this is a [stylename]styled[/stylename] word\" (only available for bitmap fonts).","tags":{"since":["v2000.2"]}}}]}}]},"jsDoc":{"doc":"How the text should look like.","tags":{"group":["Draw"]}}}],"CharTransformFunc":[{"kind":"TypeAliasDeclaration","id":0,"name":"CharTransformFunc","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"idx","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"ch","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"CharTransform"}},"jsDoc":{"doc":"A function that returns a character transform config. Useful if you're generating dynamic styles.","tags":{}}}],"CharTransform":[{"kind":"InterfaceDeclaration","id":0,"name":"CharTransform","members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"color":[{"kind":"PropertySignature","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"questionToken":true}],"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]},"jsDoc":{"doc":"Describes how to transform each character.","tags":{"group":["Options"]}}}],"TextAlign":[{"kind":"TypeAliasDeclaration","id":0,"name":"TextAlign","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"center","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"right","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"How the text should be aligned.","tags":{"group":["Draw"]}}}],"FormattedText":[{"kind":"TypeAliasDeclaration","id":0,"name":"FormattedText","type":{"kind":"TypeLiteral","id":0,"members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"chars":[{"kind":"PropertySignature","id":0,"name":"chars","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"FormattedChar"}}}],"opt":[{"kind":"PropertySignature","id":0,"name":"opt","type":{"kind":"TypeReference","id":0,"typeName":"DrawTextOpt"}}]}},"jsDoc":{"doc":"Formatted text with info on how and where to render each character.","tags":{}}}],"FormattedChar":[{"kind":"InterfaceDeclaration","id":0,"name":"FormattedChar","members":{"ch":[{"kind":"PropertySignature","id":0,"name":"ch","type":{"kind":"StringKeyword","id":0}}],"tex":[{"kind":"PropertySignature","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"quad":[{"kind":"PropertySignature","id":0,"name":"quad","type":{"kind":"TypeReference","id":0,"typeName":"Quad"}}],"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"color":[{"kind":"PropertySignature","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0}}]},"jsDoc":{"doc":"One formated character.","tags":{}}}],"DrawLineOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawLineOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Omit","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"angle","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"scale","hasExtendedUnicodeEscape":false}}]}]},{"kind":"TypeLiteral","id":0,"members":{"p1":[{"kind":"PropertySignature","id":0,"name":"p1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Starting point of the line.","tags":{}}}],"p2":[{"kind":"PropertySignature","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Ending point of the line.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The width, or thickness of the line,","tags":{}}}]}}]},"jsDoc":{"doc":"How the line should look like.","tags":{}}}],"LineJoin":[{"kind":"TypeAliasDeclaration","id":0,"name":"LineJoin","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"none","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"round","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"bevel","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"miter","hasExtendedUnicodeEscape":false}}]}}],"LineCap":[{"kind":"TypeAliasDeclaration","id":0,"name":"LineCap","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"butt","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"round","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"square","hasExtendedUnicodeEscape":false}}]}}],"DrawLinesOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawLinesOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Omit","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"angle","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"scale","hasExtendedUnicodeEscape":false}}]}]},{"kind":"TypeLiteral","id":0,"members":{"pts":[{"kind":"PropertySignature","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"The points that should be connected with a line.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The width, or thickness of the lines,","tags":{}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}]},"questionToken":true,"jsDoc":{"doc":"The radius of each corner.","tags":{}}}],"join":[{"kind":"PropertySignature","id":0,"name":"join","type":{"kind":"TypeReference","id":0,"typeName":"LineJoin"},"questionToken":true,"jsDoc":{"doc":"Line join style (default \"none\").","tags":{}}}],"cap":[{"kind":"PropertySignature","id":0,"name":"cap","type":{"kind":"TypeReference","id":0,"typeName":"LineCap"},"questionToken":true,"jsDoc":{"doc":"Line cap style (default \"none\").","tags":{}}}],"miterLimit":[{"kind":"PropertySignature","id":0,"name":"miterLimit","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Maximum miter length, anything longer becomes bevel.","tags":{}}}]}}]},"jsDoc":{"doc":"How the lines should look like.","tags":{}}}],"DrawRectOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawRectOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width of the rectangle.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height of the rectangle.","tags":{}}}],"gradient":[{"kind":"PropertySignature","id":0,"name":"gradient","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"TypeReference","id":0,"typeName":"Color"}]},"questionToken":true,"jsDoc":{"doc":"Use gradient instead of solid color.","tags":{"since":["v3000.0"]}}}],"horizontal":[{"kind":"PropertySignature","id":0,"name":"horizontal","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If the gradient should be horizontal.","tags":{"since":["v3000.0"]}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the shape with color (set this to false if you only want an outline).","tags":{}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}]},"questionToken":true,"jsDoc":{"doc":"The radius of each corner.","tags":{}}}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"The anchor point, or the pivot point. Default to \"topleft\".","tags":{}}}]}}]},"jsDoc":{"doc":"How the rectangle should look like.","tags":{}}}],"Graph":[{"kind":"InterfaceDeclaration","id":0,"name":"Graph","members":{"getNeighbours":[{"kind":"MethodSignature","id":0,"name":"getNeighbours","parameters":[{"kind":"Parameter","id":0,"name":"node","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"getCost":[{"kind":"MethodSignature","id":0,"name":"getCost","parameters":[{"kind":"Parameter","id":0,"name":"node","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"neighbor","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"getHeuristic":[{"kind":"MethodSignature","id":0,"name":"getHeuristic","parameters":[{"kind":"Parameter","id":0,"name":"node","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"goal","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"getPath":[{"kind":"MethodSignature","id":0,"name":"getPath","parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"getWaypointPath":[{"kind":"MethodSignature","id":0,"name":"getWaypointPath","parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}]}}],"Grid":[{"kind":"ClassDeclaration","id":0,"name":"Grid","heritageClauses":[{"kind":"HeritageClause","id":0,"token":119,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Graph"}}]}],"members":{"_columns":[{"kind":"PropertyDeclaration","id":0,"name":"_columns"}],"_rows":[{"kind":"PropertyDeclaration","id":0,"name":"_rows"}],"_tileWidth":[{"kind":"PropertyDeclaration","id":0,"name":"_tileWidth"}],"_tileHeight":[{"kind":"PropertyDeclaration","id":0,"name":"_tileHeight"}],"_data":[{"kind":"PropertyDeclaration","id":0,"name":"_data"}],"_diagonals":[{"kind":"PropertyDeclaration","id":0,"name":"_diagonals"}],"_connMap":[{"kind":"PropertyDeclaration","id":0,"name":"_connMap"}],"_buildConnectivityMap":[{"kind":"PropertyDeclaration","id":0,"name":"_buildConnectivityMap"}],"_getTile":[{"kind":"PropertyDeclaration","id":0,"name":"_getTile"}],"_getTileX":[{"kind":"PropertyDeclaration","id":0,"name":"_getTileX"}],"_getTileY":[{"kind":"PropertyDeclaration","id":0,"name":"_getTileY"}],"getNeighbours":[{"kind":"MethodDeclaration","id":0,"name":"getNeighbours","parameters":[{"kind":"Parameter","id":0,"name":"tile","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"getCost":[{"kind":"MethodDeclaration","id":0,"name":"getCost","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"getHeuristic":[{"kind":"MethodDeclaration","id":0,"name":"getHeuristic","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"getPath":[{"kind":"MethodDeclaration","id":0,"name":"getPath","parameters":[{"kind":"Parameter","id":0,"name":"start","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"goal","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"getWaypointPath":[{"kind":"MethodDeclaration","id":0,"name":"getWaypointPath","parameters":[{"kind":"Parameter","id":0,"name":"start","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"goal","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}]},"jsDoc":{"doc":"A grid is a graph consisting of connected grid cells","tags":{}}}],"NavEdge":[{"kind":"ClassDeclaration","id":0,"name":"NavEdge","members":{"a":[{"kind":"PropertyDeclaration","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"b":[{"kind":"PropertyDeclaration","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"polygon":[{"kind":"PropertyDeclaration","id":0,"name":"polygon","type":{"kind":"TypeReference","id":0,"typeName":"WeakRef","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"NavPolygon"}]}}],"isLeft":[{"kind":"MethodDeclaration","id":0,"name":"isLeft","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"middle":[{"kind":"GetAccessor","id":0,"name":"middle","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]}}],"NavPolygon":[{"kind":"ClassDeclaration","id":0,"name":"NavPolygon","members":{"_edges":[{"kind":"PropertyDeclaration","id":0,"name":"_edges"}],"_centroid":[{"kind":"PropertyDeclaration","id":0,"name":"_centroid"}],"_id":[{"kind":"PropertyDeclaration","id":0,"name":"_id"}],"id":[{"kind":"GetAccessor","id":0,"name":"id","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"edges":[{"kind":"SetAccessor","id":0,"name":"edges","parameters":[{"kind":"Parameter","id":0,"name":"edges","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"NavEdge"}}}]},{"kind":"GetAccessor","id":0,"name":"edges","parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"NavEdge"}}}],"centroid":[{"kind":"GetAccessor","id":0,"name":"centroid","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}]}}],"NavMesh":[{"kind":"ClassDeclaration","id":0,"name":"NavMesh","heritageClauses":[{"kind":"HeritageClause","id":0,"token":119,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Graph"}}]}],"members":{"_polygons":[{"kind":"PropertyDeclaration","id":0,"name":"_polygons"}],"_pointCache":[{"kind":"PropertyDeclaration","id":0,"name":"_pointCache"}],"_edgeCache":[{"kind":"PropertyDeclaration","id":0,"name":"_edgeCache"}],"_addPoint":[{"kind":"PropertyDeclaration","id":0,"name":"_addPoint"}],"_addEdge":[{"kind":"PropertyDeclaration","id":0,"name":"_addEdge"}],"_findEdge":[{"kind":"PropertyDeclaration","id":0,"name":"_findEdge"}],"_findCommonEdge":[{"kind":"PropertyDeclaration","id":0,"name":"_findCommonEdge"}],"addPolygon":[{"kind":"MethodDeclaration","id":0,"name":"addPolygon","parameters":[{"kind":"Parameter","id":0,"name":"vertices","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}],"type":{"kind":"TypeReference","id":0,"typeName":"NavPolygon"}}],"addRect":[{"kind":"MethodDeclaration","id":0,"name":"addRect","parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"size","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"NavPolygon"}}],"_getLocation":[{"kind":"PropertyDeclaration","id":0,"name":"_getLocation"}],"getNeighbours":[{"kind":"MethodDeclaration","id":0,"name":"getNeighbours","parameters":[{"kind":"Parameter","id":0,"name":"index","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"getCost":[{"kind":"MethodDeclaration","id":0,"name":"getCost","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"getHeuristic":[{"kind":"MethodDeclaration","id":0,"name":"getHeuristic","parameters":[{"kind":"Parameter","id":0,"name":"indexA","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"indexB","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"getPath":[{"kind":"MethodDeclaration","id":0,"name":"getPath","parameters":[{"kind":"Parameter","id":0,"name":"start","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"goal","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"getWaypointPath":[{"kind":"MethodDeclaration","id":0,"name":"getWaypointPath","parameters":[{"kind":"Parameter","id":0,"name":"start","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"goal","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}]}}],"DrawSpriteOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawSpriteOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"sprite":[{"kind":"PropertySignature","id":0,"name":"sprite","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SpriteData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}]},"jsDoc":{"doc":"The sprite name in the asset manager, or the raw sprite data.","tags":{}}}],"frame":[{"kind":"PropertySignature","id":0,"name":"frame","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If the sprite is loaded with multiple frames, or sliced, use the frame option to specify which frame to draw.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Width of sprite. If `height` is not specified it'll stretch with aspect ratio. If `tiled` is set to true it'll tiled to the specified width horizontally.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Height of sprite. If `width` is not specified it'll stretch with aspect ratio. If `tiled` is set to true it'll tiled to the specified width vertically.","tags":{}}}],"tiled":[{"kind":"PropertySignature","id":0,"name":"tiled","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"When set to true, `width` and `height` will not scale the sprite but instead render multiple tiled copies of them until the specified width and height. Useful for background texture pattern etc.","tags":{}}}],"flipX":[{"kind":"PropertySignature","id":0,"name":"flipX","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If flip the texture horizontally.","tags":{}}}],"flipY":[{"kind":"PropertySignature","id":0,"name":"flipY","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If flip the texture vertically.","tags":{}}}],"quad":[{"kind":"PropertySignature","id":0,"name":"quad","type":{"kind":"TypeReference","id":0,"typeName":"Quad"},"questionToken":true,"jsDoc":{"doc":"The sub-area to render from the texture, by default it'll render the whole `quad(0, 0, 1, 1)`","tags":{}}}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"The anchor point, or the pivot point. Default to \"topleft\".","tags":{}}}]}}]},"jsDoc":{"doc":"How the sprite should look like.","tags":{}}}],"DrawTriangleOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawTriangleOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"p1":[{"kind":"PropertySignature","id":0,"name":"p1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"First point of triangle.","tags":{}}}],"p2":[{"kind":"PropertySignature","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Second point of triangle.","tags":{}}}],"p3":[{"kind":"PropertySignature","id":0,"name":"p3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Third point of triangle.","tags":{}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the shape with color (set this to false if you only want an outline).","tags":{}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The radius of each corner.","tags":{}}}]}}]},"jsDoc":{"doc":"How the triangle should look like.","tags":{}}}],"ShaderData":[{"kind":"TypeAliasDeclaration","id":0,"name":"ShaderData","type":{"kind":"TypeReference","id":0,"typeName":"Shader"}}],"UniformValue":[{"kind":"TypeAliasDeclaration","id":0,"name":"UniformValue","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"TypeReference","id":0,"typeName":"Mat4"},{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Color"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"UniformKey":[{"kind":"TypeAliasDeclaration","id":0,"name":"UniformKey","type":{"kind":"TypeReference","id":0,"typeName":"Exclude","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"u_tex","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Uniform":[{"kind":"TypeAliasDeclaration","id":0,"name":"Uniform","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"UniformKey"},{"kind":"TypeReference","id":0,"typeName":"UniformValue"}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Shader":[{"kind":"ClassDeclaration","id":0,"name":"Shader","members":{"ctx":[{"kind":"PropertyDeclaration","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"glProgram":[{"kind":"PropertyDeclaration","id":0,"name":"glProgram","type":{"kind":"TypeReference","id":0,"typeName":"WebGLProgram"}}],"bind":[{"kind":"MethodDeclaration","id":0,"name":"bind","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"unbind":[{"kind":"MethodDeclaration","id":0,"name":"unbind","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"send":[{"kind":"MethodDeclaration","id":0,"name":"send","parameters":[{"kind":"Parameter","id":0,"name":"uniform","type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}],"type":{"kind":"VoidKeyword","id":0}}],"free":[{"kind":"MethodDeclaration","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]},"jsDoc":{"tags":{"group":["GFX"]}}}],"AppGfxCtx":[{"kind":"TypeAliasDeclaration","id":0,"name":"AppGfxCtx","type":{"kind":"TypeReference","id":0,"typeName":"ReturnType","typeArguments":[{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"initAppGfx"}}]}}],"undefined":[{"kind":"FirstStatement","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initAppGfx","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"gopt","type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYOpt"}},{"kind":"Parameter","id":0,"name":"ggl","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"type":{"kind":"TypeLiteral","id":0,"members":{"lastDrawCalls":[{"kind":"PropertySignature","id":0,"name":"lastDrawCalls","type":{"kind":"NumberKeyword","id":0}}],"ggl":[{"kind":"PropertySignature","id":0,"name":"ggl","type":{"kind":"TypeLiteral","id":0,"members":{"gl":[{"kind":"PropertySignature","id":0,"name":"gl","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderingContext"}}],"opts":[{"kind":"PropertySignature","id":0,"name":"opts","type":{"kind":"TypeLiteral","id":0,"members":{"texFilter":[{"kind":"PropertySignature","id":0,"name":"texFilter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}]}}}],"onDestroy":[{"kind":"PropertySignature","id":0,"name":"onDestroy","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"UnknownKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushTexture2D":[{"kind":"PropertySignature","id":0,"name":"pushTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLTexture"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popTexture2D":[{"kind":"PropertySignature","id":0,"name":"popTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushFramebuffer":[{"kind":"PropertySignature","id":0,"name":"pushFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLFramebuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popFramebuffer":[{"kind":"PropertySignature","id":0,"name":"popFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"pushRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderbuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"popRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushViewport":[{"kind":"PropertySignature","id":0,"name":"pushViewport","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"w":[{"kind":"PropertySignature","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertySignature","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}]}}}],"type":{"kind":"VoidKeyword","id":0}}}],"popViewport":[{"kind":"PropertySignature","id":0,"name":"popViewport","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushProgram":[{"kind":"PropertySignature","id":0,"name":"pushProgram","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLProgram"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popProgram":[{"kind":"PropertySignature","id":0,"name":"popProgram","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"setVertexFormat":[{"kind":"PropertySignature","id":0,"name":"setVertexFormat","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"fmt","type":{"kind":"TypeReference","id":0,"typeName":"VertexFormat"}}],"type":{"kind":"VoidKeyword","id":0}}}]}}}],"defShader":[{"kind":"PropertySignature","id":0,"name":"defShader","type":{"kind":"TypeReference","id":0,"typeName":"Shader"}}],"defTex":[{"kind":"PropertySignature","id":0,"name":"defTex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"frameBuffer":[{"kind":"PropertySignature","id":0,"name":"frameBuffer","type":{"kind":"TypeReference","id":0,"typeName":"FrameBuffer"}}],"postShader":[{"kind":"PropertySignature","id":0,"name":"postShader","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"postShaderUniform":[{"kind":"PropertySignature","id":0,"name":"postShaderUniform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Uniform"},{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"renderer":[{"kind":"PropertySignature","id":0,"name":"renderer","type":{"kind":"TypeReference","id":0,"typeName":"BatchRenderer"}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"transformStack":[{"kind":"PropertySignature","id":0,"name":"transformStack","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}}],"bgTex":[{"kind":"PropertySignature","id":0,"name":"bgTex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"bgColor":[{"kind":"PropertySignature","id":0,"name":"bgColor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"bgAlpha":[{"kind":"PropertySignature","id":0,"name":"bgAlpha","type":{"kind":"NumberKeyword","id":0}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"viewport":[{"kind":"PropertySignature","id":0,"name":"viewport","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}]}}}],"fixed":[{"kind":"PropertySignature","id":0,"name":"fixed","type":{"kind":"BooleanKeyword","id":0}}]}}}}]}},{"kind":"FirstStatement","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initAssets","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"ggl","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"type":{"kind":"TypeLiteral","id":0,"members":{"urlPrefix":[{"kind":"PropertySignature","id":0,"name":"urlPrefix","type":{"kind":"StringKeyword","id":0}}],"sprites":[{"kind":"PropertySignature","id":0,"name":"sprites","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}}],"fonts":[{"kind":"PropertySignature","id":0,"name":"fonts","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"FontData"}]}}],"bitmapFonts":[{"kind":"PropertySignature","id":0,"name":"bitmapFonts","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GfxFont"}]}}],"sounds":[{"kind":"PropertySignature","id":0,"name":"sounds","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]}}],"shaders":[{"kind":"PropertySignature","id":0,"name":"shaders","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Shader"}]}}],"custom":[{"kind":"PropertySignature","id":0,"name":"custom","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"AnyKeyword","id":0}]}}],"music":[{"kind":"PropertySignature","id":0,"name":"music","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"StringKeyword","id":0}]}}],"packer":[{"kind":"PropertySignature","id":0,"name":"packer","type":{"kind":"TypeReference","id":0,"typeName":"TexPacker"}}],"loaded":[{"kind":"PropertySignature","id":0,"name":"loaded","type":{"kind":"BooleanKeyword","id":0}}]}}}}]}},{"kind":"FirstStatement","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initAudio","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"ctx":[{"kind":"PropertySignature","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"AudioContext"}}],"masterNode":[{"kind":"PropertySignature","id":0,"name":"masterNode","type":{"kind":"TypeReference","id":0,"typeName":"GainNode"}}],"burpSnd":[{"kind":"PropertySignature","id":0,"name":"burpSnd","type":{"kind":"TypeReference","id":0,"typeName":"SoundData"}}]}}}}]}},{"kind":"FirstStatement","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initGame","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"events":[{"kind":"PropertySignature","id":0,"name":"events","type":{"kind":"TypeReference","id":0,"typeName":"KEventHandler","typeArguments":[{"kind":"TypeLiteral","id":0,"members":{"mouseMove":[{"kind":"PropertySignature","id":0,"name":"mouseMove","type":{"kind":"TupleType","id":0,"elements":[]}}],"mouseDown":[{"kind":"PropertySignature","id":0,"name":"mouseDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"mousePress":[{"kind":"PropertySignature","id":0,"name":"mousePress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"mouseRelease":[{"kind":"PropertySignature","id":0,"name":"mouseRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"charInput":[{"kind":"PropertySignature","id":0,"name":"charInput","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"keyPress":[{"kind":"PropertySignature","id":0,"name":"keyPress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyDown":[{"kind":"PropertySignature","id":0,"name":"keyDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyPressRepeat":[{"kind":"PropertySignature","id":0,"name":"keyPressRepeat","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyRelease":[{"kind":"PropertySignature","id":0,"name":"keyRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"touchStart":[{"kind":"PropertySignature","id":0,"name":"touchStart","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"touchMove":[{"kind":"PropertySignature","id":0,"name":"touchMove","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"touchEnd":[{"kind":"PropertySignature","id":0,"name":"touchEnd","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"gamepadButtonDown":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadButtonPress":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonPress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadButtonRelease":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadStick":[{"kind":"PropertySignature","id":0,"name":"gamepadStick","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"gamepadConnect":[{"kind":"PropertySignature","id":0,"name":"gamepadConnect","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Gamepad"}]}}],"gamepadDisconnect":[{"kind":"PropertySignature","id":0,"name":"gamepadDisconnect","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Gamepad"}]}}],"scroll":[{"kind":"PropertySignature","id":0,"name":"scroll","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"add":[{"kind":"PropertySignature","id":0,"name":"add","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"GameObj"}]}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"GameObj"}]}}],"load":[{"kind":"PropertySignature","id":0,"name":"load","type":{"kind":"TupleType","id":0,"elements":[]}}],"loading":[{"kind":"PropertySignature","id":0,"name":"loading","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0}]}}],"error":[{"kind":"PropertySignature","id":0,"name":"error","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Error"}]}}],"input":[{"kind":"PropertySignature","id":0,"name":"input","type":{"kind":"TupleType","id":0,"elements":[]}}],"frameEnd":[{"kind":"PropertySignature","id":0,"name":"frameEnd","type":{"kind":"TupleType","id":0,"elements":[]}}],"resize":[{"kind":"PropertySignature","id":0,"name":"resize","type":{"kind":"TupleType","id":0,"elements":[]}}],"sceneLeave":[{"kind":"PropertySignature","id":0,"name":"sceneLeave","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}]}}]}}],"objEvents":[{"kind":"PropertySignature","id":0,"name":"objEvents","type":{"kind":"TypeReference","id":0,"typeName":"KEventHandler","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GameObjEventMap"}]}}],"root":[{"kind":"PropertySignature","id":0,"name":"root","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TimerComp"}]}}],"gravity":[{"kind":"PropertySignature","id":0,"name":"gravity","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"scenes":[{"kind":"PropertySignature","id":0,"name":"scenes","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SceneName"},{"kind":"TypeReference","id":0,"typeName":"SceneDef"}]}}],"currentScene":[{"kind":"PropertySignature","id":0,"name":"currentScene","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"SceneName"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"layers":[{"kind":"PropertySignature","id":0,"name":"layers","type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"defaultLayerIndex":[{"kind":"PropertySignature","id":0,"name":"defaultLayerIndex","type":{"kind":"NumberKeyword","id":0}}],"logs":[{"kind":"PropertySignature","id":0,"name":"logs","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeLiteral","id":0,"members":{"msg":[{"kind":"PropertySignature","id":0,"name":"msg","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{}}]}}],"time":[{"kind":"PropertySignature","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}}]}}}}],"cam":[{"kind":"PropertySignature","id":0,"name":"cam","type":{"kind":"TypeLiteral","id":0,"members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"shake":[{"kind":"PropertySignature","id":0,"name":"shake","type":{"kind":"NumberKeyword","id":0}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}]}}}]}}}}]}},{"kind":"FirstStatement","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"kaplay","type":{"kind":"FunctionType","id":0,"typeParameters":[{"kind":"TypeParameter","id":0,"name":"TPlugins","constraint":{"kind":"TypeReference","id":0,"typeName":"PluginList","typeArguments":[{"kind":"UnknownKeyword","id":0}]},"default":{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]}},{"kind":"TypeParameter","id":0,"name":"TButtons","constraint":{"kind":"TypeReference","id":0,"typeName":"ButtonsDef"},"default":{"kind":"TypeLiteral","id":0,"members":{}}},{"kind":"TypeParameter","id":0,"name":"TButtonsName","constraint":{"kind":"StringKeyword","id":0},"default":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"TButtons"}},{"kind":"StringKeyword","id":0}]}}],"parameters":[{"kind":"Parameter","id":0,"name":"gopt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYOpt","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TPlugins"},{"kind":"TypeReference","id":0,"typeName":"TButtons"}]}}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"TPlugins"},"extendsType":{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]},"trueType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TButtons"},{"kind":"TypeReference","id":0,"typeName":"TButtonsName"}]},"falseType":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TButtons"},{"kind":"TypeReference","id":0,"typeName":"TButtonsName"}]},{"kind":"TypeReference","id":0,"typeName":"MergePlugins","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TPlugins"}]}]}}}}]},"jsDoc":{"doc":"Initialize KAPLAY context. The starting point of all KAPLAY games.","tags":{"example":["```js\n// Start KAPLAY with default options (will create a fullscreen canvas under )\nkaplay()\n\n// Init with some options\nkaplay({\n width: 320,\n height: 240,\n font: \"sans-serif\",\n canvas: document.querySelector(\"#mycanvas\"),\n background: [ 0, 0, 255, ],\n})\n\n// All KAPLAY functions are imported to global after calling kaplay()\nadd()\nonUpdate()\nonKeyPress()\nvec2()\n\n// If you want to prevent KAPLAY from importing all functions to global and use a context handle for all KAPLAY functions\nconst k = kaplay({ global: false })\n\nk.add(...)\nk.onUpdate(...)\nk.onKeyPress(...)\nk.vec2(...)\n```"],"group":["Start"]}}},{"kind":"ExportDeclaration","id":0,"isTypeOnly":false,"exportClause":{"kind":"NamedExports","id":0,"elements":[{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"KAPLAYCtx"},"name":"KaboomCtx"},{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"KAPLAYOpt"},"name":"KaboomOpt"},{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"KAPLAYPlugin"},"name":"KaboomPlugin"},{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"KEvent"},"name":"Event"},{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"KEventController"},"name":"EventController"},{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"KEventHandler"},"name":"EventHandler"},{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"kaplay"},"name":"default"}]}},{"kind":"ExportDeclaration","id":0,"isTypeOnly":false,"exportClause":{"kind":"NamedExports","id":0,"elements":[]}}],"TexPacker":[{"kind":"ClassDeclaration","id":0,"name":"TexPacker","members":{"textures":[{"kind":"PropertyDeclaration","id":0,"name":"textures"}],"bigTextures":[{"kind":"PropertyDeclaration","id":0,"name":"bigTextures"}],"canvas":[{"kind":"PropertyDeclaration","id":0,"name":"canvas"}],"c2d":[{"kind":"PropertyDeclaration","id":0,"name":"c2d"}],"x":[{"kind":"PropertyDeclaration","id":0,"name":"x"}],"y":[{"kind":"PropertyDeclaration","id":0,"name":"y"}],"curHeight":[{"kind":"PropertyDeclaration","id":0,"name":"curHeight"}],"gfx":[{"kind":"PropertyDeclaration","id":0,"name":"gfx"}],"add":[{"kind":"MethodDeclaration","id":0,"name":"add","parameters":[{"kind":"Parameter","id":0,"name":"img","type":{"kind":"TypeReference","id":0,"typeName":"ImageSource"}}],"type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Texture"},{"kind":"TypeReference","id":0,"typeName":"Quad"}]}}],"free":[{"kind":"MethodDeclaration","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]}}],"SoundData":[{"kind":"ClassDeclaration","id":0,"name":"SoundData","members":{"buf":[{"kind":"PropertyDeclaration","id":0,"name":"buf","type":{"kind":"TypeReference","id":0,"typeName":"AudioBuffer"}}],"fromArrayBuffer":[{"kind":"MethodDeclaration","id":0,"name":"fromArrayBuffer","parameters":[{"kind":"Parameter","id":0,"name":"buf","type":{"kind":"TypeReference","id":0,"typeName":"ArrayBuffer"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]}}],"fromURL":[{"kind":"MethodDeclaration","id":0,"name":"fromURL","parameters":[{"kind":"Parameter","id":0,"name":"url","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]}}]}}],"SpriteAnim":[{"kind":"TypeAliasDeclaration","id":0,"name":"SpriteAnim","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{"from":[{"kind":"PropertySignature","id":0,"name":"from","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The starting frame.","tags":{}}}],"to":[{"kind":"PropertySignature","id":0,"name":"to","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The end frame.","tags":{}}}],"loop":[{"kind":"PropertySignature","id":0,"name":"loop","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If this anim should be played in loop.","tags":{}}}],"pingpong":[{"kind":"PropertySignature","id":0,"name":"pingpong","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"When looping should it move back instead of go to start frame again.","tags":{}}}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"This anim's speed in frames per second.","tags":{}}}]}}]},"jsDoc":{"doc":"Frame-based animation configuration.","tags":{}}}],"SpriteAnims":[{"kind":"TypeAliasDeclaration","id":0,"name":"SpriteAnims","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SpriteAnim"}]},"jsDoc":{"doc":"A dict of name <-> animation.","tags":{}}}],"LoadSpriteOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"LoadSpriteOpt","members":{"sliceX":[{"kind":"PropertySignature","id":0,"name":"sliceX","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If the defined area contains multiple sprites, how many frames are in the area hozizontally.","tags":{}}}],"sliceY":[{"kind":"PropertySignature","id":0,"name":"sliceY","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If the defined area contains multiple sprites, how many frames are in the area vertically.","tags":{}}}],"slice9":[{"kind":"PropertySignature","id":0,"name":"slice9","type":{"kind":"TypeReference","id":0,"typeName":"NineSlice"},"questionToken":true,"jsDoc":{"doc":"9 slice sprite for proportional scaling.","tags":{"since":["v3000.0"]}}}],"frames":[{"kind":"PropertySignature","id":0,"name":"frames","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Quad"}},"questionToken":true,"jsDoc":{"doc":"Individual frames.","tags":{"since":["v3000.0"]}}}],"anims":[{"kind":"PropertySignature","id":0,"name":"anims","type":{"kind":"TypeReference","id":0,"typeName":"SpriteAnims"},"questionToken":true,"jsDoc":{"doc":"Animation configuration.","tags":{}}}]},"jsDoc":{"doc":"Sprite loading configuration.","tags":{}}}],"NineSlice":[{"kind":"TypeAliasDeclaration","id":0,"name":"NineSlice","type":{"kind":"TypeLiteral","id":0,"members":{"left":[{"kind":"PropertySignature","id":0,"name":"left","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The width of the 9-slice's left column.","tags":{}}}],"right":[{"kind":"PropertySignature","id":0,"name":"right","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The width of the 9-slice's right column.","tags":{}}}],"top":[{"kind":"PropertySignature","id":0,"name":"top","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The height of the 9-slice's top row.","tags":{}}}],"bottom":[{"kind":"PropertySignature","id":0,"name":"bottom","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The height of the 9-slice's bottom row.","tags":{}}}]}}}],"LoadSpriteSrc":[{"kind":"TypeAliasDeclaration","id":0,"name":"LoadSpriteSrc","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"ImageSource"}]}}],"SpriteData":[{"kind":"ClassDeclaration","id":0,"name":"SpriteData","members":{"tex":[{"kind":"PropertyDeclaration","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"frames":[{"kind":"PropertyDeclaration","id":0,"name":"frames","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Quad"}}}],"anims":[{"kind":"PropertyDeclaration","id":0,"name":"anims","type":{"kind":"TypeReference","id":0,"typeName":"SpriteAnims"}}],"slice9":[{"kind":"PropertyDeclaration","id":0,"name":"slice9","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"NineSlice"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"width":[{"kind":"GetAccessor","id":0,"name":"width","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"tags":{"since":["v3001.0"]}}}],"height":[{"kind":"GetAccessor","id":0,"name":"height","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"from":[{"kind":"MethodDeclaration","id":0,"name":"from","parameters":[{"kind":"Parameter","id":0,"name":"src","type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteSrc"}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}}],"fromImage":[{"kind":"MethodDeclaration","id":0,"name":"fromImage","parameters":[{"kind":"Parameter","id":0,"name":"data","type":{"kind":"TypeReference","id":0,"typeName":"ImageSource"}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"SpriteData"}}],"fromURL":[{"kind":"MethodDeclaration","id":0,"name":"fromURL","parameters":[{"kind":"Parameter","id":0,"name":"url","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}}]}}],"Asset":[{"kind":"ClassDeclaration","id":0,"name":"Asset","typeParameters":[{"kind":"TypeParameter","id":0,"name":"D"}],"members":{"loaded":[{"kind":"PropertyDeclaration","id":0,"name":"loaded","type":{"kind":"BooleanKeyword","id":0}},{"kind":"MethodDeclaration","id":0,"name":"loaded","typeParameters":[{"kind":"TypeParameter","id":0,"name":"D"}],"parameters":[{"kind":"Parameter","id":0,"name":"data","type":{"kind":"TypeReference","id":0,"typeName":"D"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}],"data":[{"kind":"PropertyDeclaration","id":0,"name":"data","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"D"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"error":[{"kind":"PropertyDeclaration","id":0,"name":"error","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Error"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"onLoadEvents":[{"kind":"PropertyDeclaration","id":0,"name":"onLoadEvents"}],"onErrorEvents":[{"kind":"PropertyDeclaration","id":0,"name":"onErrorEvents"}],"onFinishEvents":[{"kind":"PropertyDeclaration","id":0,"name":"onFinishEvents"}],"onLoad":[{"kind":"MethodDeclaration","id":0,"name":"onLoad","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"data","type":{"kind":"TypeReference","id":0,"typeName":"D"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"ThisType","id":0}}],"onError":[{"kind":"MethodDeclaration","id":0,"name":"onError","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"err","type":{"kind":"TypeReference","id":0,"typeName":"Error"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"ThisType","id":0}}],"onFinish":[{"kind":"MethodDeclaration","id":0,"name":"onFinish","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"ThisType","id":0}}],"then":[{"kind":"MethodDeclaration","id":0,"name":"then","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"data","type":{"kind":"TypeReference","id":0,"typeName":"D"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}],"catch":[{"kind":"MethodDeclaration","id":0,"name":"catch","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"err","type":{"kind":"TypeReference","id":0,"typeName":"Error"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}],"finally":[{"kind":"MethodDeclaration","id":0,"name":"finally","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}]},"jsDoc":{"doc":"An asset is a resource that is loaded asynchronously.","tags":{}}}],"AssetBucket":[{"kind":"ClassDeclaration","id":0,"name":"AssetBucket","typeParameters":[{"kind":"TypeParameter","id":0,"name":"D"}],"members":{"assets":[{"kind":"PropertyDeclaration","id":0,"name":"assets","type":{"kind":"TypeReference","id":0,"typeName":"Map","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}]}}],"lastUID":[{"kind":"PropertyDeclaration","id":0,"name":"lastUID","type":{"kind":"NumberKeyword","id":0}}],"add":[{"kind":"MethodDeclaration","id":0,"name":"add","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"loader","type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}],"addLoaded":[{"kind":"MethodDeclaration","id":0,"name":"addLoaded","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"data","type":{"kind":"TypeReference","id":0,"typeName":"D"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}],"get":[{"kind":"MethodDeclaration","id":0,"name":"get","parameters":[{"kind":"Parameter","id":0,"name":"handle","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]},{"kind":"UndefinedKeyword","id":0}]}}],"progress":[{"kind":"MethodDeclaration","id":0,"name":"progress","parameters":[],"type":{"kind":"NumberKeyword","id":0}}]}}],"AssetsCtx":[{"kind":"TypeAliasDeclaration","id":0,"name":"AssetsCtx","type":{"kind":"TypeReference","id":0,"typeName":"ReturnType","typeArguments":[{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"initAssets"}}]}}],"AsepriteData":[{"kind":"TypeAliasDeclaration","id":0,"name":"AsepriteData","type":{"kind":"TypeLiteral","id":0,"members":{"frames":[{"kind":"PropertySignature","id":0,"name":"frames","type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"TypeLiteral","id":0,"members":{"frame":[{"kind":"PropertySignature","id":0,"name":"frame","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"w":[{"kind":"PropertySignature","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertySignature","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}]}}}]}}]}}],"meta":[{"kind":"PropertySignature","id":0,"name":"meta","type":{"kind":"TypeLiteral","id":0,"members":{"size":[{"kind":"PropertySignature","id":0,"name":"size","type":{"kind":"TypeLiteral","id":0,"members":{"w":[{"kind":"PropertySignature","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertySignature","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}]}}}],"frameTags":[{"kind":"PropertySignature","id":0,"name":"frameTags","type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"TypeLiteral","id":0,"members":{"from":[{"kind":"PropertySignature","id":0,"name":"from","type":{"kind":"NumberKeyword","id":0}}],"to":[{"kind":"PropertySignature","id":0,"name":"to","type":{"kind":"NumberKeyword","id":0}}],"direction":[{"kind":"PropertySignature","id":0,"name":"direction","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"forward","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"reverse","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"pingpong","hasExtendedUnicodeEscape":false}}]}}]}}]}}]}}}]}}}],"PeditFile":[{"kind":"InterfaceDeclaration","id":0,"name":"PeditFile","members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"frames":[{"kind":"PropertySignature","id":0,"name":"frames","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}}],"anims":[{"kind":"PropertySignature","id":0,"name":"anims","type":{"kind":"TypeReference","id":0,"typeName":"SpriteAnims"}}]}}],"SpriteAtlasData":[{"kind":"TypeAliasDeclaration","id":0,"name":"SpriteAtlasData","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SpriteAtlasEntry"}]}}],"SpriteAtlasEntry":[{"kind":"TypeAliasDeclaration","id":0,"name":"SpriteAtlasEntry","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"LoadSpriteOpt"},{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"X position of the top left corner.","tags":{}}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Y position of the top left corner.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Sprite area width.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Sprite area height.","tags":{}}}]}}]},"jsDoc":{"doc":"A sprite in a sprite atlas.","tags":{}}}],"AudioCtx":[{"kind":"TypeAliasDeclaration","id":0,"name":"AudioCtx","type":{"kind":"TypeReference","id":0,"typeName":"ReturnType","typeArguments":[{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"initAudio"}}]}}],"BinaryHeap":[{"kind":"ClassDeclaration","id":0,"name":"BinaryHeap","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"members":{"_items":[{"kind":"PropertyDeclaration","id":0,"name":"_items","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}}}],"_compareFn":[{"kind":"PropertyDeclaration","id":0,"name":"_compareFn","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"T"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"BooleanKeyword","id":0}}}],"insert":[{"kind":"MethodDeclaration","id":0,"name":"insert","parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Insert an item into the binary heap","tags":{}}}],"remove":[{"kind":"MethodDeclaration","id":0,"name":"remove","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Remove the smallest item from the binary heap in case of a min heap\nor the greatest item from the binary heap in case of a max heap","tags":{}}}],"clear":[{"kind":"MethodDeclaration","id":0,"name":"clear","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove all items","tags":{}}}],"moveUp":[{"kind":"MethodDeclaration","id":0,"name":"moveUp","parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"moveDown":[{"kind":"MethodDeclaration","id":0,"name":"moveDown","parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"swap":[{"kind":"MethodDeclaration","id":0,"name":"swap","parameters":[{"kind":"Parameter","id":0,"name":"index1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"index2","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"length":[{"kind":"GetAccessor","id":0,"name":"length","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Returns the amount of items","tags":{}}}]}}],"Registry":[{"kind":"ClassDeclaration","id":0,"name":"Registry","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Map"},"typeArguments":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"T"}]}]}],"members":{"lastID":[{"kind":"PropertyDeclaration","id":0,"name":"lastID"}],"push":[{"kind":"MethodDeclaration","id":0,"name":"push","parameters":[{"kind":"Parameter","id":0,"name":"v","type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"NumberKeyword","id":0}}],"pushd":[{"kind":"MethodDeclaration","id":0,"name":"pushd","parameters":[{"kind":"Parameter","id":0,"name":"v","type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}]}}],"KEventController":[{"kind":"ClassDeclaration","id":0,"name":"KEventController","members":{"paused":[{"kind":"PropertyDeclaration","id":0,"name":"paused","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the event is paused","tags":{}}}],"cancel":[{"kind":"PropertyDeclaration","id":0,"name":"cancel","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"jsDoc":{"doc":"Cancel the event","tags":{}}}],"join":[{"kind":"MethodDeclaration","id":0,"name":"join","parameters":[{"kind":"Parameter","id":0,"name":"events","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}]},"jsDoc":{"doc":"A controller for all events in KAPLAY.","tags":{"example":["```js\n// Create a new event\nconst logHi = onUpdate(() => {\n debug.log(\"hi\");\n});\n\n// Pause the event\nlogHi.paused = true;\n\n// Cancel the event\nlogHi.cancel();\n\n```"],"group":["Events"]}}}],"KEvent":[{"kind":"ClassDeclaration","id":0,"name":"KEvent","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Args","constraint":{"kind":"ArrayType","id":0,"elementType":{"kind":"AnyKeyword","id":0}},"default":{"kind":"ArrayType","id":0,"elementType":{"kind":"AnyKeyword","id":0}}}],"members":{"handlers":[{"kind":"PropertyDeclaration","id":0,"name":"handlers"}],"add":[{"kind":"MethodDeclaration","id":0,"name":"add","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Args"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"addOnce":[{"kind":"MethodDeclaration","id":0,"name":"addOnce","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"ParenthesizedType","id":0,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Args"},{"kind":"TypeReference","id":0,"typeName":"PromiseLike","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Args"}]}]}}}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"next":[{"kind":"MethodDeclaration","id":0,"name":"next","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Args"}]}}],"trigger":[{"kind":"MethodDeclaration","id":0,"name":"trigger","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Args"}}],"type":{"kind":"VoidKeyword","id":0}}],"numListeners":[{"kind":"MethodDeclaration","id":0,"name":"numListeners","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clear":[{"kind":"MethodDeclaration","id":0,"name":"clear","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]}}],"KEventHandler":[{"kind":"ClassDeclaration","id":0,"name":"KEventHandler","typeParameters":[{"kind":"TypeParameter","id":0,"name":"EventMap","constraint":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"AnyKeyword","id":0}}]}}],"members":{"handlers":[{"kind":"PropertyDeclaration","id":0,"name":"handlers"}],"registers":[{"kind":"PropertyDeclaration","id":0,"name":"registers","type":{"kind":"TypeReference","id":0,"typeName":"Partial","typeArguments":[{"kind":"MappedType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}},"type":{"kind":"TypeReference","id":0,"typeName":"Registry","typeArguments":[{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"EventMap"},"indexType":{"kind":"TypeReference","id":0,"typeName":"Name"}}}],"type":{"kind":"VoidKeyword","id":0}}]},"members":{}}]}}],"on":[{"kind":"MethodDeclaration","id":0,"name":"on","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"TypeReference","id":0,"typeName":"Name"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"EventMap"},"indexType":{"kind":"TypeReference","id":0,"typeName":"Name"}}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onOnce":[{"kind":"MethodDeclaration","id":0,"name":"onOnce","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"TypeReference","id":0,"typeName":"Name"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"EventMap"},"indexType":{"kind":"TypeReference","id":0,"typeName":"Name"}}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"next":[{"kind":"MethodDeclaration","id":0,"name":"next","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"TypeReference","id":0,"typeName":"Name"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"UnknownKeyword","id":0}]}}],"trigger":[{"kind":"MethodDeclaration","id":0,"name":"trigger","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"TypeReference","id":0,"typeName":"Name"}},{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"EventMap"},"indexType":{"kind":"TypeReference","id":0,"typeName":"Name"}}}],"type":{"kind":"VoidKeyword","id":0}}],"remove":[{"kind":"MethodDeclaration","id":0,"name":"remove","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"TypeReference","id":0,"typeName":"Name"}}],"type":{"kind":"VoidKeyword","id":0}}],"clear":[{"kind":"MethodDeclaration","id":0,"name":"clear","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"numListeners":[{"kind":"MethodDeclaration","id":0,"name":"numListeners","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"TypeReference","id":0,"typeName":"Name"}}],"type":{"kind":"NumberKeyword","id":0}}]}}],"AudioPlayOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"AudioPlayOpt","members":{"paused":[{"kind":"PropertySignature","id":0,"name":"paused","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If audio should start out paused.","tags":{"since":["v3000.0"]}}}],"loop":[{"kind":"PropertySignature","id":0,"name":"loop","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If audio should be played again from start when its ended.","tags":{}}}],"volume":[{"kind":"PropertySignature","id":0,"name":"volume","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Volume of audio. 1.0 means full volume, 0.5 means half volume.","tags":{}}}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Playback speed. 1.0 means normal playback speed, 2.0 means twice as fast.","tags":{}}}],"detune":[{"kind":"PropertySignature","id":0,"name":"detune","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Detune the sound. Every 100 means a semitone.","tags":{"example":["```js\n// play a random note in the octave\nplay(\"noteC\", {\n detune: randi(0, 12) * 100,\n})\n```"]}}}],"seek":[{"kind":"PropertySignature","id":0,"name":"seek","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The start time, in seconds.","tags":{}}}]},"jsDoc":{"doc":"Audio play configurations.","tags":{}}}],"AudioPlay":[{"kind":"InterfaceDeclaration","id":0,"name":"AudioPlay","members":{"play":[{"kind":"MethodSignature","id":0,"name":"play","parameters":[{"kind":"Parameter","id":0,"name":"time","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Start playing audio.","tags":{"since":["v3000.0"]}}}],"seek":[{"kind":"MethodSignature","id":0,"name":"seek","parameters":[{"kind":"Parameter","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Seek time.","tags":{"since":["v3000.0"]}}}],"stop":[{"kind":"MethodSignature","id":0,"name":"stop","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Stop the sound.","tags":{"since":["v3001.0"]}}}],"paused":[{"kind":"PropertySignature","id":0,"name":"paused","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the sound is paused.","tags":{"since":["v2000.1"]}}}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Playback speed of the sound. 1.0 means normal playback speed, 2.0 means twice as fast.","tags":{}}}],"detune":[{"kind":"PropertySignature","id":0,"name":"detune","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Detune the sound. Every 100 means a semitone.","tags":{"example":["```js\n// tune down a semitone\nmusic.detune = -100\n\n// tune up an octave\nmusic.detune = 1200\n```"]}}}],"volume":[{"kind":"PropertySignature","id":0,"name":"volume","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Volume of the sound. 1.0 means full volume, 0.5 means half volume.","tags":{}}}],"loop":[{"kind":"PropertySignature","id":0,"name":"loop","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the audio should start again when it ends.","tags":{}}}],"time":[{"kind":"MethodSignature","id":0,"name":"time","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The current playing time (not accurate if speed is changed).","tags":{}}}],"duration":[{"kind":"MethodSignature","id":0,"name":"duration","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The total duration.","tags":{}}}],"onEnd":[{"kind":"MethodSignature","id":0,"name":"onEnd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when audio ends.","tags":{"since":["v3000.0"]}}}],"then":[{"kind":"MethodSignature","id":0,"name":"then","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}]}}],"CircleComp":[{"kind":"InterfaceDeclaration","id":0,"name":"CircleComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"Comp"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Radius of circle.","tags":{}}}],"renderArea":[{"kind":"MethodSignature","id":0,"name":"renderArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"},"jsDoc":{"doc":"Render area of the circle.","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"circle","text":"`circle()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"CircleCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"CircleCompOpt","members":{"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"If fill the circle (useful if you only want to render outline with\n"},{"kind":"JSDocLink","id":0,"name":"outline","text":"`outline()`"},{"kind":"JSDocText","id":0,"text":" component)."}],"tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"circle","text":"`circle()``"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"ColorComp":[{"kind":"InterfaceDeclaration","id":0,"name":"ColorComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"color":[{"kind":"PropertySignature","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"color","text":"`color()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"MaskComp":[{"kind":"InterfaceDeclaration","id":0,"name":"MaskComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"mask":[{"kind":"PropertySignature","id":0,"name":"mask","type":{"kind":"TypeReference","id":0,"typeName":"Mask"}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"mask","text":"`mask()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"OpacityComp":[{"kind":"InterfaceDeclaration","id":0,"name":"OpacityComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Opacity of the current object.","tags":{}}}],"fadeIn":[{"kind":"MethodSignature","id":0,"name":"fadeIn","parameters":[{"kind":"Parameter","id":0,"name":"time","questionToken":true,"type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"easeFunc","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"EaseFunc"}}],"type":{"kind":"TypeReference","id":0,"typeName":"TweenController"},"jsDoc":{"doc":"Fade in at the start.","tags":{}}}],"fadeOut":[{"kind":"MethodSignature","id":0,"name":"fadeOut","parameters":[{"kind":"Parameter","id":0,"name":"time","questionToken":true,"type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"easeFunc","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"EaseFunc"}}],"type":{"kind":"TypeReference","id":0,"typeName":"TweenController"},"jsDoc":{"doc":"Fade out at the start.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"opacity","text":"`opacity()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"OutlineComp":[{"kind":"InterfaceDeclaration","id":0,"name":"OutlineComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"outline":[{"kind":"PropertySignature","id":0,"name":"outline","type":{"kind":"TypeReference","id":0,"typeName":"Outline"}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"outline","text":"`outline()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"EmitterOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"EmitterOpt","type":{"kind":"TypeLiteral","id":0,"members":{"shape":[{"kind":"PropertySignature","id":0,"name":"shape","type":{"kind":"TypeReference","id":0,"typeName":"ShapeType"},"questionToken":true}],"lifetime":[{"kind":"PropertySignature","id":0,"name":"lifetime","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"rate":[{"kind":"PropertySignature","id":0,"name":"rate","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"direction":[{"kind":"PropertySignature","id":0,"name":"direction","type":{"kind":"NumberKeyword","id":0}}],"spread":[{"kind":"PropertySignature","id":0,"name":"spread","type":{"kind":"NumberKeyword","id":0}}]}}}],"ParticlesOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"ParticlesOpt","type":{"kind":"TypeLiteral","id":0,"members":{"max":[{"kind":"PropertySignature","id":0,"name":"max","type":{"kind":"NumberKeyword","id":0}}],"lifeTime":[{"kind":"PropertySignature","id":0,"name":"lifeTime","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"acceleration":[{"kind":"PropertySignature","id":0,"name":"acceleration","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true}],"damping":[{"kind":"PropertySignature","id":0,"name":"damping","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"angularVelocity":[{"kind":"PropertySignature","id":0,"name":"angularVelocity","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"scales":[{"kind":"PropertySignature","id":0,"name":"scales","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},"questionToken":true}],"colors":[{"kind":"PropertySignature","id":0,"name":"colors","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Color"}},"questionToken":true}],"opacities":[{"kind":"PropertySignature","id":0,"name":"opacities","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},"questionToken":true}],"quads":[{"kind":"PropertySignature","id":0,"name":"quads","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Quad"}},"questionToken":true}],"texture":[{"kind":"PropertySignature","id":0,"name":"texture","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}]}}}],"ParticlesComp":[{"kind":"InterfaceDeclaration","id":0,"name":"ParticlesComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"emit":[{"kind":"MethodSignature","id":0,"name":"emit","parameters":[{"kind":"Parameter","id":0,"name":"n","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"onEnd":[{"kind":"MethodSignature","id":0,"name":"onEnd","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}]}}],"PolygonComp":[{"kind":"InterfaceDeclaration","id":0,"name":"PolygonComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"Comp"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}}}}],"pts":[{"kind":"PropertySignature","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"Points in the polygon.","tags":{}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}]},"questionToken":true,"jsDoc":{"doc":"The radius of each corner.","tags":{}}}],"colors":[{"kind":"PropertySignature","id":0,"name":"colors","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Color"}},"questionToken":true,"jsDoc":{"doc":"The color of each vertex.","tags":{}}}],"uv":[{"kind":"PropertySignature","id":0,"name":"uv","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"questionToken":true,"jsDoc":{"doc":"The uv of each vertex.","tags":{"since":["v3001.0"]}}}],"tex":[{"kind":"PropertySignature","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"},"questionToken":true,"jsDoc":{"doc":"The texture used when uv coordinates are present.","tags":{"since":["v3001.0"]}}}],"renderArea":[{"kind":"MethodSignature","id":0,"name":"renderArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"polygon","text":"`polygon()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"since":["v3001.0"],"group":["Component Types"]}}}],"PolygonCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"PolygonCompOpt","type":{"kind":"TypeReference","id":0,"typeName":"Omit","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"DrawPolygonOpt"},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"pts","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"polygon","text":"`polygon()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"RectComp":[{"kind":"InterfaceDeclaration","id":0,"name":"RectComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"Comp"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width of rectangle.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height of rectangle.","tags":{}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The radius of each corner.","tags":{}}}],"renderArea":[{"kind":"MethodSignature","id":0,"name":"renderArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"},"jsDoc":{"tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"rect","text":"`rect()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"RectCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"RectCompOpt","members":{"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Radius of the rectangle corners.","tags":{}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the rectangle (useful if you only want to render outline with outline() component).","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"rect","text":"`rect()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"ShaderComp":[{"kind":"InterfaceDeclaration","id":0,"name":"ShaderComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"uniform":[{"kind":"PropertySignature","id":0,"name":"uniform","type":{"kind":"TypeReference","id":0,"typeName":"Uniform"},"questionToken":true}],"shader":[{"kind":"PropertySignature","id":0,"name":"shader","type":{"kind":"StringKeyword","id":0}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"shader","text":"`shader()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"SpriteComp":[{"kind":"InterfaceDeclaration","id":0,"name":"SpriteComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"Comp"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}}}}],"sprite":[{"kind":"PropertySignature","id":0,"name":"sprite","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"Name of the sprite.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width for sprite.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height for sprite.","tags":{}}}],"frame":[{"kind":"PropertySignature","id":0,"name":"frame","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Current frame.","tags":{}}}],"quad":[{"kind":"PropertySignature","id":0,"name":"quad","type":{"kind":"TypeReference","id":0,"typeName":"Quad"},"jsDoc":{"doc":"The rectangular area of the texture to render.","tags":{}}}],"play":[{"kind":"MethodSignature","id":0,"name":"play","parameters":[{"kind":"Parameter","id":0,"name":"anim","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"SpriteAnimPlayOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Play a piece of anim.","tags":{}}}],"stop":[{"kind":"MethodSignature","id":0,"name":"stop","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Stop current anim.","tags":{}}}],"numFrames":[{"kind":"MethodSignature","id":0,"name":"numFrames","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get total number of frames.","tags":{}}}],"getCurAnim":[{"kind":"MethodSignature","id":0,"name":"getCurAnim","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"SpriteCurAnim"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get the current animation data.","tags":{"since":["v3001.0"]}}}],"curAnim":[{"kind":"MethodSignature","id":0,"name":"curAnim","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"UndefinedKeyword","id":0}]},"jsDoc":{"doc":"Get current anim name.","tags":{"deprecated":["Use `getCurAnim().name` instead."]}}}],"hasAnim":[{"kind":"MethodSignature","id":0,"name":"hasAnim","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if object's sprite has an animation.","tags":{}}}],"getAnim":[{"kind":"MethodSignature","id":0,"name":"getAnim","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"SpriteAnim"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get an animation.","tags":{}}}],"animSpeed":[{"kind":"PropertySignature","id":0,"name":"animSpeed","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Speed multiplier for all animations (for the actual fps for an anim use .play(\"anim\", { speed: 10 })).","tags":{}}}],"flipX":[{"kind":"PropertySignature","id":0,"name":"flipX","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Flip texture horizontally.","tags":{}}}],"flipY":[{"kind":"PropertySignature","id":0,"name":"flipY","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Flip texture vertically.","tags":{}}}],"onAnimStart":[{"kind":"MethodSignature","id":0,"name":"onAnimStart","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"anim","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when an animation is played.","tags":{}}}],"onAnimEnd":[{"kind":"MethodSignature","id":0,"name":"onAnimEnd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"anim","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when an animation is ended.","tags":{}}}],"renderArea":[{"kind":"MethodSignature","id":0,"name":"renderArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"},"jsDoc":{"tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"sprite","text":"`sprite()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"SpriteCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"SpriteCompOpt","members":{"frame":[{"kind":"PropertySignature","id":0,"name":"frame","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If the sprite is loaded with multiple frames, or sliced, use the frame option to specify which frame to draw.","tags":{}}}],"tiled":[{"kind":"PropertySignature","id":0,"name":"tiled","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If provided width and height, don't stretch but instead render tiled.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Stretch sprite to a certain width.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Stretch sprite to a certain height.","tags":{}}}],"anim":[{"kind":"PropertySignature","id":0,"name":"anim","type":{"kind":"StringKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Play an animation on start.","tags":{}}}],"animSpeed":[{"kind":"PropertySignature","id":0,"name":"animSpeed","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Speed multiplier for all animations (for the actual fps for an anim use .play(\"anim\", { speed: 10 })).","tags":{}}}],"flipX":[{"kind":"PropertySignature","id":0,"name":"flipX","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Flip texture horizontally.","tags":{}}}],"flipY":[{"kind":"PropertySignature","id":0,"name":"flipY","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Flip texture vertically.","tags":{}}}],"quad":[{"kind":"PropertySignature","id":0,"name":"quad","type":{"kind":"TypeReference","id":0,"typeName":"Quad"},"questionToken":true,"jsDoc":{"doc":"The rectangular sub-area of the texture to render, default to full texture `quad(0, 0, 1, 1)`.","tags":{}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the sprite (useful if you only want to render outline with outline() component).","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"sprite","text":"`sprite()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"TextComp":[{"kind":"InterfaceDeclaration","id":0,"name":"TextComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"Comp"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}}}}],"text":[{"kind":"PropertySignature","id":0,"name":"text","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"The text to render.","tags":{}}}],"textSize":[{"kind":"PropertySignature","id":0,"name":"textSize","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The text size.","tags":{}}}],"font":[{"kind":"PropertySignature","id":0,"name":"font","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"BitmapFontData"}]},"jsDoc":{"doc":"The font to use.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width of text.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height of text.","tags":{}}}],"align":[{"kind":"PropertySignature","id":0,"name":"align","type":{"kind":"TypeReference","id":0,"typeName":"TextAlign"},"jsDoc":{"doc":"Text alignment (\"left\", \"center\" or \"right\", default \"left\").","tags":{"since":["v3000.0"]}}}],"lineSpacing":[{"kind":"PropertySignature","id":0,"name":"lineSpacing","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The gap between each line.","tags":{"since":["v2000.2"]}}}],"letterSpacing":[{"kind":"PropertySignature","id":0,"name":"letterSpacing","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The gap between each character.","tags":{"since":["v2000.2"]}}}],"textTransform":[{"kind":"PropertySignature","id":0,"name":"textTransform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CharTransform"},{"kind":"TypeReference","id":0,"typeName":"CharTransformFunc"}]},"jsDoc":{"doc":"Transform the pos, scale, rotation or color for each character based on the index or char.","tags":{"since":["v2000.1"]}}}],"textStyles":[{"kind":"PropertySignature","id":0,"name":"textStyles","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CharTransform"},{"kind":"TypeReference","id":0,"typeName":"CharTransformFunc"}]}]},"jsDoc":{"doc":"Stylesheet for styled chunks, in the syntax of \"this is a [style]text[/style] word\".","tags":{"since":["v2000.2"]}}}],"renderArea":[{"kind":"MethodSignature","id":0,"name":"renderArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"},"jsDoc":{"tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"text","text":"`text()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"TextCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"TextCompOpt","members":{"size":[{"kind":"PropertySignature","id":0,"name":"size","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Height of text.","tags":{}}}],"font":[{"kind":"PropertySignature","id":0,"name":"font","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"BitmapFontData"}]},"questionToken":true,"jsDoc":{"doc":"The font to use.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Wrap text to a certain width.","tags":{}}}],"align":[{"kind":"PropertySignature","id":0,"name":"align","type":{"kind":"TypeReference","id":0,"typeName":"TextAlign"},"questionToken":true,"jsDoc":{"doc":"Text alignment (\"left\", \"center\" or \"right\", default \"left\").","tags":{"since":["v3000.0"]}}}],"lineSpacing":[{"kind":"PropertySignature","id":0,"name":"lineSpacing","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The gap between each line.","tags":{"since":["v2000.2"]}}}],"letterSpacing":[{"kind":"PropertySignature","id":0,"name":"letterSpacing","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The gap between each character.","tags":{"since":["v2000.2"]}}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CharTransform"},{"kind":"TypeReference","id":0,"typeName":"CharTransformFunc"}]},"questionToken":true,"jsDoc":{"doc":"Transform the pos, scale, rotation or color for each character based on the index or char.","tags":{"since":["v2000.1"]}}}],"styles":[{"kind":"PropertySignature","id":0,"name":"styles","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CharTransform"},{"kind":"TypeReference","id":0,"typeName":"CharTransformFunc"}]}]},"questionToken":true,"jsDoc":{"doc":"Stylesheet for styled chunks, in the syntax of \"this is a [style]text[/style] word\".","tags":{"since":["v2000.2"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"text","text":"`text()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"UVQuadComp":[{"kind":"InterfaceDeclaration","id":0,"name":"UVQuadComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"Comp"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width of rect.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height of height.","tags":{}}}],"renderArea":[{"kind":"MethodSignature","id":0,"name":"renderArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"},"jsDoc":{"tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"uvquad","text":"`uvquad()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"AgentComp":[{"kind":"InterfaceDeclaration","id":0,"name":"AgentComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"agentSpeed":[{"kind":"PropertySignature","id":0,"name":"agentSpeed","type":{"kind":"NumberKeyword","id":0}}],"allowDiagonals":[{"kind":"PropertySignature","id":0,"name":"allowDiagonals","type":{"kind":"BooleanKeyword","id":0}}],"getDistanceToTarget":[{"kind":"MethodSignature","id":0,"name":"getDistanceToTarget","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"getNextLocation":[{"kind":"MethodSignature","id":0,"name":"getNextLocation","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"getPath":[{"kind":"MethodSignature","id":0,"name":"getPath","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"getTarget":[{"kind":"MethodSignature","id":0,"name":"getTarget","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"isNavigationFinished":[{"kind":"MethodSignature","id":0,"name":"isNavigationFinished","parameters":[],"type":{"kind":"BooleanKeyword","id":0}}],"isTargetReachable":[{"kind":"MethodSignature","id":0,"name":"isTargetReachable","parameters":[],"type":{"kind":"BooleanKeyword","id":0}}],"isTargetReached":[{"kind":"MethodSignature","id":0,"name":"isTargetReached","parameters":[],"type":{"kind":"BooleanKeyword","id":0}}],"setTarget":[{"kind":"MethodSignature","id":0,"name":"setTarget","parameters":[{"kind":"Parameter","id":0,"name":"target","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}}],"onNavigationStarted":[{"kind":"MethodSignature","id":0,"name":"onNavigationStarted","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onNavigationNext":[{"kind":"MethodSignature","id":0,"name":"onNavigationNext","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onNavigationEnded":[{"kind":"MethodSignature","id":0,"name":"onNavigationEnded","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onTargetReached":[{"kind":"MethodSignature","id":0,"name":"onTargetReached","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"agent","text":"`agent()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"AgentCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"AgentCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"allowDiagonals":[{"kind":"PropertySignature","id":0,"name":"allowDiagonals","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}]}},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"agent","text":"`agent()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"NavigationMapComp":[{"kind":"InterfaceDeclaration","id":0,"name":"NavigationMapComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"navigate":[{"kind":"MethodSignature","id":0,"name":"navigate","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"target","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"navigationOpt","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"UndefinedKeyword","id":0}]}}],"graph":[{"kind":"PropertySignature","id":0,"name":"graph","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Graph"},{"kind":"UndefinedKeyword","id":0}]}}]}}],"NavigationMapCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"NavigationMapCompOpt","members":{"graph":[{"kind":"PropertySignature","id":0,"name":"graph","type":{"kind":"TypeReference","id":0,"typeName":"Graph"},"questionToken":true}]}}],"NavigationComp":[{"kind":"InterfaceDeclaration","id":0,"name":"NavigationComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"navigateTo":[{"kind":"MethodSignature","id":0,"name":"navigateTo","parameters":[{"kind":"Parameter","id":0,"name":"target","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"UndefinedKeyword","id":0}]}}],"graph":[{"kind":"PropertySignature","id":0,"name":"graph","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Graph"},{"kind":"UndefinedKeyword","id":0}]}}]}}],"NavigationCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"NavigationCompOpt","members":{"graph":[{"kind":"PropertySignature","id":0,"name":"graph","type":{"kind":"TypeReference","id":0,"typeName":"Graph"},"questionToken":true}],"navigationOpt":[{"kind":"PropertySignature","id":0,"name":"navigationOpt","type":{"kind":"AnyKeyword","id":0},"questionToken":true}]}}],"PatrolComp":[{"kind":"InterfaceDeclaration","id":0,"name":"PatrolComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"waypoints":[{"kind":"PropertySignature","id":0,"name":"waypoints","type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"UndefinedKeyword","id":0}]}}],"patrolSpeed":[{"kind":"PropertySignature","id":0,"name":"patrolSpeed","type":{"kind":"NumberKeyword","id":0}}],"nextLocation":[{"kind":"PropertySignature","id":0,"name":"nextLocation","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"UndefinedKeyword","id":0}]}}],"onPatrolFinished":[{"kind":"MethodSignature","id":0,"name":"onPatrolFinished","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"objects","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Attaches an event handler which is called when using \"stop\" and the end of the path is reached.","tags":{"param":["The event handler called when the patrol finishes."]}}}]}}],"PatrolEndBehavior":[{"kind":"TypeAliasDeclaration","id":0,"name":"PatrolEndBehavior","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"loop","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ping-pong","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"stop","hasExtendedUnicodeEscape":false}}]}}],"PatrolCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"PatrolCompOpt","members":{"waypoints":[{"kind":"PropertySignature","id":0,"name":"waypoints","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"questionToken":true}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"endBehavior":[{"kind":"PropertySignature","id":0,"name":"endBehavior","type":{"kind":"TypeReference","id":0,"typeName":"PatrolEndBehavior"},"questionToken":true}]}}],"FixedComp":[{"kind":"InterfaceDeclaration","id":0,"name":"FixedComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"fixed":[{"kind":"PropertySignature","id":0,"name":"fixed","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the obj is unaffected by camera","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"fixed","text":"`fixed()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"PosComp":[{"kind":"InterfaceDeclaration","id":0,"name":"PosComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Object's current world position.","tags":{}}}],"move":[{"kind":"MethodSignature","id":0,"name":"move","parameters":[{"kind":"Parameter","id":0,"name":"xVel","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"yVel","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Move how many pixels per second. If object is 'solid', it won't move into other 'solid' objects.","tags":{}}},{"kind":"MethodSignature","id":0,"name":"move","parameters":[{"kind":"Parameter","id":0,"name":"vel","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}}],"moveBy":[{"kind":"MethodSignature","id":0,"name":"moveBy","parameters":[{"kind":"Parameter","id":0,"name":"dx","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"dy","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Move how many pixels, without multiplying dt, but still checking for 'solid'.","tags":{}}},{"kind":"MethodSignature","id":0,"name":"moveBy","parameters":[{"kind":"Parameter","id":0,"name":"d","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}}],"moveTo":[{"kind":"MethodSignature","id":0,"name":"moveTo","parameters":[{"kind":"Parameter","id":0,"name":"dest","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"speed","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Move to a spot with a speed (pixels per second), teleports if speed is not given.","tags":{}}},{"kind":"MethodSignature","id":0,"name":"moveTo","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"speed","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"screenPos":[{"kind":"MethodSignature","id":0,"name":"screenPos","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get the position of the object on the screen.","tags":{}}}],"worldPos":[{"kind":"MethodSignature","id":0,"name":"worldPos","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get the position of the object relative to the root.","tags":{}}}],"toScreen":[{"kind":"MethodSignature","id":0,"name":"toScreen","parameters":[{"kind":"Parameter","id":0,"name":"this","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"PosComp"},{"kind":"TypeReference","id":0,"typeName":"FixedComp"}]}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a local point (relative to this) to a screen point (relative to the camera)","tags":{}}}],"toWorld":[{"kind":"MethodSignature","id":0,"name":"toWorld","parameters":[{"kind":"Parameter","id":0,"name":"this","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a local point (relative to this) to a world point (relative to the root)","tags":{"since":["v3001.0"]}}}],"fromScreen":[{"kind":"MethodSignature","id":0,"name":"fromScreen","parameters":[{"kind":"Parameter","id":0,"name":"this","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"PosComp"},{"kind":"TypeReference","id":0,"typeName":"FixedComp"}]}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a screen point (relative to the camera) to a local point (relative to this)","tags":{"since":["v3001.0"]}}}],"fromWorld":[{"kind":"MethodSignature","id":0,"name":"fromWorld","parameters":[{"kind":"Parameter","id":0,"name":"this","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a world point (relative to the root) to a local point (relative to this)","tags":{"since":["v3001.0"]}}}],"toOther":[{"kind":"MethodSignature","id":0,"name":"toOther","parameters":[{"kind":"Parameter","id":0,"name":"this","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a point relative to this to a point relative to other","tags":{"since":["v3001.0"]}}}],"fromOther":[{"kind":"MethodSignature","id":0,"name":"fromOther","parameters":[{"kind":"Parameter","id":0,"name":"this","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a point relative to other to a point relative to this","tags":{"since":["v3001.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"pos","text":"`pos()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"SentryComp":[{"kind":"InterfaceDeclaration","id":0,"name":"SentryComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"direction":[{"kind":"PropertySignature","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true}],"directionAngle":[{"kind":"PropertySignature","id":0,"name":"directionAngle","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"fieldOfView":[{"kind":"PropertySignature","id":0,"name":"fieldOfView","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"spotted":[{"kind":"PropertySignature","id":0,"name":"spotted","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"AnyKeyword","id":0}]}}}],"onObjectsSpotted":[{"kind":"MethodSignature","id":0,"name":"onObjectsSpotted","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"objects","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Attaches an event handler which is called when objects of interest are spotted.","tags":{"param":["The event handler called when objects are spotted."]}}}],"isWithinFieldOfView":[{"kind":"MethodSignature","id":0,"name":"isWithinFieldOfView","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"direction","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"fieldOfView","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Returns true if the object is within the field of view.","tags":{"param":["The object to test.","The direction to look at.","The field of view in degrees."]}}}],"hasLineOfSight":[{"kind":"MethodSignature","id":0,"name":"hasLineOfSight","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Returns true if there is a line of sight to the object.","tags":{"param":["The object to test."]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"sentry","text":"`sentry()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"SentryCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"SentryCompOpt","members":{"direction":[{"kind":"PropertySignature","id":0,"name":"direction","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"fieldOfView":[{"kind":"PropertySignature","id":0,"name":"fieldOfView","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"lineOfSight":[{"kind":"PropertySignature","id":0,"name":"lineOfSight","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"raycastExclude":[{"kind":"PropertySignature","id":0,"name":"raycastExclude","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},"questionToken":true}],"checkFrequency":[{"kind":"PropertySignature","id":0,"name":"checkFrequency","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"sentry","text":"`sentry()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"SentryCandidatesCb":[{"kind":"TypeAliasDeclaration","id":0,"name":"SentryCandidatesCb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"AnyKeyword","id":0}]}}}}],"SentryCandidates":[{"kind":"TypeAliasDeclaration","id":0,"name":"SentryCandidates","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"SentryCandidatesCb"},{"kind":"TypeReference","id":0,"typeName":"QueryOpt"}]}}],"TileComp":[{"kind":"InterfaceDeclaration","id":0,"name":"TileComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"tilePos":[{"kind":"PropertySignature","id":0,"name":"tilePos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The tile position inside the level.","tags":{}}}],"isObstacle":[{"kind":"PropertySignature","id":0,"name":"isObstacle","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the tile is an obstacle in pathfinding.","tags":{}}}],"cost":[{"kind":"PropertySignature","id":0,"name":"cost","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"How much a tile is cost to traverse in pathfinding (default 0).","tags":{}}}],"edges":[{"kind":"PropertySignature","id":0,"name":"edges","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Edge"}},"jsDoc":{"doc":"If the tile has hard edges that cannot pass in pathfinding.","tags":{}}}],"tilePosOffset":[{"kind":"PropertySignature","id":0,"name":"tilePosOffset","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Position offset when setting `tilePos`.","tags":{}}}],"edgeMask":[{"kind":"PropertySignature","id":0,"name":"edgeMask","type":{"kind":"TypeReference","id":0,"typeName":"EdgeMask"}}],"getLevel":[{"kind":"MethodSignature","id":0,"name":"getLevel","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"LevelComp"}]}}],"moveLeft":[{"kind":"MethodSignature","id":0,"name":"moveLeft","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"moveRight":[{"kind":"MethodSignature","id":0,"name":"moveRight","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"moveUp":[{"kind":"MethodSignature","id":0,"name":"moveUp","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"moveDown":[{"kind":"MethodSignature","id":0,"name":"moveDown","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"tile","text":"`tile()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"TileCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"TileCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"isObstacle":[{"kind":"PropertySignature","id":0,"name":"isObstacle","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If the tile is an obstacle in pathfinding.","tags":{}}}],"cost":[{"kind":"PropertySignature","id":0,"name":"cost","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"How much a tile is cost to traverse in pathfinding (default 0).","tags":{}}}],"edges":[{"kind":"PropertySignature","id":0,"name":"edges","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Edge"}},"questionToken":true,"jsDoc":{"doc":"If the tile has hard edges that cannot pass in pathfinding.","tags":{}}}],"offset":[{"kind":"PropertySignature","id":0,"name":"offset","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true,"jsDoc":{"doc":"Position offset when setting `tilePos`.","tags":{}}}]}},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"tile","text":"`tile()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"TimeDirection":[{"kind":"TypeAliasDeclaration","id":0,"name":"TimeDirection","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"forward","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"reverse","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ping-pong","hasExtendedUnicodeEscape":false}}]}}],"Interpolation":[{"kind":"TypeAliasDeclaration","id":0,"name":"Interpolation","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"none","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"linear","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"slerp","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"spline","hasExtendedUnicodeEscape":false}}]}}],"AnimateOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"AnimateOpt","members":{"duration":[{"kind":"PropertySignature","id":0,"name":"duration","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Duration of the animation in seconds","tags":{}}}],"loops":[{"kind":"PropertySignature","id":0,"name":"loops","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Loops, Default is undefined aka infinite","tags":{}}}],"direction":[{"kind":"PropertySignature","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"TimeDirection"},"questionToken":true,"jsDoc":{"doc":"Behavior when reaching the end of the animation. Default is forward.","tags":{}}}],"easing":[{"kind":"PropertySignature","id":0,"name":"easing","type":{"kind":"TypeReference","id":0,"typeName":"EaseFunc"},"questionToken":true,"jsDoc":{"doc":"Easing function. Default is linear time.","tags":{}}}],"interpolation":[{"kind":"PropertySignature","id":0,"name":"interpolation","type":{"kind":"TypeReference","id":0,"typeName":"Interpolation"},"questionToken":true,"jsDoc":{"doc":"Interpolation function. Default is linear interpolation.","tags":{}}}],"timing":[{"kind":"PropertySignature","id":0,"name":"timing","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Timestamps in percent for the given keys, if omitted, keys are equally spaced.","tags":{}}}],"easings":[{"kind":"PropertySignature","id":0,"name":"easings","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"EaseFunc"}},"questionToken":true,"jsDoc":{"doc":"Easings for the given keys, if omitted, easing is used.","tags":{}}}]}}],"AnimateCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"AnimateCompOpt","members":{"followMotion":[{"kind":"PropertySignature","id":0,"name":"followMotion","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Changes the angle so it follows the motion, requires the rotate component","tags":{}}}],"relative":[{"kind":"PropertySignature","id":0,"name":"relative","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The animation is added to the base values of pos, angle, scale and opacity instead of replacing them","tags":{}}}]}}],"BaseValues":[{"kind":"InterfaceDeclaration","id":0,"name":"BaseValues","members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0}}]}}],"AnimateComp":[{"kind":"InterfaceDeclaration","id":0,"name":"AnimateComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"animate":[{"kind":"MethodSignature","id":0,"name":"animate","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","constraint":{"kind":"TypeReference","id":0,"typeName":"LerpValue"}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"keys","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}}},{"kind":"Parameter","id":0,"name":"opts","type":{"kind":"TypeReference","id":0,"typeName":"AnimateOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Animates a property on this object.","tags":{"param":["Name of the property to animate.","Keys determining the value at a certain point in time.","Options."]}}}],"unanimate":[{"kind":"MethodSignature","id":0,"name":"unanimate","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Removes the animation from the given property.","tags":{"param":["Name of the property to remove the animation from."]}}}],"unanimateAll":[{"kind":"MethodSignature","id":0,"name":"unanimateAll","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Removes the animations from all properties","tags":{}}}],"onAnimateFinished":[{"kind":"MethodSignature","id":0,"name":"onAnimateFinished","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Attaches an event handler which is called when all the animation channels have finished.","tags":{"param":["The event handler called when the animation finishes."]}}}],"onAnimateChannelFinished":[{"kind":"MethodSignature","id":0,"name":"onAnimateChannelFinished","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Attaches an event handler which is called when an animation channels has finished.","tags":{"param":["The event handler called when an animation channel finishes."]}}}],"base":[{"kind":"PropertySignature","id":0,"name":"base","type":{"kind":"TypeReference","id":0,"typeName":"BaseValues"},"jsDoc":{"doc":"Base values for relative animation","tags":{}}}],"serializeAnimationChannels":[{"kind":"MethodSignature","id":0,"name":"serializeAnimationChannels","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"AnimationChannel"}]},"jsDoc":{"doc":"Serializes the animation of this object to plain Javascript types","tags":{}}}],"serializeAnimationOptions":[{"kind":"MethodSignature","id":0,"name":"serializeAnimationOptions","parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"followMotion":[{"kind":"PropertySignature","id":0,"name":"followMotion","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"relative":[{"kind":"PropertySignature","id":0,"name":"relative","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}]}},"jsDoc":{"doc":"Serializes the options of this object to plain Javascript types","tags":{}}}]}}],"AnimationChannelKeys":[{"kind":"TypeAliasDeclaration","id":0,"name":"AnimationChannelKeys","type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},{"kind":"ArrayType","id":0,"elementType":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}]}}],"AnimationOptions":[{"kind":"TypeAliasDeclaration","id":0,"name":"AnimationOptions","type":{"kind":"TypeLiteral","id":0,"members":{"duration":[{"kind":"PropertySignature","id":0,"name":"duration","type":{"kind":"NumberKeyword","id":0}}],"loops":[{"kind":"PropertySignature","id":0,"name":"loops","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"direction":[{"kind":"PropertySignature","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"TimeDirection"},"questionToken":true}],"easing":[{"kind":"PropertySignature","id":0,"name":"easing","type":{"kind":"StringKeyword","id":0},"questionToken":true}],"interpolation":[{"kind":"PropertySignature","id":0,"name":"interpolation","type":{"kind":"TypeReference","id":0,"typeName":"Interpolation"},"questionToken":true}],"timing":[{"kind":"PropertySignature","id":0,"name":"timing","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},"questionToken":true}],"easings":[{"kind":"PropertySignature","id":0,"name":"easings","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},"questionToken":true}]}}}],"AnimationChannel":[{"kind":"TypeAliasDeclaration","id":0,"name":"AnimationChannel","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeLiteral","id":0,"members":{"keys":[{"kind":"PropertySignature","id":0,"name":"keys","type":{"kind":"TypeReference","id":0,"typeName":"AnimationChannelKeys"}}]}},{"kind":"TypeReference","id":0,"typeName":"AnimationOptions"}]}}],"HealthComp":[{"kind":"InterfaceDeclaration","id":0,"name":"HealthComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"hurt":[{"kind":"MethodSignature","id":0,"name":"hurt","parameters":[{"kind":"Parameter","id":0,"name":"n","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Decrease HP by n (defaults to 1).","tags":{}}}],"heal":[{"kind":"MethodSignature","id":0,"name":"heal","parameters":[{"kind":"Parameter","id":0,"name":"n","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Increase HP by n (defaults to 1).","tags":{}}}],"hp":[{"kind":"MethodSignature","id":0,"name":"hp","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Current health points.","tags":{}}}],"setHP":[{"kind":"MethodSignature","id":0,"name":"setHP","parameters":[{"kind":"Parameter","id":0,"name":"hp","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set current health points.","tags":{}}}],"maxHP":[{"kind":"MethodSignature","id":0,"name":"maxHP","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Max amount of HP.","tags":{}}}],"setMaxHP":[{"kind":"MethodSignature","id":0,"name":"setMaxHP","parameters":[{"kind":"Parameter","id":0,"name":"hp","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set max amount of HP.","tags":{}}}],"onHurt":[{"kind":"MethodSignature","id":0,"name":"onHurt","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"amount","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when hurt() is called upon the object.","tags":{"since":["v2000.1"]}}}],"onHeal":[{"kind":"MethodSignature","id":0,"name":"onHeal","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"amount","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when heal() is called upon the object.","tags":{"since":["v2000.1"]}}}],"onDeath":[{"kind":"MethodSignature","id":0,"name":"onDeath","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when object's HP is equal or below 0.","tags":{"since":["v2000.1"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"health","text":"`health()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"LifespanCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"LifespanCompOpt","members":{"fade":[{"kind":"PropertySignature","id":0,"name":"fade","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Fade out duration (default 0 which is no fade out).","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"lifespan","text":"`lifespan()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"NamedComp":[{"kind":"InterfaceDeclaration","id":0,"name":"NamedComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"named","text":"`named()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"StateComp":[{"kind":"InterfaceDeclaration","id":0,"name":"StateComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"state":[{"kind":"PropertySignature","id":0,"name":"state","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"Current state.","tags":{}}}],"enterState":[{"kind":"PropertySignature","id":0,"name":"enterState","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"state","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}},"jsDoc":{"doc":"Enter a state, trigger onStateEnd for previous state and onStateEnter for the new State state.","tags":{}}}],"onStateTransition":[{"kind":"MethodSignature","id":0,"name":"onStateTransition","parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register event that runs once when a specific state transition happens. Accepts arguments passed from `enterState(name, ...args)`.","tags":{"since":["v2000.2"]}}}],"onStateEnter":[{"kind":"PropertySignature","id":0,"name":"onStateEnter","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"state","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}},"jsDoc":{"doc":"Register event that runs once when enters a specific state. Accepts arguments passed from `enterState(name, ...args)`.","tags":{}}}],"onStateEnd":[{"kind":"PropertySignature","id":0,"name":"onStateEnd","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"state","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}},"jsDoc":{"doc":"Register an event that runs once when leaves a specific state.","tags":{}}}],"onStateUpdate":[{"kind":"PropertySignature","id":0,"name":"onStateUpdate","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"state","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}},"jsDoc":{"doc":"Register an event that runs every frame when in a specific state.","tags":{}}}],"onStateDraw":[{"kind":"PropertySignature","id":0,"name":"onStateDraw","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"state","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}},"jsDoc":{"doc":"Register an event that runs every frame when in a specific state.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"state","text":"`state()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"StayComp":[{"kind":"InterfaceDeclaration","id":0,"name":"StayComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"stay":[{"kind":"PropertySignature","id":0,"name":"stay","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the obj should not be destroyed on scene switch.","tags":{}}}],"scenesToStay":[{"kind":"PropertySignature","id":0,"name":"scenesToStay","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Array of scenes that the obj will stay on.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"stay","text":"`stay()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"TextInputComp":[{"kind":"InterfaceDeclaration","id":0,"name":"TextInputComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"hasFocus":[{"kind":"PropertySignature","id":0,"name":"hasFocus","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Enable the text input array from being modified by user input.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"stay","text":"`stay()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"TimerComp":[{"kind":"InterfaceDeclaration","id":0,"name":"TimerComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"wait":[{"kind":"MethodSignature","id":0,"name":"wait","parameters":[{"kind":"Parameter","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","questionToken":true,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"TimerController"},"jsDoc":{"doc":"Run the callback after n seconds.","tags":{}}}],"loop":[{"kind":"MethodSignature","id":0,"name":"loop","parameters":[{"kind":"Parameter","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Run the callback every n seconds.","tags":{"since":["v3000.0"]}}}],"tween":[{"kind":"MethodSignature","id":0,"name":"tween","typeParameters":[{"kind":"TypeParameter","id":0,"name":"V","constraint":{"kind":"TypeReference","id":0,"typeName":"LerpValue"}}],"parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"TypeReference","id":0,"typeName":"V"}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"TypeReference","id":0,"typeName":"V"}},{"kind":"Parameter","id":0,"name":"duration","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"setValue","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"value","type":{"kind":"TypeReference","id":0,"typeName":"V"}}],"type":{"kind":"VoidKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"easeFunc","questionToken":true,"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"TweenController"},"jsDoc":{"doc":"Tweeeeen! Note that this doesn't specifically mean tweening on this object's property, this just registers the timer on this object, so the tween will cancel with the object gets destroyed, or paused when obj.paused is true.","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"timer","text":"`timer()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"AreaComp":[{"kind":"InterfaceDeclaration","id":0,"name":"AreaComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"area":[{"kind":"PropertySignature","id":0,"name":"area","type":{"kind":"TypeLiteral","id":0,"members":{"shape":[{"kind":"PropertySignature","id":0,"name":"shape","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Shape"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"If we use a custom shape over render shape.","tags":{}}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Area scale.","tags":{}}}],"offset":[{"kind":"PropertySignature","id":0,"name":"offset","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Area offset.","tags":{}}}],"cursor":[{"kind":"PropertySignature","id":0,"name":"cursor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Cursor"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Cursor on hover.","tags":{}}}]}},"jsDoc":{"doc":"Collider area info.","tags":{}}}],"collisionIgnore":[{"kind":"PropertySignature","id":0,"name":"collisionIgnore","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Tag"}},"jsDoc":{"doc":"If this object should ignore collisions against certain other objects.","tags":{"since":["v3000.0"]}}}],"isClicked":[{"kind":"MethodSignature","id":0,"name":"isClicked","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If was just clicked on last frame.","tags":{}}}],"isHovering":[{"kind":"MethodSignature","id":0,"name":"isHovering","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If is being hovered on.","tags":{}}}],"checkCollision":[{"kind":"MethodSignature","id":0,"name":"checkCollision","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"AreaComp"}]}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Collision"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Check collision with another game obj.","tags":{"since":["v3000.0"]}}}],"getCollisions":[{"kind":"MethodSignature","id":0,"name":"getCollisions","parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Collision"}},"jsDoc":{"doc":"Get all collisions currently happening.","tags":{"since":["v3000.0"]}}}],"isColliding":[{"kind":"MethodSignature","id":0,"name":"isColliding","parameters":[{"kind":"Parameter","id":0,"name":"o","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"AreaComp"}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If is currently colliding with another game obj.","tags":{}}}],"isOverlapping":[{"kind":"MethodSignature","id":0,"name":"isOverlapping","parameters":[{"kind":"Parameter","id":0,"name":"o","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"AreaComp"}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If is currently overlapping with another game obj (like isColliding, but will return false if the objects are just touching edges).","tags":{}}}],"onClick":[{"kind":"MethodSignature","id":0,"name":"onClick","parameters":[{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"btn","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event runs when clicked.","tags":{"since":["v2000.1"]}}}],"onHover":[{"kind":"MethodSignature","id":0,"name":"onHover","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event runs once when hovered.","tags":{"since":["v3000.0"]}}}],"onHoverUpdate":[{"kind":"MethodSignature","id":0,"name":"onHoverUpdate","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event runs every frame when hovered.","tags":{"since":["v3000.0"]}}}],"onHoverEnd":[{"kind":"MethodSignature","id":0,"name":"onHoverEnd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event runs once when unhovered.","tags":{"since":["v3000.0"]}}}],"onCollide":[{"kind":"MethodSignature","id":0,"name":"onCollide","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event runs once when collide with another game obj with certain tag.","tags":{"since":["v2001.0"]}}},{"kind":"MethodSignature","id":0,"name":"onCollide","parameters":[{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event runs once when collide with another game obj.","tags":{"since":["v2000.1"]}}}],"onCollideUpdate":[{"kind":"MethodSignature","id":0,"name":"onCollideUpdate","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event runs every frame when collide with another game obj with certain tag.","tags":{"since":["v3000.0"]}}},{"kind":"MethodSignature","id":0,"name":"onCollideUpdate","parameters":[{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event runs every frame when collide with another game obj.","tags":{"since":["v3000.0"]}}}],"onCollideEnd":[{"kind":"MethodSignature","id":0,"name":"onCollideEnd","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event runs once when stopped colliding with another game obj with certain tag.","tags":{"since":["v3000.0"]}}},{"kind":"MethodSignature","id":0,"name":"onCollideEnd","parameters":[{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event runs once when stopped colliding with another game obj.","tags":{"since":["v3000.0"]}}}],"hasPoint":[{"kind":"MethodSignature","id":0,"name":"hasPoint","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If has a certain point inside collider.","tags":{}}}],"resolveCollision":[{"kind":"MethodSignature","id":0,"name":"resolveCollision","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Push out from another solid game obj if currently overlapping.","tags":{}}}],"localArea":[{"kind":"MethodSignature","id":0,"name":"localArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Shape"},"jsDoc":{"doc":"Get the geometry data for the collider in local coordinate space.","tags":{"since":["v3000.0"]}}}],"worldArea":[{"kind":"MethodSignature","id":0,"name":"worldArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Polygon"},"jsDoc":{"doc":"Get the geometry data for the collider in world coordinate space.","tags":{}}}],"screenArea":[{"kind":"MethodSignature","id":0,"name":"screenArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Polygon"},"jsDoc":{"doc":"Get the geometry data for the collider in screen coordinate space.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"area","text":"`area()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"AreaCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"AreaCompOpt","members":{"shape":[{"kind":"PropertySignature","id":0,"name":"shape","type":{"kind":"TypeReference","id":0,"typeName":"Shape"},"questionToken":true,"jsDoc":{"doc":"The shape of the area (currently only Rect and Polygon is supported).","tags":{"example":["```js\nadd([\n sprite(\"butterfly\"),\n pos(100, 200),\n // a triangle shape!\n area({ shape: new Polygon([vec2(0), vec2(100), vec2(-100, 100)]) }),\n])\n```"]}}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"Area scale.","tags":{}}}],"offset":[{"kind":"PropertySignature","id":0,"name":"offset","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true,"jsDoc":{"doc":"Area offset.","tags":{}}}],"cursor":[{"kind":"PropertySignature","id":0,"name":"cursor","type":{"kind":"TypeReference","id":0,"typeName":"Cursor"},"questionToken":true,"jsDoc":{"doc":"Cursor on hover.","tags":{}}}],"collisionIgnore":[{"kind":"PropertySignature","id":0,"name":"collisionIgnore","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Tag"}},"questionToken":true,"jsDoc":{"doc":"If this object should ignore collisions against certain other objects.","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"area","text":"`area()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"BodyComp":[{"kind":"InterfaceDeclaration","id":0,"name":"BodyComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"vel":[{"kind":"PropertySignature","id":0,"name":"vel","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Object current velocity.","tags":{"since":["v3001.0"]}}}],"drag":[{"kind":"PropertySignature","id":0,"name":"drag","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"How much velocity decays (velocity *= (1 - drag) every frame).","tags":{"since":["v3001.0"]}}}],"isStatic":[{"kind":"PropertySignature","id":0,"name":"isStatic","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If object is static, won't move, and all non static objects won't move past it.","tags":{}}}],"jumpForce":[{"kind":"PropertySignature","id":0,"name":"jumpForce","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Initial speed in pixels per second for jump().","tags":{}}}],"gravityScale":[{"kind":"PropertySignature","id":0,"name":"gravityScale","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Gravity multiplier.","tags":{}}}],"mass":[{"kind":"PropertySignature","id":0,"name":"mass","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Mass of the body, decides how much a non-static body should move when resolves with another non-static body. (default 1).","tags":{"since":["v3000.0"]}}}],"stickToPlatform":[{"kind":"PropertySignature","id":0,"name":"stickToPlatform","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If object should move with moving platform (default true).","tags":{"since":["v3000.0"]}}}],"curPlatform":[{"kind":"MethodSignature","id":0,"name":"curPlatform","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObj"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Current platform landing on.","tags":{}}}],"isGrounded":[{"kind":"MethodSignature","id":0,"name":"isGrounded","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If currently landing on a platform.","tags":{"since":["v2000.1"]}}}],"isFalling":[{"kind":"MethodSignature","id":0,"name":"isFalling","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If currently falling.","tags":{"since":["v2000.1"]}}}],"isJumping":[{"kind":"MethodSignature","id":0,"name":"isJumping","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If currently rising.","tags":{"since":["v3000.0"]}}}],"applyImpulse":[{"kind":"MethodSignature","id":0,"name":"applyImpulse","parameters":[{"kind":"Parameter","id":0,"name":"impulse","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Applies an impulse","tags":{"param":["The impulse vector, applied directly"]}}}],"addForce":[{"kind":"MethodSignature","id":0,"name":"addForce","parameters":[{"kind":"Parameter","id":0,"name":"force","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Applies a force","tags":{"param":["The force vector, applied after scaled by the inverse mass"]}}}],"jump":[{"kind":"MethodSignature","id":0,"name":"jump","parameters":[{"kind":"Parameter","id":0,"name":"force","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Upward thrust.","tags":{}}}],"onPhysicsResolve":[{"kind":"MethodSignature","id":0,"name":"onPhysicsResolve","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"col","type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when a collision is resolved.","tags":{"since":["v3000.0"]}}}],"onBeforePhysicsResolve":[{"kind":"MethodSignature","id":0,"name":"onBeforePhysicsResolve","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"col","type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs before a collision would be resolved.","tags":{"since":["v3000.0"]}}}],"onGround":[{"kind":"MethodSignature","id":0,"name":"onGround","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the object is grounded.","tags":{"since":["v2000.1"]}}}],"onFall":[{"kind":"MethodSignature","id":0,"name":"onFall","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the object starts falling.","tags":{"since":["v2000.1"]}}}],"onFallOff":[{"kind":"MethodSignature","id":0,"name":"onFallOff","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the object falls off platform.","tags":{"since":["v3000.0"]}}}],"onHeadbutt":[{"kind":"MethodSignature","id":0,"name":"onHeadbutt","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the object bumps into something on the head.","tags":{"since":["v2000.1"]}}}],"onLand":[{"kind":"MethodSignature","id":0,"name":"onLand","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when an object lands on this object.","tags":{"since":["v3001.0"]}}}],"onHeadbutted":[{"kind":"MethodSignature","id":0,"name":"onHeadbutted","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the object is bumped by another object head.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"body","text":"`body()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"BodyCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"BodyCompOpt","members":{"drag":[{"kind":"PropertySignature","id":0,"name":"drag","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"How much velocity decays (velocity *= (1 - drag) every frame).","tags":{"since":["v3001.0"]}}}],"jumpForce":[{"kind":"PropertySignature","id":0,"name":"jumpForce","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Initial speed in pixels per second for jump().","tags":{}}}],"maxVelocity":[{"kind":"PropertySignature","id":0,"name":"maxVelocity","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Maximum velocity when falling.","tags":{}}}],"gravityScale":[{"kind":"PropertySignature","id":0,"name":"gravityScale","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Gravity multiplier.","tags":{}}}],"isStatic":[{"kind":"PropertySignature","id":0,"name":"isStatic","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If object is static, won't move, and all non static objects won't move past it.","tags":{"since":["v3000.0"]}}}],"stickToPlatform":[{"kind":"PropertySignature","id":0,"name":"stickToPlatform","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If object should move with moving platform (default true).","tags":{"since":["v3000.0"]}}}],"mass":[{"kind":"PropertySignature","id":0,"name":"mass","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Mass of the body, decides how much a non-static body should move when resolves with another non-static body. (default 1).","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"body","text":"`body()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"DoubleJumpComp":[{"kind":"InterfaceDeclaration","id":0,"name":"DoubleJumpComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"numJumps":[{"kind":"PropertySignature","id":0,"name":"numJumps","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Number of jumps allowed.","tags":{}}}],"doubleJump":[{"kind":"MethodSignature","id":0,"name":"doubleJump","parameters":[{"kind":"Parameter","id":0,"name":"force","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Performs double jump (the initial jump only happens if player is grounded).","tags":{}}}],"onDoubleJump":[{"kind":"MethodSignature","id":0,"name":"onDoubleJump","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the object performs the second jump when double jumping.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"doubleJump","text":"`doubleJump()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"SurfaceEffectorCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"SurfaceEffectorCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0}}],"speedVariation":[{"kind":"PropertySignature","id":0,"name":"speedVariation","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"forceScale":[{"kind":"PropertySignature","id":0,"name":"forceScale","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]}}}],"SurfaceEffectorComp":[{"kind":"InterfaceDeclaration","id":0,"name":"SurfaceEffectorComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0}}],"speedVariation":[{"kind":"PropertySignature","id":0,"name":"speedVariation","type":{"kind":"NumberKeyword","id":0}}],"forceScale":[{"kind":"PropertySignature","id":0,"name":"forceScale","type":{"kind":"NumberKeyword","id":0}}]}}],"AreaEffectorCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"AreaEffectorCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"useGlobalAngle":[{"kind":"PropertySignature","id":0,"name":"useGlobalAngle","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"forceAngle":[{"kind":"PropertySignature","id":0,"name":"forceAngle","type":{"kind":"NumberKeyword","id":0}}],"forceMagnitude":[{"kind":"PropertySignature","id":0,"name":"forceMagnitude","type":{"kind":"NumberKeyword","id":0}}],"forceVariation":[{"kind":"PropertySignature","id":0,"name":"forceVariation","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"linearDrag":[{"kind":"PropertySignature","id":0,"name":"linearDrag","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]}}}],"AreaEffectorComp":[{"kind":"InterfaceDeclaration","id":0,"name":"AreaEffectorComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"useGlobalAngle":[{"kind":"PropertySignature","id":0,"name":"useGlobalAngle","type":{"kind":"BooleanKeyword","id":0}}],"forceAngle":[{"kind":"PropertySignature","id":0,"name":"forceAngle","type":{"kind":"NumberKeyword","id":0}}],"forceMagnitude":[{"kind":"PropertySignature","id":0,"name":"forceMagnitude","type":{"kind":"NumberKeyword","id":0}}],"forceVariation":[{"kind":"PropertySignature","id":0,"name":"forceVariation","type":{"kind":"NumberKeyword","id":0}}],"linearDrag":[{"kind":"PropertySignature","id":0,"name":"linearDrag","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]}}],"ForceMode":[{"kind":"TypeAliasDeclaration","id":0,"name":"ForceMode","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"constant","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"inverseLinear","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"inverseSquared","hasExtendedUnicodeEscape":false}}]}}],"PointEffectorCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"PointEffectorCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"forceMagnitude":[{"kind":"PropertySignature","id":0,"name":"forceMagnitude","type":{"kind":"NumberKeyword","id":0}}],"forceVariation":[{"kind":"PropertySignature","id":0,"name":"forceVariation","type":{"kind":"NumberKeyword","id":0}}],"distanceScale":[{"kind":"PropertySignature","id":0,"name":"distanceScale","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"forceMode":[{"kind":"PropertySignature","id":0,"name":"forceMode","type":{"kind":"TypeReference","id":0,"typeName":"ForceMode"},"questionToken":true}],"linearDrag":[{"kind":"PropertySignature","id":0,"name":"linearDrag","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]}}}],"PointEffectorComp":[{"kind":"InterfaceDeclaration","id":0,"name":"PointEffectorComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"forceMagnitude":[{"kind":"PropertySignature","id":0,"name":"forceMagnitude","type":{"kind":"NumberKeyword","id":0}}],"forceVariation":[{"kind":"PropertySignature","id":0,"name":"forceVariation","type":{"kind":"NumberKeyword","id":0}}],"distanceScale":[{"kind":"PropertySignature","id":0,"name":"distanceScale","type":{"kind":"NumberKeyword","id":0}}],"forceMode":[{"kind":"PropertySignature","id":0,"name":"forceMode","type":{"kind":"TypeReference","id":0,"typeName":"ForceMode"}}],"linearDrag":[{"kind":"PropertySignature","id":0,"name":"linearDrag","type":{"kind":"NumberKeyword","id":0}}]}}],"ConstantForceCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"ConstantForceCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"force":[{"kind":"PropertySignature","id":0,"name":"force","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true}]}}}],"ConstantForceComp":[{"kind":"InterfaceDeclaration","id":0,"name":"ConstantForceComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"force":[{"kind":"PropertySignature","id":0,"name":"force","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true}]}}],"BuoyancyEffectorCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"BuoyancyEffectorCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"surfaceLevel":[{"kind":"PropertySignature","id":0,"name":"surfaceLevel","type":{"kind":"NumberKeyword","id":0}}],"density":[{"kind":"PropertySignature","id":0,"name":"density","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"linearDrag":[{"kind":"PropertySignature","id":0,"name":"linearDrag","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"angularDrag":[{"kind":"PropertySignature","id":0,"name":"angularDrag","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"flowAngle":[{"kind":"PropertySignature","id":0,"name":"flowAngle","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"flowMagnitude":[{"kind":"PropertySignature","id":0,"name":"flowMagnitude","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"flowVariation":[{"kind":"PropertySignature","id":0,"name":"flowVariation","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]}}}],"BuoyancyEffectorComp":[{"kind":"InterfaceDeclaration","id":0,"name":"BuoyancyEffectorComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"surfaceLevel":[{"kind":"PropertySignature","id":0,"name":"surfaceLevel","type":{"kind":"NumberKeyword","id":0}}],"density":[{"kind":"PropertySignature","id":0,"name":"density","type":{"kind":"NumberKeyword","id":0}}],"linearDrag":[{"kind":"PropertySignature","id":0,"name":"linearDrag","type":{"kind":"NumberKeyword","id":0}}],"angularDrag":[{"kind":"PropertySignature","id":0,"name":"angularDrag","type":{"kind":"NumberKeyword","id":0}}],"flowAngle":[{"kind":"PropertySignature","id":0,"name":"flowAngle","type":{"kind":"NumberKeyword","id":0}}],"flowMagnitude":[{"kind":"PropertySignature","id":0,"name":"flowMagnitude","type":{"kind":"NumberKeyword","id":0}}],"flowVariation":[{"kind":"PropertySignature","id":0,"name":"flowVariation","type":{"kind":"NumberKeyword","id":0}}],"applyBuoyancy":[{"kind":"MethodSignature","id":0,"name":"applyBuoyancy","parameters":[{"kind":"Parameter","id":0,"name":"body","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"BodyComp"}]}},{"kind":"Parameter","id":0,"name":"submergedArea","type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}],"type":{"kind":"VoidKeyword","id":0}}],"applyDrag":[{"kind":"MethodSignature","id":0,"name":"applyDrag","parameters":[{"kind":"Parameter","id":0,"name":"body","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"BodyComp"}]}},{"kind":"Parameter","id":0,"name":"submergedArea","type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}],"type":{"kind":"VoidKeyword","id":0}}]}}],"AnchorComp":[{"kind":"InterfaceDeclaration","id":0,"name":"AnchorComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"jsDoc":{"doc":"Anchor point for render.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"anchor","text":"`anchor()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"FollowComp":[{"kind":"InterfaceDeclaration","id":0,"name":"FollowComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"follow":[{"kind":"PropertySignature","id":0,"name":"follow","type":{"kind":"TypeLiteral","id":0,"members":{"obj":[{"kind":"PropertySignature","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"offset":[{"kind":"PropertySignature","id":0,"name":"offset","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"follow","text":"`follow()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"LayerComp":[{"kind":"InterfaceDeclaration","id":0,"name":"LayerComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"layerIndex":[{"kind":"GetAccessor","id":0,"name":"layerIndex","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get the index of the current layer the object is assigned to.","tags":{"returns":["The index of the layer the object is assigned to, or `null` if the layer does not exist."]}}}],"layer":[{"kind":"GetAccessor","id":0,"name":"layer","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get the name of the current layer the object is assigned to.","tags":{"returns":["The name of the layer the object is assigned to."]}}},{"kind":"SetAccessor","id":0,"name":"layer","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"jsDoc":{"doc":"Set the name of the layer the object should be assigned to.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"layer","text":"`layer()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"OffScreenComp":[{"kind":"InterfaceDeclaration","id":0,"name":"OffScreenComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"isOffScreen":[{"kind":"MethodSignature","id":0,"name":"isOffScreen","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If object is currently out of view.","tags":{}}}],"onExitScreen":[{"kind":"MethodSignature","id":0,"name":"onExitScreen","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when object goes out of view.","tags":{}}}],"onEnterScreen":[{"kind":"MethodSignature","id":0,"name":"onEnterScreen","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when object enters view.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"offscreen","text":"`offscreen()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"OffScreenCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"OffScreenCompOpt","members":{"hide":[{"kind":"PropertySignature","id":0,"name":"hide","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If hide object when out of view.","tags":{}}}],"pause":[{"kind":"PropertySignature","id":0,"name":"pause","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If pause object when out of view.","tags":{}}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If destroy object when out of view.","tags":{}}}],"distance":[{"kind":"PropertySignature","id":0,"name":"distance","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The distance when out of view is triggered (default 200).","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for "},{"kind":"JSDocLink","id":0,"name":"offscreen","text":"`offscreen()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"RotateComp":[{"kind":"InterfaceDeclaration","id":0,"name":"RotateComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Angle in degrees.","tags":{}}}],"rotateBy":[{"kind":"MethodSignature","id":0,"name":"rotateBy","parameters":[{"kind":"Parameter","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Rotate in degrees.","tags":{}}}],"rotateTo":[{"kind":"MethodSignature","id":0,"name":"rotateTo","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Rotate to a degree (like directly assign to .angle)","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"rotate","text":"`rotate()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"ScaleComp":[{"kind":"InterfaceDeclaration","id":0,"name":"ScaleComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The current scale of the object","tags":{"returns":[[{"kind":"JSDocText","id":0,"text":"The current scale of the object as a "},{"kind":"JSDocLink","id":0,"name":"Vec2","text":"`Vec2`"}]]}}}],"scaleTo":[{"kind":"MethodSignature","id":0,"name":"scaleTo","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set the scale of the object to a number","tags":{}}},{"kind":"MethodSignature","id":0,"name":"scaleTo","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set the scale of the object to a Vec2","tags":{}}},{"kind":"MethodSignature","id":0,"name":"scaleTo","parameters":[{"kind":"Parameter","id":0,"name":"sx","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"sy","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set the scale of the object to a number for x and y","tags":{}}}],"scaleBy":[{"kind":"MethodSignature","id":0,"name":"scaleBy","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Scale the object by a number","tags":{}}},{"kind":"MethodSignature","id":0,"name":"scaleBy","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Scale the object by a Vec2","tags":{}}},{"kind":"MethodSignature","id":0,"name":"scaleBy","parameters":[{"kind":"Parameter","id":0,"name":"sx","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"sy","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Scale the object by a number for x and y","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"scale","text":"`scale()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"ZComp":[{"kind":"InterfaceDeclaration","id":0,"name":"ZComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"z":[{"kind":"PropertySignature","id":0,"name":"z","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Defines the z-index of this game obj","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"z","text":"`z()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"GameObjEventNames":[{"kind":"TypeAliasDeclaration","id":0,"name":"GameObjEventNames","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"update","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"add","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"destroy","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"collide","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"collideUpdate","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"collideEnd","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"hurt","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"heal","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"death","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"beforePhysicsResolve","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"physicsResolve","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ground","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"fall","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"fallOff","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"headbutt","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"doubleJump","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"exitView","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"enterView","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"animStart","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"animEnd","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"navigationNext","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"navigationEnded","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"navigationStarted","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"targetReached","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"patrolFinished","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"objectSpotted","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"animateChannelFinished","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"animateFinished","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"spatialMapChanged","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"navigationMapInvalid","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"navigationMapChanged","hasExtendedUnicodeEscape":false}}]}}],"GameObjEventMap":[{"kind":"TypeAliasDeclaration","id":0,"name":"GameObjEventMap","type":{"kind":"TypeLiteral","id":0,"members":{}},"jsDoc":{"doc":"Game Object events.","tags":{"group":["Events"]}}}],"TupleWithoutFirst":[{"kind":"TypeAliasDeclaration","id":0,"name":"TupleWithoutFirst","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","constraint":{"kind":"ArrayType","id":0,"elementType":{"kind":"AnyKeyword","id":0}}}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"TupleType","id":0,"elements":[{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}},{"kind":"RestType","id":0,"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"E"}}}]},"trueType":{"kind":"TypeReference","id":0,"typeName":"E"},"falseType":{"kind":"NeverKeyword","id":0}}}],"SceneName":[{"kind":"TypeAliasDeclaration","id":0,"name":"SceneName","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"The name of a scene.","tags":{}}}],"SceneDef":[{"kind":"TypeAliasDeclaration","id":0,"name":"SceneDef","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"Game":[{"kind":"TypeAliasDeclaration","id":0,"name":"Game","type":{"kind":"TypeReference","id":0,"typeName":"ReturnType","typeArguments":[{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"initGame"}}]}}],"BoomOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"BoomOpt","members":{"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Animation speed.","tags":{}}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Scale.","tags":{}}}],"comps":[{"kind":"PropertySignature","id":0,"name":"comps","type":{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"AnyKeyword","id":0}]},"questionToken":true,"jsDoc":{"doc":"Additional components.","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"tags":{"group":["Options"]}}}],"LevelOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"LevelOpt","members":{"tileWidth":[{"kind":"PropertySignature","id":0,"name":"tileWidth","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width of each block.","tags":{}}}],"tileHeight":[{"kind":"PropertySignature","id":0,"name":"tileHeight","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height of each block.","tags":{}}}],"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true,"jsDoc":{"doc":"Position of the first block.","tags":{}}}],"tiles":[{"kind":"PropertySignature","id":0,"name":"tiles","type":{"kind":"TypeLiteral","id":0,"members":{}},"jsDoc":{"doc":"Definition of each tile.","tags":{}}}],"wildcardTile":[{"kind":"PropertySignature","id":0,"name":"wildcardTile","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"sym","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"AnyKeyword","id":0}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}},{"kind":"UndefinedKeyword","id":0}]}},"questionToken":true,"jsDoc":{"doc":"Called when encountered a symbol not defined in \"tiles\".","tags":{}}}]},"jsDoc":{"tags":{"group":["Options"]}}}],"KAPLAYCtx":[{"kind":"InterfaceDeclaration","id":0,"name":"KAPLAYCtx","typeParameters":[{"kind":"TypeParameter","id":0,"name":"TButtonDef","constraint":{"kind":"TypeReference","id":0,"typeName":"ButtonsDef"},"default":{"kind":"TypeLiteral","id":0,"members":{}}},{"kind":"TypeParameter","id":0,"name":"TButton","constraint":{"kind":"StringKeyword","id":0},"default":{"kind":"StringKeyword","id":0}}],"members":{"add":[{"kind":"MethodSignature","id":0,"name":"add","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"comps","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"ConstructorType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"go","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"R"},"falseType":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"go","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"R"},"falseType":{"kind":"TypeReference","id":0,"typeName":"T"}}}]},"jsDoc":{"doc":"Assemble a game object from a list of components, and add it to the game","tags":{"returns":["The added game object that contains all properties and methods each component offers."],"example":["```js\nconst player = add([\n // List of components, each offers a set of functionalities\n sprite(\"mark\"),\n pos(100, 200),\n area(),\n body(),\n health(8),\n // Plain strings are tags, a quicker way to let us define behaviors for a group\n \"player\",\n \"friendly\",\n // Components are just plain objects, you can pass an object literal as a component.\n {\n dir: LEFT,\n dead: false,\n speed: 240,\n },\n])\n\n// .jump is provided by body()\nplayer.jump()\n\n// .moveTo is provided by pos()\nplayer.moveTo(300, 200)\n\n// .onUpdate() is on every game object, it registers an event that runs every frame\nplayer.onUpdate(() => {\n // .move() is provided by pos()\n player.move(player.dir.scale(player.speed))\n})\n\n// .onCollide is provided by area()\nplayer.onCollide(\"tree\", () => {\n destroy(player)\n})\n```"],"group":["Game Obj"]}}}],"make":[{"kind":"MethodSignature","id":0,"name":"make","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"comps","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"ConstructorType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"go","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"R"},"falseType":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"go","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"R"},"falseType":{"kind":"TypeReference","id":0,"typeName":"T"}}}]},"jsDoc":{"doc":"Create a game object like add(), but not adding to the scene.","tags":{"since":["v3000.1"],"example":["```js\nconst label = make([\n text(\"oh hi\"),\n])\n\nadd([\n rect(label.width, label.height),\n color(0, 0, 255),\n children(label),\n])\n```"],"group":["Game Obj"]}}}],"readd":[{"kind":"MethodSignature","id":0,"name":"readd","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove and re-add the game obj, without triggering add / destroy events.","tags":{"example":["```js\n// Common way to use this is to have one sprite overlap another sprite, and use readd() to have the bottom sprite on top of the other.\n\n// Create two sprites.\nconst greenBean = add([\n sprite(\"bean\"),\n pos(200,140),\n color(255, 255, 255),\n area(),\n]);\n\n// This bean will overlap the green bean.\nconst purpleBean = add([\n sprite(\"bean\"),\n pos(230,140),\n color(255, 0, 255),\n area(),\n]);\n\n// Example 1: simply call readd() on the target you want on top.\nreadd(greenBean);\n\n// Example 2: using onClick() or other functions with readd().\n// If you comment out the first example, and use this readd() with a function like onClick(), you\ncan keep switching which sprite is above the other ( click on edge of face ).\n\npurpleBean.onClick(() => {\n readd(greenBean)\n});\n\ngreenBean.onClick(() => {\n readd(purpleBean)\n});\n```"],"group":["Game Obj"]}}}],"get":[{"kind":"MethodSignature","id":0,"name":"get","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Tag"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Tag"}}]}},{"kind":"Parameter","id":0,"name":"opts","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"GetOpt"}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},"jsDoc":{"doc":"Get a list of all game objs with certain tag.","tags":{"example":["```js\n// get a list of all game objs with tag \"bomb\"\nconst allBombs = get(\"bomb\")\n\n// To get all objects use \"*\"\nconst allObjs = get(\"*\")\n\n// Recursively get all children and descendents\nconst allObjs = get(\"*\", { recursive: true })\n```"],"group":["Game Obj"]}}}],"query":[{"kind":"MethodSignature","id":0,"name":"query","parameters":[{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"TypeReference","id":0,"typeName":"QueryOpt"}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},"jsDoc":{"doc":"Get a list of game objects in an advanced way.","tags":{"example":["```js\nconst bean = k.add([\"friend\", \"bean\"]);\nconst bean2 = k.add([\"friend\", \"bean\"]);\nconst bag = k.add([\"friend\", \"bag\"]);\n\n// get bean\nquery({\n include: \"bean\",\n}) // will return [bean, bean2];\n\n// get all friends excluding bean\nquery({\n include: \"friend\",\n exclude: \"bean\",\n}); // will return [bag]\n\n```"],"group":["Game Obj"]}}}],"destroy":[{"kind":"MethodSignature","id":0,"name":"destroy","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove the game obj.","tags":{"example":["```js\n// every time bean collides with anything with tag \"fruit\", remove it\nbean.onCollide(\"fruit\", (fruit) => {\n destroy(fruit)\n})\n```"],"group":["Game Obj"]}}}],"destroyAll":[{"kind":"MethodSignature","id":0,"name":"destroyAll","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove all game objs with certain tag.","tags":{"example":["```js\n// destroy all objects with tag \"bomb\" when you click one\nonClick(\"bomb\", () => {\n destroyAll(\"bomb\")\n})\n```"],"group":["Game Obj"]}}}],"pos":[{"kind":"MethodSignature","id":0,"name":"pos","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"PosComp"},"jsDoc":{"doc":"Set the position of a Game Object.","tags":{"example":["```js\n// This game object will draw a \"bean\" sprite at (100, 200)\nadd([\n pos(100, 200),\n sprite(\"bean\"),\n])\n```"],"group":["Components"]}}},{"kind":"MethodSignature","id":0,"name":"pos","parameters":[{"kind":"Parameter","id":0,"name":"xy","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"PosComp"}},{"kind":"MethodSignature","id":0,"name":"pos","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"PosComp"}},{"kind":"MethodSignature","id":0,"name":"pos","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"PosComp"}}],"scale":[{"kind":"MethodSignature","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"ScaleComp"},"jsDoc":{"doc":"Set the scale of a Game Object.","tags":{"example":["```js\n// scale uniformly with one value\nadd([\n sprite(\"bean\"),\n\t scale(3),\n])\n// scale with x & y values. In this case, scales more horizontally.\nadd([\n sprite(\"bean\"),\n\t scale(3, 1),\n])\n // scale with vec2(x,y).\nbean.scale = vec2(2,4)\n\n```"],"group":["Components"]}}},{"kind":"MethodSignature","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"xy","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"ScaleComp"}},{"kind":"MethodSignature","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"ScaleComp"}},{"kind":"MethodSignature","id":0,"name":"scale","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"ScaleComp"}}],"rotate":[{"kind":"MethodSignature","id":0,"name":"rotate","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"RotateComp"},"jsDoc":{"doc":"Rotates a Game Object (in degrees).","tags":{"group":["Components"]}}}],"color":[{"kind":"MethodSignature","id":0,"name":"color","parameters":[{"kind":"Parameter","id":0,"name":"r","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"g","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"ColorComp"},"jsDoc":{"doc":"Sets the color of a Game Object (rgb 0-255).","tags":{"example":["```js\n// blue frog\nadd([\n sprite(\"bean\"),\n color(0, 0, 255)\n])\n```"],"group":["Components"]}}},{"kind":"MethodSignature","id":0,"name":"color","parameters":[{"kind":"Parameter","id":0,"name":"c","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"type":{"kind":"TypeReference","id":0,"typeName":"ColorComp"}},{"kind":"MethodSignature","id":0,"name":"color","parameters":[{"kind":"Parameter","id":0,"name":"rgb","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"ColorComp"}},{"kind":"MethodSignature","id":0,"name":"color","parameters":[{"kind":"Parameter","id":0,"name":"c","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"ColorComp"}},{"kind":"MethodSignature","id":0,"name":"color","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"ColorComp"}}],"opacity":[{"kind":"MethodSignature","id":0,"name":"opacity","parameters":[{"kind":"Parameter","id":0,"name":"o","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"OpacityComp"},"jsDoc":{"doc":"Sets the opacity of a Game Object (0.0 - 1.0).","tags":{"group":["Components"]}}}],"sprite":[{"kind":"MethodSignature","id":0,"name":"sprite","parameters":[{"kind":"Parameter","id":0,"name":"spr","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SpriteData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}]}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"SpriteCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"SpriteComp"},"jsDoc":{"doc":"Attach and render a sprite to a Game Object.","tags":{"example":["```js\n// minimal setup\nadd([\n sprite(\"bean\"),\n])\n\n// with options\nconst bean = add([\n sprite(\"bean\", {\n // start with animation \"idle\"\n anim: \"idle\",\n }),\n])\n\n// play / stop an anim\nbean.play(\"jump\")\nbean.stop()\n\n// manually setting a frame\nbean.frame = 3\n```"],"group":["Components"]}}}],"text":[{"kind":"MethodSignature","id":0,"name":"text","parameters":[{"kind":"Parameter","id":0,"name":"txt","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"TextCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"TextComp"},"jsDoc":{"doc":"Attach and render a text to a Game Object.","tags":{"example":["```js\n// a simple score counter\nconst score = add([\n text(\"Score: 0\"),\n pos(24, 24),\n { value: 0 },\n])\n\nplayer.onCollide(\"coin\", () => {\n score.value += 1\n score.text = \"Score:\" + score.value\n})\n\n// with options\nadd([\n pos(24, 24),\n text(\"ohhi\", {\n size: 48, // 48 pixels tall\n width: 320, // it'll wrap to next line when width exceeds this value\n font: \"sans-serif\", // specify any font you loaded or browser built-in\n }),\n])\n```"],"group":["Components"]}}}],"polygon":[{"kind":"MethodSignature","id":0,"name":"polygon","parameters":[{"kind":"Parameter","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"PolygonCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"PolygonComp"},"jsDoc":{"doc":"Attach and render a polygon to a Game Object.","tags":{"since":["v3001.0"],"example":["```js\n// Make a square the hard way\nadd([\n pos(80, 120),\n polygon([vec2(0,0), vec2(50,0), vec2(50,50), vec2(0,50)]),\n outline(4),\n area(),\n])\n```"],"group":["Components"]}}}],"rect":[{"kind":"MethodSignature","id":0,"name":"rect","parameters":[{"kind":"Parameter","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"RectCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RectComp"},"jsDoc":{"doc":"Attach and render a rectangle to a Game Object.","tags":{"example":["```js\nconst obstacle = add([\n pos(80, 120),\n rect(20, 40),\n outline(4),\n area(),\n])\n```"],"group":["Components"]}}}],"circle":[{"kind":"MethodSignature","id":0,"name":"circle","parameters":[{"kind":"Parameter","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"CircleComp"},"jsDoc":{"doc":"Attach and render a circle to a Game Object.","tags":{"example":["```js\nadd([\n pos(80, 120),\n circle(16),\n])\n```"],"group":["Components"]}}}],"uvquad":[{"kind":"MethodSignature","id":0,"name":"uvquad","parameters":[{"kind":"Parameter","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"UVQuadComp"},"jsDoc":{"doc":"Attach and render a UV quad to a Game Object.","tags":{"example":["```js\nadd([\n uvquad(width(), height()),\n shader(\"spiral\"),\n])\n```"],"group":["Components"]}}}],"area":[{"kind":"MethodSignature","id":0,"name":"area","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"AreaComp"},"jsDoc":{"doc":"Attach a collider area from shape and enables collision detection in a Game Object.","tags":{"example":["```js\n// Automatically generate area information from the shape of render\nconst player = add([\n sprite(\"bean\"),\n area(),\n])\n\n// Die if player collides with another game obj with tag \"tree\"\nplayer.onCollide(\"tree\", () => {\n destroy(player)\n go(\"lose\")\n})\n\n// Check for collision manually every frame instead of registering an event\nplayer.onUpdate(() => {\n if (player.isColliding(bomb)) {\n score += 1\n }\n})\n```"],"group":["Components"]}}},{"kind":"MethodSignature","id":0,"name":"area","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"AreaCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"AreaComp"}}],"anchor":[{"kind":"MethodSignature","id":0,"name":"anchor","parameters":[{"kind":"Parameter","id":0,"name":"o","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"AnchorComp"},"jsDoc":{"doc":"Anchor point for render (default \"topleft\").","tags":{"example":["```js\n// set anchor to \"center\" so it'll rotate from center\nadd([\n rect(40, 10),\n rotate(45),\n anchor(\"center\"),\n])\n```"],"group":["Components"]}}}],"z":[{"kind":"MethodSignature","id":0,"name":"z","parameters":[{"kind":"Parameter","id":0,"name":"z","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"ZComp"},"jsDoc":{"doc":"Determines the draw order for objects on the same layer. Object will be drawn on top if z value is bigger.","tags":{"group":["Components"]}}}],"layer":[{"kind":"MethodSignature","id":0,"name":"layer","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"LayerComp"},"jsDoc":{"doc":"Determines the layer for objects. Object will be drawn on top if the layer index is higher.","tags":{"group":["Components"]}}}],"outline":[{"kind":"MethodSignature","id":0,"name":"outline","parameters":[{"kind":"Parameter","id":0,"name":"width","questionToken":true,"type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"color","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"type":{"kind":"TypeReference","id":0,"typeName":"OutlineComp"},"jsDoc":{"doc":"Give obj an outline.","tags":{"group":["Components"]}}}],"particles":[{"kind":"MethodSignature","id":0,"name":"particles","parameters":[{"kind":"Parameter","id":0,"name":"popt","type":{"kind":"TypeReference","id":0,"typeName":"ParticlesOpt"}},{"kind":"Parameter","id":0,"name":"eopt","type":{"kind":"TypeReference","id":0,"typeName":"EmitterOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"ParticlesComp"}}],"body":[{"kind":"MethodSignature","id":0,"name":"body","parameters":[{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"BodyCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"BodyComp"},"jsDoc":{"doc":"Physical body that responds to gravity. Requires \"area\" and \"pos\" comp. This also makes the object \"solid\".","tags":{"example":["```js\n// bean jumpy\nconst bean = add([\n sprite(\"bean\"),\n // body() requires \"pos\" and \"area\" component\n pos(),\n area(),\n body(),\n])\n\n// when bean is grounded, press space to jump\n// check out #BodyComp for more methods\nonKeyPress(\"space\", () => {\n if (bean.isGrounded()) {\n bean.jump()\n }\n})\n\n// run something when bean falls and hits a ground\nbean.onGround(() => {\n debug.log(\"oh no!\")\n})\n```"],"group":["Components"]}}}],"surfaceEffector":[{"kind":"MethodSignature","id":0,"name":"surfaceEffector","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"SurfaceEffectorCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"SurfaceEffectorComp"},"jsDoc":{"doc":"Applies a force on a colliding object in order to make it move along the collision tangent vector.\nGood for conveyor belts.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"areaEffector":[{"kind":"MethodSignature","id":0,"name":"areaEffector","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"AreaEffectorCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"AreaEffectorComp"},"jsDoc":{"doc":"Applies a force on a colliding object.\nGood to apply anti-gravity, wind or water flow.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"pointEffector":[{"kind":"MethodSignature","id":0,"name":"pointEffector","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"PointEffectorCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"PointEffectorComp"},"jsDoc":{"doc":"Applies a force on a colliding object directed towards this object's origin.\nGood to apply magnetic attractiong or repulsion.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"buoyancyEffector":[{"kind":"MethodSignature","id":0,"name":"buoyancyEffector","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"BuoyancyEffectorCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"BuoyancyEffectorComp"},"jsDoc":{"doc":"Applies an upwards force (force against gravity) to colliding objects depending on the fluid density and submerged area.\nGood to apply constant thrust.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"constantForce":[{"kind":"MethodSignature","id":0,"name":"constantForce","parameters":[{"kind":"Parameter","id":0,"name":"opts","type":{"kind":"TypeReference","id":0,"typeName":"ConstantForceCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"ConstantForceComp"},"jsDoc":{"doc":"Applies a constant force to the object.\nGood to apply constant thrust.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"doubleJump":[{"kind":"MethodSignature","id":0,"name":"doubleJump","parameters":[{"kind":"Parameter","id":0,"name":"numJumps","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"DoubleJumpComp"},"jsDoc":{"doc":"Enables double jump. Requires \"body\" component.","tags":{"since":["v3000.0"],"group":["Components"]}}}],"move":[{"kind":"MethodSignature","id":0,"name":"move","parameters":[{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}},{"kind":"Parameter","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"EmptyComp"},"jsDoc":{"doc":"Move towards a direction infinitely, and destroys when it leaves game view. Requires \"pos\" component.","tags":{"example":["```js\n// enemy throwing feces at player\nconst projectile = add([\n sprite(\"feces\"),\n pos(enemy.pos),\n area(),\n move(player.pos.angle(enemy.pos), 1200),\n offscreen({ destroy: true }),\n])\n```"],"group":["Components"]}}}],"offscreen":[{"kind":"MethodSignature","id":0,"name":"offscreen","parameters":[{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"OffScreenCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"OffScreenComp"},"jsDoc":{"doc":"Control the behavior of object when it goes out of view.","tags":{"since":["v2000.2"],"example":["```js\nadd([\n pos(player.pos),\n sprite(\"bullet\"),\n offscreen({ destroy: true }),\n \"projectile\",\n])\n```"],"group":["Components"]}}}],"follow":[{"kind":"MethodSignature","id":0,"name":"follow","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObj"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"offset","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"FollowComp"},"jsDoc":{"doc":"Follow another game obj's position.","tags":{"group":["Components"]}}}],"shader":[{"kind":"MethodSignature","id":0,"name":"shader","parameters":[{"kind":"Parameter","id":0,"name":"id","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"uniform","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Uniform"},{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"ShaderComp"},"jsDoc":{"doc":"Custom shader.","tags":{"group":["Components"]}}}],"textInput":[{"kind":"MethodSignature","id":0,"name":"textInput","parameters":[{"kind":"Parameter","id":0,"name":"hasFocus","questionToken":true,"type":{"kind":"BooleanKeyword","id":0}},{"kind":"Parameter","id":0,"name":"maxInputLength","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"TextInputComp"},"jsDoc":{"doc":"Get input from the user and store it in the nodes text property, displaying it with the text component and allowing other functions to access it.","tags":{"example":["```js\nconst obj = add([\n text(\"\"),\n textInput(),\n])\n\nobj.hasFocus = false\ndebug.log(obj.text) // oh no i cant see my new text since it was disabled\n```"],"group":["Components"]}}}],"timer":[{"kind":"MethodSignature","id":0,"name":"timer","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"TimerComp"},"jsDoc":{"doc":"Enable timer related functions like wait(), loop(), tween() on the game object.","tags":{"example":["```js\nconst obj = add([\n timer(),\n])\n\nobj.wait(2, () => { ... })\nobj.loop(0.5, () => { ... })\nobj.tween(obj.pos, mousePos(), 0.5, (p) => obj.pos = p, easings.easeOutElastic)\n```"],"group":["Components"]}}}],"fixed":[{"kind":"MethodSignature","id":0,"name":"fixed","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"FixedComp"},"jsDoc":{"doc":"Make object unaffected by camera or parent object transforms, and render at last.","tags":{"example":["```js\n// this will be be fixed on top left and not affected by camera\nconst score = add([\n text(0),\n pos(12, 12),\n fixed(),\n])\n```"],"group":["Components"]}}}],"stay":[{"kind":"MethodSignature","id":0,"name":"stay","parameters":[{"kind":"Parameter","id":0,"name":"scenesToStay","questionToken":true,"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"StayComp"},"jsDoc":{"doc":"Don't get destroyed on scene switch.","tags":{"example":["```js\nplayer.onCollide(\"bomb\", () => {\n // spawn an explosion and switch scene, but don't destroy the explosion game obj on scene switch\n add([\n sprite(\"explosion\", { anim: \"burst\", }),\n stay(),\n lifespan(1),\n ])\n go(\"lose\", score)\n})\n```"],"group":["Components"]}}}],"health":[{"kind":"MethodSignature","id":0,"name":"health","parameters":[{"kind":"Parameter","id":0,"name":"hp","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"maxHP","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"HealthComp"},"jsDoc":{"doc":"Handles health related logic and events.","tags":{"example":["```js\nconst player = add([\n health(3),\n])\n\nplayer.onCollide(\"bad\", (bad) => {\n player.hurt(1)\n bad.hurt(1)\n})\n\nplayer.onCollide(\"apple\", () => {\n player.heal(1)\n})\n\nplayer.on(\"hurt\", () => {\n play(\"ouch\")\n})\n\n// triggers when hp reaches 0\nplayer.on(\"death\", () => {\n destroy(player)\n go(\"lose\")\n})\n```"],"group":["Components"]}}}],"lifespan":[{"kind":"MethodSignature","id":0,"name":"lifespan","parameters":[{"kind":"Parameter","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LifespanCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"EmptyComp"},"jsDoc":{"doc":"Destroy the game obj after certain amount of time","tags":{"example":["```js\n// spawn an explosion, destroy after 1 seconds, start fading away after 0.5 second\nadd([\n sprite(\"explosion\", { anim: \"burst\", }),\n lifespan(1, { fade: 0.5 }),\n])\n```"],"group":["Components"]}}}],"named":[{"kind":"MethodSignature","id":0,"name":"named","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"NamedComp"},"jsDoc":{"doc":"Names an object.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"state":[{"kind":"MethodSignature","id":0,"name":"state","parameters":[{"kind":"Parameter","id":0,"name":"initialState","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"stateList","questionToken":true,"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"StateComp"},"jsDoc":{"doc":"Finite state machine.","tags":{"since":["v2000.1"],"example":["```js\nconst enemy = add([\n pos(80, 100),\n sprite(\"robot\"),\n state(\"idle\", [\"idle\", \"attack\", \"move\"]),\n])\n\n// this callback will run once when enters \"attack\" state\nenemy.onStateEnter(\"attack\", () => {\n // enter \"idle\" state when the attack animation ends\n enemy.play(\"attackAnim\", {\n // any additional arguments will be passed into the onStateEnter() callback\n onEnd: () => enemy.enterState(\"idle\", rand(1, 3)),\n })\n checkHit(enemy, player)\n})\n\n// this will run once when enters \"idle\" state\nenemy.onStateEnter(\"idle\", (time) => {\n enemy.play(\"idleAnim\")\n wait(time, () => enemy.enterState(\"move\"))\n})\n\n// this will run every frame when current state is \"move\"\nenemy.onStateUpdate(\"move\", () => {\n enemy.follow(player)\n if (enemy.pos.dist(player.pos) < 16) {\n enemy.enterState(\"attack\")\n }\n})\n```"],"group":["Components"]}}},{"kind":"MethodSignature","id":0,"name":"state","parameters":[{"kind":"Parameter","id":0,"name":"initialState","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"stateList","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"transitions","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}]}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"StateComp"},"jsDoc":{"doc":"state() with pre-defined transitions.","tags":{"since":["v2000.2"],"example":["```js\nconst enemy = add([\n pos(80, 100),\n sprite(\"robot\"),\n state(\"idle\", [\"idle\", \"attack\", \"move\"], {\n \"idle\": \"attack\",\n \"attack\": \"move\",\n \"move\": [ \"idle\", \"attack\" ],\n }),\n])\n\n// this callback will only run once when enter \"attack\" state from \"idle\"\nenemy.onStateTransition(\"idle\", \"attack\", () => {\n checkHit(enemy, player)\n})\n```"],"group":["Components"]}}}],"fadeIn":[{"kind":"MethodSignature","id":0,"name":"fadeIn","parameters":[{"kind":"Parameter","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Comp"},"jsDoc":{"doc":"Fade object in.\n\nUses opacity for finding what to fade into and to set opacity during fade animation.","tags":{"since":["v3000.0"],"group":["Components"],"deprecated":["since v3001.0"]}}}],"mask":[{"kind":"MethodSignature","id":0,"name":"mask","parameters":[{"kind":"Parameter","id":0,"name":"maskType","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Mask"}}],"type":{"kind":"TypeReference","id":0,"typeName":"MaskComp"},"jsDoc":{"doc":"Mask all children object render.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"drawon":[{"kind":"MethodSignature","id":0,"name":"drawon","parameters":[{"kind":"Parameter","id":0,"name":"canvas","type":{"kind":"TypeReference","id":0,"typeName":"FrameBuffer"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Comp"}}],"tile":[{"kind":"MethodSignature","id":0,"name":"tile","parameters":[{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"TypeReference","id":0,"typeName":"TileCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"TileComp"},"jsDoc":{"doc":"A tile on a tile map.","tags":{"since":["v3000.0"],"group":["Components"]}}}],"agent":[{"kind":"MethodSignature","id":0,"name":"agent","parameters":[{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"AgentCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"AgentComp"},"jsDoc":{"doc":"An agent which can finds it way on a tilemap.","tags":{"since":["v3000.0"],"group":["Components"]}}}],"animate":[{"kind":"MethodSignature","id":0,"name":"animate","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"AnimateComp"},"jsDoc":{"doc":"A component to animate properties.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"serializeAnimation":[{"kind":"MethodSignature","id":0,"name":"serializeAnimation","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Animation"},"jsDoc":{"doc":"Serializes the animation to plain objects","tags":{}}}],"sentry":[{"kind":"MethodSignature","id":0,"name":"sentry","parameters":[{"kind":"Parameter","id":0,"name":"candidates","type":{"kind":"TypeReference","id":0,"typeName":"SentryCandidates"}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"SentryCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"SentryComp"},"jsDoc":{"doc":"A sentry which reacts to objects coming into view.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"patrol":[{"kind":"MethodSignature","id":0,"name":"patrol","parameters":[{"kind":"Parameter","id":0,"name":"opts","type":{"kind":"TypeReference","id":0,"typeName":"PatrolCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"PatrolComp"},"jsDoc":{"doc":"A patrol which can follow waypoints to a goal.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"navigation":[{"kind":"MethodSignature","id":0,"name":"navigation","parameters":[{"kind":"Parameter","id":0,"name":"opts","type":{"kind":"TypeReference","id":0,"typeName":"NavigationCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"NavigationComp"},"jsDoc":{"doc":"A navigator which can calculate waypoints to a goal.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"raycast":[{"kind":"MethodSignature","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"exclude","questionToken":true,"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"},"jsDoc":{"tags":{"group":["Math"]}}}],"on":[{"kind":"MethodSignature","id":0,"name":"on","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Ev","constraint":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObjEventNames"},{"kind":"IntersectionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{}}]}]}}],"parameters":[{"kind":"Parameter","id":0,"name":"event","type":{"kind":"TypeReference","id":0,"typeName":"Ev"}},{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"TupleWithoutFirst","typeArguments":[{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"GameObjEventMap"},"indexType":{"kind":"TypeReference","id":0,"typeName":"Ev"}}]}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event on all game objs with certain tag.","tags":{"example":["```js\n// a custom event defined by body() comp\n// every time an obj with tag \"bomb\" hits the floor, destroy it and addKaboom()\non(\"ground\", \"bomb\", (bomb) => {\n destroy(bomb)\n addKaboom(bomb.pos)\n})\n\n// a custom event can be defined manually\n// by passing a name and a callback function\non(\"talk\", (message, posX, posY) => {\n add([\n text(message),\n pos(posX, posY - 100)\n ])\n})\nonKeyPress(\"space\", () => {\n // the trigger method on game objs can be used to trigger a custom event\n npc.trigger(\"talk\", \"Hello World!\", npc.pos.x, npc.pos.y)\n})\n\n```"],"group":["Events"]}}}],"onFixedUpdate":[{"kind":"MethodSignature","id":0,"name":"onFixedUpdate","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs at a fixed framerate.","tags":{"since":["v3000.1"]}}},{"kind":"MethodSignature","id":0,"name":"onFixedUpdate","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onUpdate":[{"kind":"MethodSignature","id":0,"name":"onUpdate","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame (~60 times per second) for all game objs with certain tag.","tags":{"since":["v2000.1"],"example":["```js\n// move every \"tree\" 120 pixels per second to the left, destroy it when it leaves screen\n// there'll be nothing to run if there's no \"tree\" obj in the scene\nonUpdate(\"tree\", (tree) => {\n tree.move(-120, 0)\n if (tree.pos.x < 0) {\n destroy(tree)\n }\n})\n```"],"group":["Events"]}}},{"kind":"MethodSignature","id":0,"name":"onUpdate","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame (~60 times per second).","tags":{"since":["v2000.1"],"example":["```js\n// This will run every frame\nonUpdate(() => {\n debug.log(\"ohhi\")\n})\n```"],"group":["Events"]}}}],"onDraw":[{"kind":"MethodSignature","id":0,"name":"onDraw","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame (~60 times per second) for all game objs with certain tag (this is the same as onUpdate but all draw events are run after update events, drawXXX() functions only work in this phase).","tags":{"since":["v2000.1"],"group":["Events"]}}},{"kind":"MethodSignature","id":0,"name":"onDraw","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame (~60 times per second) (this is the same as onUpdate but all draw events are run after update events, drawXXX() functions only work in this phase).","tags":{"since":["v2000.1"],"example":["```js\nonDraw(() => {\n drawLine({\n p1: vec2(0),\n p2: mousePos(),\n color: rgb(0, 0, 255),\n })\n})\n```"],"group":["Events"]}}}],"onAdd":[{"kind":"MethodSignature","id":0,"name":"onAdd","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"tags":{"group":["Events"]}}},{"kind":"MethodSignature","id":0,"name":"onAdd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"tags":{"group":["Events"]}}}],"onDestroy":[{"kind":"MethodSignature","id":0,"name":"onDestroy","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"tags":{"group":["Events"]}}},{"kind":"MethodSignature","id":0,"name":"onDestroy","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"tags":{"group":["Events"]}}}],"onLoad":[{"kind":"MethodSignature","id":0,"name":"onLoad","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event that runs when all assets finished loading.","tags":{"since":["v2000.1"],"example":["```js\nconst bean = add([\n sprite(\"bean\"),\n])\n\n// certain assets related data are only available when the game finishes loading\nonLoad(() => {\n debug.log(bean.width)\n})\n```"],"group":["Events"]}}}],"onLoading":[{"kind":"MethodSignature","id":0,"name":"onLoading","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"progress","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event that runs every frame when assets are initially loading. Can be used to draw a custom loading screen.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onError":[{"kind":"MethodSignature","id":0,"name":"onError","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"err","type":{"kind":"TypeReference","id":0,"typeName":"Error"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register a custom error handler. Can be used to draw a custom error screen.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onResize":[{"kind":"MethodSignature","id":0,"name":"onResize","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event that runs when the canvas resizes.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onCleanup":[{"kind":"MethodSignature","id":0,"name":"onCleanup","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Cleanup function to run when quit() is called.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onGamepadConnect":[{"kind":"MethodSignature","id":0,"name":"onGamepadConnect","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"gamepad","type":{"kind":"TypeReference","id":0,"typeName":"KGamePad"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event that runs when a gamepad is connected.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"onGamepadDisconnect":[{"kind":"MethodSignature","id":0,"name":"onGamepadDisconnect","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"gamepad","type":{"kind":"TypeReference","id":0,"typeName":"KGamePad"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event that runs when a gamepad is disconnected.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"onCollide":[{"kind":"MethodSignature","id":0,"name":"onCollide","parameters":[{"kind":"Parameter","id":0,"name":"t1","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"t2","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs once when 2 game objs with certain tags collides (required to have area() component).","tags":{"since":["v2000.1"],"example":["```js\nonCollide(\"sun\", \"earth\", () => {\n addExplosion()\n})\n```"],"group":["Events"]}}}],"onCollideUpdate":[{"kind":"MethodSignature","id":0,"name":"onCollideUpdate","parameters":[{"kind":"Parameter","id":0,"name":"t1","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"t2","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when 2 game objs with certain tags collides (required to have area() component).","tags":{"since":["v3000.0"],"example":["```js\nonCollideUpdate(\"sun\", \"earth\", () => {\n runWorldEndTimer()\n})\n```"],"group":["Events"]}}}],"onCollideEnd":[{"kind":"MethodSignature","id":0,"name":"onCollideEnd","parameters":[{"kind":"Parameter","id":0,"name":"t1","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"t2","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs once frame when 2 game objs with certain tags stops colliding (required to have area() component).","tags":{"since":["v3000.0"],"example":["```js\nonCollideEnd(\"bean\", \"earth\", () => {\n worldEnd()\n})\n```"],"group":["Events"]}}}],"onClick":[{"kind":"MethodSignature","id":0,"name":"onClick","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when game objs with certain tags are clicked (required to have the area() component).","tags":{"since":["v2000.1"],"example":["```js\n// click on any \"chest\" to open\nonClick(\"chest\", (chest) => chest.open())\n```"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onClick","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when users clicks.","tags":{"example":["```js\n// click on anywhere to go to \"game\" scene\nonClick(() => go(\"game\"))\n```"],"since":["v2000.1"]}}}],"onHover":[{"kind":"MethodSignature","id":0,"name":"onHover","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs once when game objs with certain tags are hovered (required to have area() component).","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onHoverUpdate":[{"kind":"MethodSignature","id":0,"name":"onHoverUpdate","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"onHover","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when game objs with certain tags are hovered (required to have area() component).","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onHoverEnd":[{"kind":"MethodSignature","id":0,"name":"onHoverEnd","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs once when game objs with certain tags are unhovered (required to have area() component).","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onKeyDown":[{"kind":"MethodSignature","id":0,"name":"onKeyDown","parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when a key is held down.","tags":{"example":["```js\n// move left by SPEED pixels per frame every frame when left arrow key is being held down\nonKeyDown(\"left\", () => {\n bean.move(-SPEED, 0)\n})\n```"],"since":["v2000.1"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onKeyDown","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when any key is held down.","tags":{"since":["v2000.1"],"group":["Input"]}}}],"onKeyPress":[{"kind":"MethodSignature","id":0,"name":"onKeyPress","parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user presses certain keys.","tags":{"example":["```js\n// .jump() once when \"space\" is just being pressed\nonKeyPress(\"space\", () => {\n bean.jump()\n});\n\nonKeyPress([\"up\", \"space\"], () => {\n bean.jump()\n});\n```"],"since":["v2000.1"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onKeyPress","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user presses any key.","tags":{"example":["```js\n// Call restart() when player presses any key\nonKeyPress((key) => {\n debug.log(`key pressed ${key}`)\n restart()\n})\n```"],"since":["v3001.0"],"group":["Input"]}}}],"onKeyPressRepeat":[{"kind":"MethodSignature","id":0,"name":"onKeyPressRepeat","parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user presses certain kesy (also fires repeatedly when the keys are being held down).","tags":{"example":["```js\n// delete last character when \"backspace\" is being pressed and held\nonKeyPressRepeat(\"backspace\", () => {\n input.text = input.text.substring(0, input.text.length - 1)\n})\n```"],"since":["v3000.1"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onKeyPressRepeat","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onKeyRelease":[{"kind":"MethodSignature","id":0,"name":"onKeyRelease","parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user release certain keys.","tags":{"since":["v2000.1"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onKeyRelease","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onCharInput":[{"kind":"MethodSignature","id":0,"name":"onCharInput","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"ch","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user inputs text.","tags":{"since":["v2000.1"],"example":["```js\n// type into input\nonCharInput((ch) => {\n input.text += ch\n})\n```"],"group":["Input"]}}}],"onMouseDown":[{"kind":"MethodSignature","id":0,"name":"onMouseDown","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when certain mouse buttons are being held down.","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onMouseDown","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onMousePress":[{"kind":"MethodSignature","id":0,"name":"onMousePress","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user clicks mouse.","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onMousePress","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onMouseRelease":[{"kind":"MethodSignature","id":0,"name":"onMouseRelease","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user releases mouse.","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onMouseRelease","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onMouseMove":[{"kind":"MethodSignature","id":0,"name":"onMouseMove","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"delta","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs whenever user move the mouse.","tags":{"since":["v2000.1"],"group":["Input"]}}}],"onTouchStart":[{"kind":"MethodSignature","id":0,"name":"onTouchStart","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"TypeReference","id":0,"typeName":"Touch"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when a touch starts.","tags":{"since":["v2000.1"],"group":["Input"]}}}],"onTouchMove":[{"kind":"MethodSignature","id":0,"name":"onTouchMove","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"TypeReference","id":0,"typeName":"Touch"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs whenever touch moves.","tags":{"since":["v2000.1"],"group":["Input"]}}}],"onTouchEnd":[{"kind":"MethodSignature","id":0,"name":"onTouchEnd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"TypeReference","id":0,"typeName":"Touch"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when a touch ends.","tags":{"since":["v2000.1"],"group":["Input"]}}}],"onScroll":[{"kind":"MethodSignature","id":0,"name":"onScroll","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"delta","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when mouse wheel scrolled.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"onHide":[{"kind":"MethodSignature","id":0,"name":"onHide","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when tab is hidden.","tags":{"since":["v3001.0"],"group":["Events"]}}}],"onShow":[{"kind":"MethodSignature","id":0,"name":"onShow","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when tab is shown.","tags":{"since":["v3001.0"],"group":["Events"]}}}],"onGamepadButtonDown":[{"kind":"MethodSignature","id":0,"name":"onGamepadButtonDown","parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when certain gamepad buttons are held down.","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onGamepadButtonDown","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when any gamepad buttons are held down.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"onGamepadButtonPress":[{"kind":"MethodSignature","id":0,"name":"onGamepadButtonPress","parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user presses certain gamepad button.","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onGamepadButtonPress","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user presses any gamepad button.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"onGamepadButtonRelease":[{"kind":"MethodSignature","id":0,"name":"onGamepadButtonRelease","parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user releases certain gamepad button","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onGamepadButtonRelease","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user releases any gamepad button.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"onGamepadStick":[{"kind":"MethodSignature","id":0,"name":"onGamepadStick","parameters":[{"kind":"Parameter","id":0,"name":"stick","type":{"kind":"TypeReference","id":0,"typeName":"GamepadStick"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"value","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the gamepad axis exists.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"onButtonPress":[{"kind":"MethodSignature","id":0,"name":"onButtonPress","parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"TButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"TButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user press a defined button\n(like \"jump\") on any input (keyboard, gamepad).","tags":{"since":["v3001.0"],"group":["Input"]}}}],"onButtonRelease":[{"kind":"MethodSignature","id":0,"name":"onButtonRelease","parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"TButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"TButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user release a defined button\n(like \"jump\") on any input (keyboard, gamepad).","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onButtonRelease","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"TButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onButtonDown":[{"kind":"MethodSignature","id":0,"name":"onButtonDown","parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"TButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"TButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user press a defined button\n(like \"jump\") on any input (keyboard, gamepad).","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onButtonDown","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"TButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onSceneLeave":[{"kind":"MethodSignature","id":0,"name":"onSceneLeave","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"newScene","questionToken":true,"type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when current scene ends.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"getSceneName":[{"kind":"MethodSignature","id":0,"name":"getSceneName","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Gets the name of the current scene. Returns null if no scene is active.","tags":{"since":["v3001.0"],"group":["Scene"]}}}],"loadRoot":[{"kind":"MethodSignature","id":0,"name":"loadRoot","parameters":[{"kind":"Parameter","id":0,"name":"path","questionToken":true,"type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"Sets the root for all subsequent resource urls.","tags":{"example":["```js\nloadRoot(\"https://myassets.com/\")\nloadSprite(\"bean\", \"sprites/bean.png\") // will resolve to \"https://myassets.com/sprites/bean.png\"\n```"],"group":["Assets"]}}}],"loadSprite":[{"kind":"MethodSignature","id":0,"name":"loadSprite","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"src","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"LoadSpriteSrc"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteSrc"}}]}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]},"jsDoc":{"doc":"Load a sprite into asset manager, with name and resource url and optional config.","tags":{"example":["```js\n// due to browser policies you'll need a static file server to load local files\nloadSprite(\"bean\", \"bean.png\")\nloadSprite(\"apple\", \"https://kaboomjs.com/sprites/apple.png\")\n\n// slice a spritesheet and add anims manually\nloadSprite(\"bean\", \"bean.png\", {\n sliceX: 4,\n sliceY: 1,\n anims: {\n run: {\n from: 0,\n to: 3,\n },\n jump: {\n from: 3,\n to: 3,\n },\n },\n})\n```"],"group":["Assets"]}}}],"loadSpriteAtlas":[{"kind":"MethodSignature","id":0,"name":"loadSpriteAtlas","parameters":[{"kind":"Parameter","id":0,"name":"src","type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteSrc"}},{"kind":"Parameter","id":0,"name":"data","type":{"kind":"TypeReference","id":0,"typeName":"SpriteAtlasData"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}]},"jsDoc":{"doc":"Load sprites from a sprite atlas.","tags":{"example":["```js\n// See #SpriteAtlasData type for format spec\nloadSpriteAtlas(\"sprites/dungeon.png\", {\n \"hero\": {\n x: 128,\n y: 68,\n width: 144,\n height: 28,\n sliceX: 9,\n anims: {\n idle: { from: 0, to: 3 },\n run: { from: 4, to: 7 },\n hit: 8,\n },\n },\n})\n\nconst player = add([\n sprite(\"hero\"),\n])\n\nplayer.play(\"run\")\n```"],"group":["Assets"]}}},{"kind":"MethodSignature","id":0,"name":"loadSpriteAtlas","parameters":[{"kind":"Parameter","id":0,"name":"src","type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteSrc"}},{"kind":"Parameter","id":0,"name":"url","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}]},"jsDoc":{"doc":"Load sprites from a sprite atlas with URL.","tags":{"example":["```js\n// Load from json file, see #SpriteAtlasData type for format spec\nloadSpriteAtlas(\"sprites/dungeon.png\", \"sprites/dungeon.json\")\n\nconst player = add([\n sprite(\"hero\"),\n])\n\nplayer.play(\"run\")\n```"],"group":["Assets"]}}}],"loadAseprite":[{"kind":"MethodSignature","id":0,"name":"loadAseprite","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"imgSrc","type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteSrc"}},{"kind":"Parameter","id":0,"name":"jsonSrc","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"AsepriteData"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]},"jsDoc":{"doc":"Load a sprite with aseprite spritesheet json (should use \"array\" in the export options).","tags":{"example":["```js\nloadAseprite(\"car\", \"sprites/car.png\", \"sprites/car.json\")\n```"],"group":["Assets"]}}}],"loadPedit":[{"kind":"MethodSignature","id":0,"name":"loadPedit","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"src","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]},"jsDoc":{"tags":{"group":["Assets"]}}}],"loadBean":[{"kind":"MethodSignature","id":0,"name":"loadBean","parameters":[{"kind":"Parameter","id":0,"name":"name","questionToken":true,"type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]},"jsDoc":{"doc":"Load default sprite \"bean\".","tags":{"example":["```js\nloadBean()\n\n// use it right away\nadd([\n sprite(\"bean\"),\n])\n```"],"group":["Assets"]}}}],"loadJSON":[{"kind":"MethodSignature","id":0,"name":"loadJSON","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"url","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"AnyKeyword","id":0}]},"jsDoc":{"doc":"Load custom JSON data from url.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"loadSound":[{"kind":"MethodSignature","id":0,"name":"loadSound","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"src","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"ArrayBuffer"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]},"jsDoc":{"doc":"Load a sound into asset manager, with name and resource url.","tags":{"example":["```js\nloadSound(\"shoot\", \"/sounds/horse.ogg\")\nloadSound(\"shoot\", \"/sounds/squeeze.mp3\")\nloadSound(\"shoot\", \"/sounds/shoot.wav\")\n```"],"group":["Assets"]}}}],"loadMusic":[{"kind":"MethodSignature","id":0,"name":"loadMusic","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"url","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Like loadSound(), but the audio is streamed and won't block loading. Use this for big audio files like background music.","tags":{"example":["```js\nloadMusic(\"shoot\", \"/music/bossfight.mp3\")\n```"],"group":["Assets"]}}}],"loadFont":[{"kind":"MethodSignature","id":0,"name":"loadFont","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"src","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"BinaryData"}]}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LoadFontOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"FontData"}]},"jsDoc":{"doc":"Load a font (any format supported by the browser, e.g. ttf, otf, woff).","tags":{"since":["v3000.0"],"example":["```js\n// load a font from a .ttf file\nloadFont(\"frogblock\", \"fonts/frogblock.ttf\")\n```"],"group":["Assets"]}}}],"loadBitmapFont":[{"kind":"MethodSignature","id":0,"name":"loadBitmapFont","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"src","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"gridWidth","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"gridHeight","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LoadBitmapFontOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"BitmapFontData"}]},"jsDoc":{"doc":"Load a bitmap font into asset manager, with name and resource url and infomation on the layout of the bitmap.","tags":{"since":["v3000.0"],"example":["```js\n// load a bitmap font called \"04b03\", with bitmap \"fonts/04b03.png\"\n// each character on bitmap has a size of (6, 8), and contains default ASCII_CHARS\nloadBitmapFont(\"04b03\", \"fonts/04b03.png\", 6, 8)\n\n// load a font with custom characters\nloadBitmapFont(\"myfont\", \"myfont.png\", 6, 8, { chars: \"☺☻♥♦♣♠\" })\n```"],"group":["Assets"]}}}],"loadShader":[{"kind":"MethodSignature","id":0,"name":"loadShader","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"vert","questionToken":true,"type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"frag","questionToken":true,"type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"ShaderData"}]},"jsDoc":{"doc":"Load a shader with vertex and fragment code.","tags":{"example":["```js\n// default shaders and custom shader format\nloadShader(\"outline\",\n`vec4 vert(vec2 pos, vec2 uv, vec4 color) {\n // predefined functions to get the default value by KAPLAY\n return def_vert();\n}`,\n`vec4 frag(vec2 pos, vec2 uv, vec4 color, sampler2D tex) {\n // turn everything blue-ish\n return def_frag() * vec4(0, 0, 1, 1);\n}`, false)\n```"],"group":["Assets"]}}}],"loadShaderURL":[{"kind":"MethodSignature","id":0,"name":"loadShaderURL","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"vert","questionToken":true,"type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"frag","questionToken":true,"type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"ShaderData"}]},"jsDoc":{"doc":"Load a shader with vertex and fragment code file url.","tags":{"since":["v3000.0"],"example":["```js\n// load only a fragment shader from URL\nloadShader(\"outline\", null, \"/shaders/outline.glsl\", true)\n```"],"group":["Assets"]}}}],"load":[{"kind":"MethodSignature","id":0,"name":"load","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"l","type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},"jsDoc":{"doc":"Add a new loader to wait for before starting the game.","tags":{"example":["```js\nload(new Promise((resolve, reject) => {\n // anything you want to do that stalls the game in loading state\n resolve(\"ok\")\n}))\n```"],"group":["Assets"]}}}],"loadProgress":[{"kind":"MethodSignature","id":0,"name":"loadProgress","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the global asset loading progress (0.0 - 1.0).","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"getSprite":[{"kind":"MethodSignature","id":0,"name":"getSprite","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get SpriteData from name.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"getSound":[{"kind":"MethodSignature","id":0,"name":"getSound","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get SoundData from name.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"getFont":[{"kind":"MethodSignature","id":0,"name":"getFont","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"FontData"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get FontData from name.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"getBitmapFont":[{"kind":"MethodSignature","id":0,"name":"getBitmapFont","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"BitmapFontData"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get BitmapFontData from name.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"getShader":[{"kind":"MethodSignature","id":0,"name":"getShader","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"ShaderData"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get ShaderData from name.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"getAsset":[{"kind":"MethodSignature","id":0,"name":"getAsset","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"AnyKeyword","id":0}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get custom data from name.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"Asset":[{"kind":"PropertySignature","id":0,"name":"Asset","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Asset"}},"jsDoc":{"doc":"The asset data.","tags":{"group":["Assets"]}}}],"SpriteData":[{"kind":"PropertySignature","id":0,"name":"SpriteData","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"SpriteData"}},"jsDoc":{"doc":"The sprite data.","tags":{"group":["Assets"]}}}],"SoundData":[{"kind":"PropertySignature","id":0,"name":"SoundData","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"SoundData"}},"jsDoc":{"tags":{"group":["Assets"]}}}],"width":[{"kind":"MethodSignature","id":0,"name":"width","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the width of game.","tags":{"group":["Info"]}}}],"getTreeRoot":[{"kind":"MethodSignature","id":0,"name":"getTreeRoot","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj"},"jsDoc":{"doc":"Get the root of all objects.","tags":{"group":["Info"]}}}],"height":[{"kind":"MethodSignature","id":0,"name":"height","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the height of game.","tags":{"group":["Info"]}}}],"center":[{"kind":"MethodSignature","id":0,"name":"center","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the center point of view.","tags":{"example":["```js\n// add bean to the center of the screen\nadd([\n sprite(\"bean\"),\n pos(center()),\n // ...\n])\n```"],"group":["Info"]}}}],"dt":[{"kind":"MethodSignature","id":0,"name":"dt","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the delta time since last frame.","tags":{"example":["```js\n// rotate bean 100 deg per second\nbean.onUpdate(() => {\n bean.angle += 100 * dt()\n})\n```"],"group":["Info"]}}}],"fixedDt":[{"kind":"MethodSignature","id":0,"name":"fixedDt","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the fixed delta time since last frame.","tags":{"group":["Info"]}}}],"restDt":[{"kind":"MethodSignature","id":0,"name":"restDt","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the rest delta time since last frame.","tags":{"group":["Info"]}}}],"time":[{"kind":"MethodSignature","id":0,"name":"time","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the total time since beginning.","tags":{"since":["v3001"],"group":["Info"]}}}],"isFocused":[{"kind":"MethodSignature","id":0,"name":"isFocused","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the game canvas is currently focused.","tags":{"since":["v2000.1"],"group":["Info"]}}}],"isTouchscreen":[{"kind":"MethodSignature","id":0,"name":"isTouchscreen","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Is currently on a touch screen device.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"mousePos":[{"kind":"MethodSignature","id":0,"name":"mousePos","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get current mouse position (without camera transform).","tags":{"group":["Input"]}}}],"mouseDeltaPos":[{"kind":"MethodSignature","id":0,"name":"mouseDeltaPos","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"How much mouse moved last frame.","tags":{"group":["Input"]}}}],"isKeyDown":[{"kind":"MethodSignature","id":0,"name":"isKeyDown","parameters":[{"kind":"Parameter","id":0,"name":"k","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain keys are currently down.","tags":{"example":["```js\n// equivalent to the calling bean.move() in an onKeyDown(\"left\")\nonUpdate(() => {\n if (isKeyDown(\"left\")) {\n bean.move(-SPEED, 0)\n }\n})\n```"],"since":["v3001.0"],"group":["Input"]}}}],"isKeyPressed":[{"kind":"MethodSignature","id":0,"name":"isKeyPressed","parameters":[{"kind":"Parameter","id":0,"name":"k","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain keys are just pressed last frame.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isKeyPressedRepeat":[{"kind":"MethodSignature","id":0,"name":"isKeyPressedRepeat","parameters":[{"kind":"Parameter","id":0,"name":"k","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain keys are just pressed last frame (also fires repeatedly when the keys are being held down).","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isKeyReleased":[{"kind":"MethodSignature","id":0,"name":"isKeyReleased","parameters":[{"kind":"Parameter","id":0,"name":"k","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain keys are just released last frame.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isMouseDown":[{"kind":"MethodSignature","id":0,"name":"isMouseDown","parameters":[{"kind":"Parameter","id":0,"name":"button","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If mouse buttons are currently down.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isMousePressed":[{"kind":"MethodSignature","id":0,"name":"isMousePressed","parameters":[{"kind":"Parameter","id":0,"name":"button","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If mouse buttons are just clicked last frame.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isMouseReleased":[{"kind":"MethodSignature","id":0,"name":"isMouseReleased","parameters":[{"kind":"Parameter","id":0,"name":"button","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If mouse buttons are just released last frame.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isMouseMoved":[{"kind":"MethodSignature","id":0,"name":"isMouseMoved","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If mouse moved last frame.","tags":{"since":["v2000.1"],"group":["Input"]}}}],"isGamepadButtonPressed":[{"kind":"MethodSignature","id":0,"name":"isGamepadButtonPressed","parameters":[{"kind":"Parameter","id":0,"name":"btn","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain gamepad buttons are just pressed last frame","tags":{"since":["v3000.0"],"group":["Input"]}}}],"isGamepadButtonDown":[{"kind":"MethodSignature","id":0,"name":"isGamepadButtonDown","parameters":[{"kind":"Parameter","id":0,"name":"btn","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain gamepad buttons are currently held down.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"isGamepadButtonReleased":[{"kind":"MethodSignature","id":0,"name":"isGamepadButtonReleased","parameters":[{"kind":"Parameter","id":0,"name":"btn","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain gamepad buttons are just released last frame.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"isButtonPressed":[{"kind":"MethodSignature","id":0,"name":"isButtonPressed","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"TButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain binded buttons are just pressed last frame on any input (keyboard, gamepad).","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isButtonDown":[{"kind":"MethodSignature","id":0,"name":"isButtonDown","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"TButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain binded buttons are currently held down on any input (keyboard, gamepad).","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isButtonReleased":[{"kind":"MethodSignature","id":0,"name":"isButtonReleased","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"TButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain binded buttons are just released last frame on any input (keyboard, gamepad).","tags":{"since":["v3001.0"],"group":["Input"]}}}],"getButton":[{"kind":"MethodSignature","id":0,"name":"getButton","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"TButtonDef"}}}],"type":{"kind":"TypeReference","id":0,"typeName":"ButtonBinding"},"jsDoc":{"doc":"Get a input binding from a button name.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"setButton":[{"kind":"MethodSignature","id":0,"name":"setButton","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"def","type":{"kind":"TypeReference","id":0,"typeName":"ButtonBinding"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set a input binding for a button name.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"getGamepadStick":[{"kind":"MethodSignature","id":0,"name":"getGamepadStick","parameters":[{"kind":"Parameter","id":0,"name":"stick","type":{"kind":"TypeReference","id":0,"typeName":"GamepadStick"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get stick axis values from a gamepad.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"getLastInputDeviceType":[{"kind":"MethodSignature","id":0,"name":"getLastInputDeviceType","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"ButtonBindingDevice"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get the latest input device type that triggered the input event.","tags":{"returns":["The last input device type, or null if no input event has been triggered."],"since":["v3001.0"]}}}],"charInputted":[{"kind":"MethodSignature","id":0,"name":"charInputted","parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},"jsDoc":{"doc":"List of characters inputted since last frame.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"shake":[{"kind":"MethodSignature","id":0,"name":"shake","parameters":[{"kind":"Parameter","id":0,"name":"intensity","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Camera shake.","tags":{"example":["```js\n// shake intensively when bean collides with a \"bomb\"\nbean.onCollide(\"bomb\", () => {\n shake(120)\n})\n```"],"group":["Info"]}}}],"camPos":[{"kind":"MethodSignature","id":0,"name":"camPos","parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get / set camera position.","tags":{"example":["```js\n// camera follows player\nplayer.onUpdate(() => {\n camPos(player.pos)\n})\n```"],"group":["Info"]}}},{"kind":"MethodSignature","id":0,"name":"camPos","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"MethodSignature","id":0,"name":"camPos","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"camScale":[{"kind":"MethodSignature","id":0,"name":"camScale","parameters":[{"kind":"Parameter","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get / set camera scale.","tags":{"group":["Info"]}}},{"kind":"MethodSignature","id":0,"name":"camScale","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"MethodSignature","id":0,"name":"camScale","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"camRot":[{"kind":"MethodSignature","id":0,"name":"camRot","parameters":[{"kind":"Parameter","id":0,"name":"angle","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get / set camera rotation.","tags":{"group":["Info"]}}}],"camFlash":[{"kind":"MethodSignature","id":0,"name":"camFlash","parameters":[{"kind":"Parameter","id":0,"name":"flashColor","type":{"kind":"TypeReference","id":0,"typeName":"Color"}},{"kind":"Parameter","id":0,"name":"fadeOutTime","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"TimerController"},"jsDoc":{"doc":"Flash the camera.","tags":{"group":["Info"]}}}],"camTransform":[{"kind":"MethodSignature","id":0,"name":"camTransform","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"},"jsDoc":{"doc":"Get camera transform.","tags":{"group":["Info"]}}}],"toScreen":[{"kind":"MethodSignature","id":0,"name":"toScreen","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a point from world position (relative to the root) to screen position (relative to the screen).","tags":{"since":["v3001.0"],"group":["Info"]}}}],"toWorld":[{"kind":"MethodSignature","id":0,"name":"toWorld","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a point from screen position (relative to the screen) to world position (relative to the root).","tags":{"group":["Info"]}}}],"setGravity":[{"kind":"MethodSignature","id":0,"name":"setGravity","parameters":[{"kind":"Parameter","id":0,"name":"g","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set gravity.","tags":{"group":["Info"]}}}],"getGravity":[{"kind":"MethodSignature","id":0,"name":"getGravity","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get gravity.","tags":{"group":["Info"]}}}],"setGravityDirection":[{"kind":"MethodSignature","id":0,"name":"setGravityDirection","parameters":[{"kind":"Parameter","id":0,"name":"d","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set gravity direction.","tags":{}}}],"getGravityDirection":[{"kind":"MethodSignature","id":0,"name":"getGravityDirection","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get gravity direction.","tags":{}}}],"setBackground":[{"kind":"MethodSignature","id":0,"name":"setBackground","parameters":[{"kind":"Parameter","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set background color.","tags":{"group":["Info"]}}},{"kind":"MethodSignature","id":0,"name":"setBackground","parameters":[{"kind":"Parameter","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"}},{"kind":"Parameter","id":0,"name":"alpha","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}},{"kind":"MethodSignature","id":0,"name":"setBackground","parameters":[{"kind":"Parameter","id":0,"name":"r","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"g","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}},{"kind":"MethodSignature","id":0,"name":"setBackground","parameters":[{"kind":"Parameter","id":0,"name":"r","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"g","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"alpha","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"getBackground":[{"kind":"MethodSignature","id":0,"name":"getBackground","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get background color.","tags":{"group":["Info"]}}}],"getGamepads":[{"kind":"MethodSignature","id":0,"name":"getGamepads","parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamePad"}},"jsDoc":{"doc":"Get connected gamepads.","tags":{"since":["v3000.0"],"group":["Info"]}}}],"setCursor":[{"kind":"MethodSignature","id":0,"name":"setCursor","parameters":[{"kind":"Parameter","id":0,"name":"style","type":{"kind":"TypeReference","id":0,"typeName":"Cursor"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set cursor style (check Cursor type for possible values). Cursor will be reset to \"default\" every frame so use this in an per-frame action.","tags":{"since":["v3000.0"],"example":["```js\nbutton.onHover((c) => {\n setCursor(\"pointer\")\n})\n```"],"group":["Info"]}}}],"getCursor":[{"kind":"MethodSignature","id":0,"name":"getCursor","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Cursor"},"jsDoc":{"doc":"Get current cursor style.","tags":{"since":["v3000.0"],"group":["Info"]}}}],"setCursorLocked":[{"kind":"MethodSignature","id":0,"name":"setCursorLocked","parameters":[{"kind":"Parameter","id":0,"name":"locked","type":{"kind":"BooleanKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Lock / unlock cursor. Note that you cannot lock cursor within 1 second after user unlocking the cursor with the default unlock gesture (typically the esc key) due to browser policy.","tags":{"since":["v3000.0"],"group":["Info"]}}}],"isCursorLocked":[{"kind":"MethodSignature","id":0,"name":"isCursorLocked","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Get if cursor is currently locked.","tags":{"since":["v3000.0"],"group":["Info"]}}}],"setFullscreen":[{"kind":"MethodSignature","id":0,"name":"setFullscreen","parameters":[{"kind":"Parameter","id":0,"name":"f","questionToken":true,"type":{"kind":"BooleanKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Enter / exit fullscreen mode. (note: mouse position is not working in fullscreen mode at the moment)","tags":{"example":["```js\n// toggle fullscreen mode on \"f\"\nonKeyPress(\"f\", (c) => {\n setFullscreen(!isFullscreen())\n})\n```"],"group":["Info"]}}}],"isFullscreen":[{"kind":"MethodSignature","id":0,"name":"isFullscreen","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If currently in fullscreen mode.","tags":{"group":["Info"]}}}],"wait":[{"kind":"MethodSignature","id":0,"name":"wait","parameters":[{"kind":"Parameter","id":0,"name":"n","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","questionToken":true,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"TimerController"},"jsDoc":{"doc":"Run the callback after n seconds.","tags":{"example":["```js\n// 3 seconds until explosion! Runnn!\nwait(3, () => {\n explode()\n})\n\n// wait() returns a PromiseLike that can be used with await\nawait wait(1)\n```"],"group":["Timer"]}}}],"loop":[{"kind":"MethodSignature","id":0,"name":"loop","parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Run the callback every n seconds.","tags":{"example":["```js\n// spawn a butterfly at random position every 1 second\nloop(1, () => {\n add([\n sprite(\"butterfly\"),\n pos(rand(vec2(width(), height()))),\n area(),\n \"friend\",\n ])\n})\n```"],"group":["Timer"]}}}],"play":[{"kind":"MethodSignature","id":0,"name":"play","parameters":[{"kind":"Parameter","id":0,"name":"src","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SoundData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]},{"kind":"TypeReference","id":0,"typeName":"MusicData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"MusicData"}]}]}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"AudioPlayOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"AudioPlay"},"jsDoc":{"doc":"Play a piece of audio.","tags":{"returns":["A control handle."],"example":["```js\n// play a one off sound\nplay(\"wooosh\")\n\n// play a looping soundtrack (check out AudioPlayOpt for more options)\nconst music = play(\"OverworldlyFoe\", {\n volume: 0.8,\n loop: true\n})\n\n// using the handle to control (check out AudioPlay for more controls / info)\nmusic.paused = true\nmusic.speed = 1.2\n```"],"group":["Audio"]}}}],"burp":[{"kind":"MethodSignature","id":0,"name":"burp","parameters":[{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"AudioPlayOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"AudioPlay"},"jsDoc":{"doc":"Yep. Plays a burp sound.","tags":{"group":["Audio"]}}}],"volume":[{"kind":"MethodSignature","id":0,"name":"volume","parameters":[{"kind":"Parameter","id":0,"name":"v","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Sets global volume.","tags":{"example":["```js\n// makes everything quieter\nvolume(0.5)\n```"],"group":["Audio"]}}}],"audioCtx":[{"kind":"PropertySignature","id":0,"name":"audioCtx","type":{"kind":"TypeReference","id":0,"typeName":"AudioContext"},"jsDoc":{"doc":"Get the underlying browser AudioContext.","tags":{"group":["Audio"]}}}],"rand":[{"kind":"MethodSignature","id":0,"name":"rand","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get a random number between 0 - 1.","tags":{"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"rand","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","default":{"kind":"TypeReference","id":0,"typeName":"RNGValue"}}],"parameters":[{"kind":"Parameter","id":0,"name":"n","type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"TypeReference","id":0,"typeName":"T"},"jsDoc":{"doc":"Get a random value between 0 and the given value.","tags":{"example":["```js\n// a random number between 0 - 8\nrand(8)\n\n// a random point on screen\nrand(vec2(width(), height()))\n\n// a random color\nrand(rgb(255, 255, 255))\n```"],"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"rand","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","default":{"kind":"TypeReference","id":0,"typeName":"RNGValue"}}],"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"T"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"TypeReference","id":0,"typeName":"T"},"jsDoc":{"doc":"Get a random value between the given bound.","tags":{"example":["```js\nrand(50, 100)\nrand(vec2(20), vec2(100))\n\n// spawn something on the right side of the screen but with random y value within screen height\nadd([\n pos(width(), rand(0, height())),\n])\n```"],"group":["Math"]}}}],"randi":[{"kind":"MethodSignature","id":0,"name":"randi","parameters":[{"kind":"Parameter","id":0,"name":"n","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"rand() but floored to integer.","tags":{"example":["```js\nrandi(10) // returns 0 to 9\n```"],"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"randi","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"rand() but floored to integer.","tags":{"example":["```js\nrandi(0, 3) // returns 0, 1, or 2\n```"],"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"randi","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"rand() but floored to integer.","tags":{"example":["```js\nrandi() // returns either 0 or 1\n```"],"group":["Math"]}}}],"randSeed":[{"kind":"MethodSignature","id":0,"name":"randSeed","parameters":[{"kind":"Parameter","id":0,"name":"seed","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get / set the random number generator seed.","tags":{"example":["```js\nrandSeed(Date.now())\n```"],"group":["Math"]}}}],"vec2":[{"kind":"MethodSignature","id":0,"name":"vec2","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Create a 2d vector.","tags":{"example":["```js\n// { x: 0, y: 0 }\nvec2()\n\n// { x: 10, y: 10 }\nvec2(10)\n\n// { x: 100, y: 80 }\nvec2(100, 80)\n\n// move to 150 degrees direction with by length 10\nplayer.pos = pos.add(Vec2.fromAngle(150).scale(10))\n```"],"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"vec2","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"MethodSignature","id":0,"name":"vec2","parameters":[{"kind":"Parameter","id":0,"name":"xy","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"MethodSignature","id":0,"name":"vec2","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"rgb":[{"kind":"MethodSignature","id":0,"name":"rgb","parameters":[{"kind":"Parameter","id":0,"name":"r","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"g","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Create a color from RGB values (0 - 255).","tags":{"example":["```js\n// update the color of the sky to light blue\nsky.color = rgb(0, 128, 255)\n```"],"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"rgb","parameters":[{"kind":"Parameter","id":0,"name":"hex","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Create a color from hex string.","tags":{"since":["v3001.0"],"example":["```js\nsky.color = rgb(\"#ef6360\")"],"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"rgb","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Same as rgb(255, 255, 255).","tags":{"group":["Math"]}}}],"hsl2rgb":[{"kind":"MethodSignature","id":0,"name":"hsl2rgb","parameters":[{"kind":"Parameter","id":0,"name":"hue","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"saturation","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"lightness","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Convert HSL color (all values in 0.0 - 1.0 range) to RGB color.","tags":{"since":["v2000.1"],"example":["```js\n// animate rainbow color\nonUpdate(\"rainbow\", (obj) => {\n obj.color = hsl2rgb(wave(0, 1, time()), 0.6, 0.6)\n})\n```"],"group":["Math"]}}}],"quad":[{"kind":"MethodSignature","id":0,"name":"quad","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Quad"},"jsDoc":{"doc":"Rectangle area (0.0 - 1.0).","tags":{"group":["Math"]}}}],"choose":[{"kind":"MethodSignature","id":0,"name":"choose","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"lst","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}}}],"type":{"kind":"TypeReference","id":0,"typeName":"T"},"jsDoc":{"doc":"Choose a random item from a list.","tags":{"example":["```js\n// decide the best fruit randomly\nconst bestFruit = choose([\"apple\", \"banana\", \"pear\", \"watermelon\"])\n```"],"group":["Math"]}}}],"chooseMultiple":[{"kind":"MethodSignature","id":0,"name":"chooseMultiple","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"lst","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}}},{"kind":"Parameter","id":0,"name":"count","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}},"jsDoc":{"doc":"Choose multiple random items from a list.","tags":{"since":["v3001.0"],"group":["Math"]}}}],"shuffle":[{"kind":"MethodSignature","id":0,"name":"shuffle","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"lst","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}},"jsDoc":{"doc":"Shuffle an array.","tags":{"since":["v3001.0"],"group":["Math"]}}}],"chance":[{"kind":"MethodSignature","id":0,"name":"chance","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"rand(1) <= p","tags":{"example":["```js\n// every frame all objs with tag \"unlucky\" have 50% chance die\nonUpdate(\"unlucky\", (o) => {\n if (chance(0.5)) {\n destroy(o)\n }\n})\n```"],"group":["Math"]}}}],"lerp":[{"kind":"MethodSignature","id":0,"name":"lerp","typeParameters":[{"kind":"TypeParameter","id":0,"name":"V","constraint":{"kind":"TypeReference","id":0,"typeName":"LerpValue"}}],"parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"TypeReference","id":0,"typeName":"V"}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"TypeReference","id":0,"typeName":"V"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"V"},"jsDoc":{"doc":"Linear interpolation.","tags":{"group":["Math"]}}}],"tween":[{"kind":"MethodSignature","id":0,"name":"tween","typeParameters":[{"kind":"TypeParameter","id":0,"name":"V","constraint":{"kind":"TypeReference","id":0,"typeName":"LerpValue"}}],"parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"TypeReference","id":0,"typeName":"V"}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"TypeReference","id":0,"typeName":"V"}},{"kind":"Parameter","id":0,"name":"duration","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"setValue","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"value","type":{"kind":"TypeReference","id":0,"typeName":"V"}}],"type":{"kind":"VoidKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"easeFunc","questionToken":true,"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"TweenController"},"jsDoc":{"doc":"Tweeeeeeeening!","tags":{"since":["v3000.0"],"example":["```js\n// tween bean to mouse position\ntween(bean.pos, mousePos(), 1, (p) => bean.pos = p, easings.easeOutBounce)\n\n// tween() returns a then-able that can be used with await\nawait tween(bean.opacity, 1, 0.5, (val) => bean.opacity = val, easings.easeOutQuad)\n```"],"group":["Math"]}}}],"easings":[{"kind":"PropertySignature","id":0,"name":"easings","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"EaseFuncs"},{"kind":"TypeReference","id":0,"typeName":"EaseFunc"}]},"jsDoc":{"doc":"A collection of easing functions for tweening.","tags":{"since":["v3000.0"],"group":["Math"]}}}],"easingSteps":[{"kind":"MethodSignature","id":0,"name":"easingSteps","parameters":[{"kind":"Parameter","id":0,"name":"steps","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"position","type":{"kind":"TypeReference","id":0,"typeName":"StepPosition"}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}},"jsDoc":{"doc":"Steps easing. Eases in discontinious steps.","tags":{"since":["v3001.0"],"group":["Math"]}}}],"easingLinear":[{"kind":"MethodSignature","id":0,"name":"easingLinear","parameters":[{"kind":"Parameter","id":0,"name":"keys","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}},"jsDoc":{"doc":"Linear easing with keyframes","tags":{"since":["v3001.0"],"group":["Math"]}}}],"easingCubicBezier":[{"kind":"MethodSignature","id":0,"name":"easingCubicBezier","parameters":[{"kind":"Parameter","id":0,"name":"p1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}},"jsDoc":{"doc":"Bezier easing. Both control points need x to be within 0 and 1.","tags":{"since":["v3001.0"],"group":["Math"]}}}],"map":[{"kind":"MethodSignature","id":0,"name":"map","parameters":[{"kind":"Parameter","id":0,"name":"v","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"l1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"l2","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h2","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Map a value from one range to another range.","tags":{"group":["Math"]}}}],"mapc":[{"kind":"MethodSignature","id":0,"name":"mapc","parameters":[{"kind":"Parameter","id":0,"name":"v","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"l1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"l2","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h2","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Map a value from one range to another range, and clamp to the dest range.","tags":{"group":["Math"]}}}],"wave":[{"kind":"MethodSignature","id":0,"name":"wave","parameters":[{"kind":"Parameter","id":0,"name":"lo","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"hi","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"func","questionToken":true,"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Interpolate between 2 values (Optionally takes a custom periodic function, which default to Math.sin).","tags":{"example":["```js\n// bounce color between 2 values as time goes on\nonUpdate(\"colorful\", (c) => {\n c.color.r = wave(0, 255, time())\n c.color.g = wave(0, 255, time() + 1)\n c.color.b = wave(0, 255, time() + 2)\n})\n```"],"group":["Math"]}}}],"deg2rad":[{"kind":"MethodSignature","id":0,"name":"deg2rad","parameters":[{"kind":"Parameter","id":0,"name":"deg","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Convert degrees to radians.","tags":{"group":["Math"]}}}],"rad2deg":[{"kind":"MethodSignature","id":0,"name":"rad2deg","parameters":[{"kind":"Parameter","id":0,"name":"rad","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Convert radians to degrees.","tags":{"group":["Math"]}}}],"clamp":[{"kind":"MethodSignature","id":0,"name":"clamp","parameters":[{"kind":"Parameter","id":0,"name":"n","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"min","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"max","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Return a value clamped to an inclusive range of min and max.","tags":{"group":["Math"]}}}],"evaluateQuadratic":[{"kind":"MethodSignature","id":0,"name":"evaluateQuadratic","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the quadratic Bezier at the given t","tags":{"group":["Math"]}}}],"evaluateQuadraticFirstDerivative":[{"kind":"MethodSignature","id":0,"name":"evaluateQuadraticFirstDerivative","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the first derivative of a quadratic bezier at the given t","tags":{"since":["v3001.0"],"group":["Math"]}}}],"evaluateQuadraticSecondDerivative":[{"kind":"MethodSignature","id":0,"name":"evaluateQuadraticSecondDerivative","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the second derivative of a quadratic bezier at the given t","tags":{"since":["v3001.0"],"group":["Math"]}}}],"evaluateBezier":[{"kind":"MethodSignature","id":0,"name":"evaluateBezier","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the cubic Bezier at the given t","tags":{"since":["v3001.0"],"group":["Math"]}}}],"evaluateBezierFirstDerivative":[{"kind":"MethodSignature","id":0,"name":"evaluateBezierFirstDerivative","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the first derivative of a cubic Bezier at the given t","tags":{"group":["Math"]}}}],"evaluateBezierSecondDerivative":[{"kind":"MethodSignature","id":0,"name":"evaluateBezierSecondDerivative","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the second derivative of a cubic bezier at the given t","tags":{"since":["v3001.0"],"group":["Math"]}}}],"evaluateCatmullRom":[{"kind":"MethodSignature","id":0,"name":"evaluateCatmullRom","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the Catmull-Rom spline at the given t","tags":{"since":["v3001.0"],"group":["Math"]}}}],"evaluateCatmullRomFirstDerivative":[{"kind":"MethodSignature","id":0,"name":"evaluateCatmullRomFirstDerivative","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the first derivative of a Catmull-Rom spline at the given t","tags":{"since":["v3001.0"],"group":["Math"]}}}],"curveLengthApproximation":[{"kind":"MethodSignature","id":0,"name":"curveLengthApproximation","parameters":[{"kind":"Parameter","id":0,"name":"curve","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}},{"kind":"Parameter","id":0,"name":"entries","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"detail","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"inverse","type":{"kind":"BooleanKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}},"jsDoc":{"doc":"Returns a function.\nentries is the amount of entries in the LUT.\ndetail is the sampling granularity of each segment recorded in the LUT.\nThis new function either returns the length for a given t, or t for a given length, depending on the inverse parameter.","tags":{"since":["v3001.0"],"group":["Math"]}}}],"normalizedCurve":[{"kind":"MethodSignature","id":0,"name":"normalizedCurve","parameters":[{"kind":"Parameter","id":0,"name":"curve","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"Returns a new curve which is normalized. This new curve has constant speed\ncurve is any curve in t (non-constant between 0 and 1)\nreturns a curve in s (constant between 0 and 1)","tags":{"since":["v3001.0"],"group":["Math"]}}}],"hermite":[{"kind":"MethodSignature","id":0,"name":"hermite","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"m1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"m2","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}},"jsDoc":{"doc":"A second order function returning an evaluator for the given 1D Hermite curve","tags":{"param":["First point","First control point (tangent)","Second control point (tangent)","Second point"],"returns":["A function which gives the value on the 1D Hermite curve at t"]}}}],"cardinal":[{"kind":"MethodSignature","id":0,"name":"cardinal","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"m1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"m2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"tension","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"A second order function returning an evaluator for the given 2D Cardinal curve","tags":{"param":["Previous point","First point","Second point","Next point","The tension of the curve, [0..1] from round to tight."],"returns":["A function which gives the value on the 2D Cardinal curve at t"]}}}],"catmullRom":[{"kind":"MethodSignature","id":0,"name":"catmullRom","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"m1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"m2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"A second order function returning an evaluator for the given 2D Catmull-Rom curve","tags":{"param":["Previous point","First point","Second point","Next point"],"returns":["A function which gives the value on the 2D Catmull-Rom curve at t"]}}}],"bezier":[{"kind":"MethodSignature","id":0,"name":"bezier","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"A second order function returning an evaluator for the given 2D quadratic Bezier curve","tags":{"param":["First point","First control point","Second control point","Second point"],"returns":["A function which gives the value on the 2D quadratic Bezier curve at t"]}}}],"kochanekBartels":[{"kind":"MethodSignature","id":0,"name":"kochanekBartels","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"tension","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"continuity","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"bias","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"A second order function returning an evaluator for the given 2D Kochanek–Bartels curve","tags":{"param":["Previous point","First point","Second point","Next point","The tension of the curve, [-1..1] from round to tight.","The continuity of the curve, [-1..1] from box corners to inverted corners.","The bias of the curve, [-1..1] from pre-shoot to post-shoot."],"returns":["A function which gives the value on the 2D Kochanek–Bartels curve at t"]}}}],"testLinePoint":[{"kind":"MethodSignature","id":0,"name":"testLinePoint","parameters":[{"kind":"Parameter","id":0,"name":"l","type":{"kind":"TypeReference","id":0,"typeName":"Line"}},{"kind":"Parameter","id":0,"name":"pt","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if a line and a point intersect.","tags":{"group":["Math"]}}}],"testLineLine":[{"kind":"MethodSignature","id":0,"name":"testLineLine","parameters":[{"kind":"Parameter","id":0,"name":"l1","type":{"kind":"TypeReference","id":0,"typeName":"Line"}},{"kind":"Parameter","id":0,"name":"l2","type":{"kind":"TypeReference","id":0,"typeName":"Line"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Check if 2 lines intersects, if yes returns the intersection point.","tags":{"group":["Math"]}}}],"testLineCircle":[{"kind":"MethodSignature","id":0,"name":"testLineCircle","parameters":[{"kind":"Parameter","id":0,"name":"l","type":{"kind":"TypeReference","id":0,"typeName":"Line"}},{"kind":"Parameter","id":0,"name":"circle","type":{"kind":"TypeReference","id":0,"typeName":"Circle"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if a line and a circle intersect.","tags":{"group":["Math"]}}}],"testRectRect":[{"kind":"MethodSignature","id":0,"name":"testRectRect","parameters":[{"kind":"Parameter","id":0,"name":"r1","type":{"kind":"TypeReference","id":0,"typeName":"Rect"}},{"kind":"Parameter","id":0,"name":"r2","type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if 2 rectangle overlaps.","tags":{"group":["Math"]}}}],"testRectLine":[{"kind":"MethodSignature","id":0,"name":"testRectLine","parameters":[{"kind":"Parameter","id":0,"name":"r","type":{"kind":"TypeReference","id":0,"typeName":"Rect"}},{"kind":"Parameter","id":0,"name":"l","type":{"kind":"TypeReference","id":0,"typeName":"Line"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if a line and a rectangle overlaps.","tags":{"group":["Math"]}}}],"testRectPoint":[{"kind":"MethodSignature","id":0,"name":"testRectPoint","parameters":[{"kind":"Parameter","id":0,"name":"r","type":{"kind":"TypeReference","id":0,"typeName":"Rect"}},{"kind":"Parameter","id":0,"name":"pt","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if a point is inside a rectangle.","tags":{"group":["Math"]}}}],"testCirclePolygon":[{"kind":"MethodSignature","id":0,"name":"testCirclePolygon","parameters":[{"kind":"Parameter","id":0,"name":"c","type":{"kind":"TypeReference","id":0,"typeName":"Circle"}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if a circle and polygon intersect linewise.","tags":{"group":["Math"]}}}],"isConvex":[{"kind":"MethodSignature","id":0,"name":"isConvex","parameters":[{"kind":"Parameter","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"tags":{"group":["Math"]}}}],"triangulate":[{"kind":"MethodSignature","id":0,"name":"triangulate","parameters":[{"kind":"Parameter","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}},"jsDoc":{"tags":{"group":["Math"]}}}],"NavMesh":[{"kind":"PropertySignature","id":0,"name":"NavMesh","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"NavMesh"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Point":[{"kind":"PropertySignature","id":0,"name":"Point","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Point"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Line":[{"kind":"PropertySignature","id":0,"name":"Line","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Line"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Rect":[{"kind":"PropertySignature","id":0,"name":"Rect","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Rect"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Circle":[{"kind":"PropertySignature","id":0,"name":"Circle","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Circle"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Ellipse":[{"kind":"PropertySignature","id":0,"name":"Ellipse","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Ellipse"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Polygon":[{"kind":"PropertySignature","id":0,"name":"Polygon","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Polygon"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Vec2":[{"kind":"PropertySignature","id":0,"name":"Vec2","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Vec2"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Color":[{"kind":"PropertySignature","id":0,"name":"Color","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Color"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Mat4":[{"kind":"PropertySignature","id":0,"name":"Mat4","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Mat4"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Quad":[{"kind":"PropertySignature","id":0,"name":"Quad","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Quad"}},"jsDoc":{"tags":{"group":["Math"]}}}],"RNG":[{"kind":"PropertySignature","id":0,"name":"RNG","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"RNG"}},"jsDoc":{"tags":{"group":["Math"]}}}],"scene":[{"kind":"MethodSignature","id":0,"name":"scene","parameters":[{"kind":"Parameter","id":0,"name":"id","type":{"kind":"TypeReference","id":0,"typeName":"SceneName"}},{"kind":"Parameter","id":0,"name":"def","type":{"kind":"TypeReference","id":0,"typeName":"SceneDef"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Define a scene.","tags":{"group":["Scene"]}}}],"go":[{"kind":"MethodSignature","id":0,"name":"go","parameters":[{"kind":"Parameter","id":0,"name":"id","type":{"kind":"TypeReference","id":0,"typeName":"SceneName"}},{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Go to a scene, passing all rest args to scene callback.","tags":{"group":["Scene"]}}}],"layers":[{"kind":"MethodSignature","id":0,"name":"layers","parameters":[{"kind":"Parameter","id":0,"name":"layernames","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"defaultLayer","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Define the layer names. Should be called before any objects are made.","tags":{"group":["Scene"]}}}],"addLevel":[{"kind":"MethodSignature","id":0,"name":"addLevel","parameters":[{"kind":"Parameter","id":0,"name":"map","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"LevelOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj"},"jsDoc":{"doc":"Construct a level based on symbols.","tags":{"group":["Level"],"example":["```js\naddLevel([\n \" $\",\n \" $\",\n \" $$ = $\",\n \" % ==== = $\",\n \" = \",\n \" ^^ = > = &\",\n \"===========================\",\n], {\n // define the size of tile block\n tileWidth: 32,\n tileHeight: 32,\n // define what each symbol means, by a function returning a component list (what will be passed to add())\n tiles: {\n \"=\": () => [\n sprite(\"floor\"),\n area(),\n body({ isStatic: true }),\n ],\n \"$\": () => [\n sprite(\"coin\"),\n area(),\n pos(0, -9),\n ],\n \"^\": () => [\n sprite(\"spike\"),\n area(),\n \"danger\",\n ],\n }\n})\n```"]}}}],"getData":[{"kind":"MethodSignature","id":0,"name":"getData","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"def","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get data from local storage, if not present can set to a default value.","tags":{"group":["Data"]}}}],"setData":[{"kind":"MethodSignature","id":0,"name":"setData","parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"data","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set data from local storage.","tags":{"group":["Data"]}}}],"drawSprite":[{"kind":"MethodSignature","id":0,"name":"drawSprite","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawSpriteOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a sprite.","tags":{"example":["```js\ndrawSprite({\n sprite: \"bean\",\n pos: vec2(100, 200),\n frame: 3,\n})\n```"],"group":["Draw"]}}}],"drawText":[{"kind":"MethodSignature","id":0,"name":"drawText","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawTextOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a piece of text.","tags":{"example":["```js\ndrawText({\n text: \"oh hi\",\n size: 48,\n font: \"sans-serif\",\n width: 120,\n pos: vec2(100, 200),\n color: rgb(0, 0, 255),\n})\n```"],"group":["Draw"]}}}],"drawRect":[{"kind":"MethodSignature","id":0,"name":"drawRect","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawRectOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a rectangle.","tags":{"example":["```js\ndrawRect({\n width: 120,\n height: 240,\n pos: vec2(20, 20),\n color: YELLOW,\n outline: { color: BLACK, width: 4 },\n})\n```"],"group":["Draw"]}}}],"drawLine":[{"kind":"MethodSignature","id":0,"name":"drawLine","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawLineOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a line.","tags":{"example":["```js\ndrawLine({\n p1: vec2(0),\n p2: mousePos(),\n width: 4,\n color: rgb(0, 0, 255),\n})\n```"],"group":["Draw"]}}}],"drawLines":[{"kind":"MethodSignature","id":0,"name":"drawLines","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawLinesOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw lines.","tags":{"example":["```js\ndrawLines({\n pts: [ vec2(0), vec2(0, height()), mousePos() ],\n width: 4,\n pos: vec2(100, 200),\n color: rgb(0, 0, 255),\n})\n```"],"group":["Draw"]}}}],"drawCurve":[{"kind":"MethodSignature","id":0,"name":"drawCurve","parameters":[{"kind":"Parameter","id":0,"name":"curve","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}},{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"TypeReference","id":0,"typeName":"DrawCurveOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a curve.","tags":{"example":["```js\ndrawCurve(t => evaluateBezier(a, b, c, d, t)\n{\n width: 2,\n color: rgb(0, 0, 255),\n})\n```"],"group":["Draw"]}}}],"drawBezier":[{"kind":"MethodSignature","id":0,"name":"drawBezier","parameters":[{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"TypeReference","id":0,"typeName":"DrawBezierOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a cubic Bezier curve.","tags":{"example":["```js\ndrawBezier({\n pt1: vec2(100, 100),\n pt2: vec2(200, 100),\n pt3: vec2(200, 200),\n pt4: vec2(100, 200),\n width: 2,\n color: GREEN\n})\n```"],"group":["Draw"]}}}],"drawTriangle":[{"kind":"MethodSignature","id":0,"name":"drawTriangle","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawTriangleOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a triangle.","tags":{"example":["```js\ndrawTriangle({\n p1: vec2(0),\n p2: vec2(0, height()),\n p3: mousePos(),\n pos: vec2(100, 200),\n color: rgb(0, 0, 255),\n})\n```"],"group":["Draw"]}}}],"drawCircle":[{"kind":"MethodSignature","id":0,"name":"drawCircle","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawCircleOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a circle.","tags":{"example":["```js\ndrawCircle({\n pos: vec2(100, 200),\n radius: 120,\n color: rgb(255, 255, 0),\n})\n```"],"group":["Draw"]}}}],"drawEllipse":[{"kind":"MethodSignature","id":0,"name":"drawEllipse","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawEllipseOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw an ellipse.","tags":{"example":["```js\ndrawEllipse({\n pos: vec2(100, 200),\n radiusX: 120,\n radiusY: 120,\n color: rgb(255, 255, 0),\n})\n```"],"group":["Draw"]}}}],"drawPolygon":[{"kind":"MethodSignature","id":0,"name":"drawPolygon","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawPolygonOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a convex polygon from a list of vertices.","tags":{"example":["```js\ndrawPolygon({\n pts: [\n vec2(-12),\n vec2(0, 16),\n vec2(12, 4),\n vec2(0, -2),\n vec2(-8),\n ],\n pos: vec2(100, 200),\n color: rgb(0, 0, 255),\n})\n```"],"group":["Draw"]}}}],"drawUVQuad":[{"kind":"MethodSignature","id":0,"name":"drawUVQuad","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawUVQuadOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a rectangle with UV data.","tags":{"group":["Draw"]}}}],"drawFormattedText":[{"kind":"MethodSignature","id":0,"name":"drawFormattedText","parameters":[{"kind":"Parameter","id":0,"name":"text","type":{"kind":"TypeReference","id":0,"typeName":"FormattedText"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a piece of formatted text from formatText().","tags":{"since":["v2000.2"],"example":["```js\n// text background\nconst txt = formatText({\n text: \"oh hi\",\n})\n\ndrawRect({\n width: txt.width,\n height: txt.height,\n})\n\ndrawFormattedText(txt)\n```"],"group":["Draw"]}}}],"drawMasked":[{"kind":"MethodSignature","id":0,"name":"drawMasked","parameters":[{"kind":"Parameter","id":0,"name":"content","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"mask","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Whatever drawn in content will only be drawn if it's also drawn in mask (mask will not be rendered).","tags":{"since":["v3000.0"],"group":["Draw"]}}}],"drawSubtracted":[{"kind":"MethodSignature","id":0,"name":"drawSubtracted","parameters":[{"kind":"Parameter","id":0,"name":"content","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"mask","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Subtract whatever drawn in content by whatever drawn in mask (mask will not be rendered).","tags":{"since":["v3000.0"],"group":["Draw"]}}}],"pushTransform":[{"kind":"MethodSignature","id":0,"name":"pushTransform","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Push current transform matrix to the transform stack.","tags":{"example":["```js\npushTransform()\n\n// these transforms will affect every render until popTransform()\npushTranslate(120, 200)\npushRotate(time() * 120)\npushScale(6)\n\ndrawSprite(\"bean\")\ndrawCircle(vec2(0), 120)\n\n// restore the transformation stack to when last pushed\npopTransform()\n```"],"group":["Draw"]}}}],"popTransform":[{"kind":"MethodSignature","id":0,"name":"popTransform","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Pop the topmost transform matrix from the transform stack.","tags":{"group":["Draw"]}}}],"pushTranslate":[{"kind":"MethodSignature","id":0,"name":"pushTranslate","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Translate all subsequent draws.","tags":{"example":["```js\npushTranslate(100, 100)\n\n// this will be drawn at (120, 120)\ndrawText({\n text: \"oh hi\",\n pos: vec2(20, 20),\n})\n```"],"group":["Draw"]}}},{"kind":"MethodSignature","id":0,"name":"pushTranslate","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}},{"kind":"MethodSignature","id":0,"name":"pushTranslate","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2Args"},{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]}]}}],"type":{"kind":"VoidKeyword","id":0}}],"pushScale":[{"kind":"MethodSignature","id":0,"name":"pushScale","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Scale all subsequent draws.","tags":{"group":["Draw"]}}},{"kind":"MethodSignature","id":0,"name":"pushScale","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"NumberKeyword","id":0}]}}],"type":{"kind":"VoidKeyword","id":0}},{"kind":"MethodSignature","id":0,"name":"pushScale","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2Args"},{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]},{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0},{"kind":"UndefinedKeyword","id":0}]}]}}],"type":{"kind":"VoidKeyword","id":0}}],"pushRotate":[{"kind":"MethodSignature","id":0,"name":"pushRotate","parameters":[{"kind":"Parameter","id":0,"name":"angle","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Rotate all subsequent draws.","tags":{"group":["Draw"]}}}],"pushMatrix":[{"kind":"MethodSignature","id":0,"name":"pushMatrix","parameters":[{"kind":"Parameter","id":0,"name":"mat","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Apply a transform matrix, ignore all prior transforms.","tags":{"since":["v3000.0"],"group":["Draw"]}}}],"usePostEffect":[{"kind":"MethodSignature","id":0,"name":"usePostEffect","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"uniform","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Uniform"},{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}}]}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Apply a post process effect from a shader name.","tags":{"since":["v3000.0"],"example":["```js\nloadShader(\"invert\", null, `\nvec4 frag(vec2 pos, vec2 uv, vec4 color, sampler2D tex) {\n vec4 c = def_frag();\n return vec4(1.0 - c.r, 1.0 - c.g, 1.0 - c.b, c.a);\n}\n`)\n\nusePostEffect(\"invert\")\n```"],"group":["Draw"]}}}],"formatText":[{"kind":"MethodSignature","id":0,"name":"formatText","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawTextOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"FormattedText"},"jsDoc":{"doc":"Format a piece of text without drawing (for getting dimensions, etc).","tags":{"since":["v2000.2"],"example":["```js\n// text background\nconst txt = formatText({\n text: \"oh hi\",\n})\n\ndrawRect({\n width: txt.width,\n height: txt.height,\n})\n\ndrawFormattedText(txt)\n```"],"group":["Draw"]}}}],"makeCanvas":[{"kind":"MethodSignature","id":0,"name":"makeCanvas","parameters":[{"kind":"Parameter","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Canvas"},"jsDoc":{"doc":"Create a canvas to draw stuff offscreen.","tags":{"since":["v3001.0"],"group":["Draw"]}}}],"debug":[{"kind":"PropertySignature","id":0,"name":"debug","type":{"kind":"TypeReference","id":0,"typeName":"Debug"},"jsDoc":{"doc":"The Debug interface for debugging stuff.","tags":{"example":["```js\n// pause the whole game\ndebug.paused = true\n\n// enter inspect mode\ndebug.inspect = true\n```"],"group":["Debug"]}}}],"plug":[{"kind":"MethodSignature","id":0,"name":"plug","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","constraint":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"AnyKeyword","id":0}]}}],"parameters":[{"kind":"Parameter","id":0,"name":"plugin","type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYPlugin","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}}],"type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},{"kind":"TypeReference","id":0,"typeName":"T"}]},"jsDoc":{"doc":"Import a plugin.","tags":{"group":["Plugins"]}}}],"screenshot":[{"kind":"MethodSignature","id":0,"name":"screenshot","parameters":[],"type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"Take a screenshot and get the dataurl of the image.","tags":{"returns":["The dataURL of the image."],"group":["Data"]}}}],"download":[{"kind":"MethodSignature","id":0,"name":"download","parameters":[{"kind":"Parameter","id":0,"name":"filename","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"dataurl","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Trigger a file download from a url.","tags":{"since":["v3000.0"],"group":["Data"]}}}],"downloadText":[{"kind":"MethodSignature","id":0,"name":"downloadText","parameters":[{"kind":"Parameter","id":0,"name":"filename","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"text","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Trigger a text file download.","tags":{"since":["v3000.0"],"group":["Data"]}}}],"downloadJSON":[{"kind":"MethodSignature","id":0,"name":"downloadJSON","parameters":[{"kind":"Parameter","id":0,"name":"filename","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"data","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Trigger a json download from a .","tags":{"since":["v3000.0"],"group":["Data"]}}}],"downloadBlob":[{"kind":"MethodSignature","id":0,"name":"downloadBlob","parameters":[{"kind":"Parameter","id":0,"name":"filename","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"blob","type":{"kind":"TypeReference","id":0,"typeName":"Blob"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Trigger a file download from a blob.","tags":{"since":["v3000.0"],"group":["Data"]}}}],"record":[{"kind":"MethodSignature","id":0,"name":"record","parameters":[{"kind":"Parameter","id":0,"name":"frameRate","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Recording"},"jsDoc":{"doc":"Start recording the canvas into a video. If framerate is not specified, a new frame will be captured each time the canvas changes.","tags":{"returns":["A control handle."],"since":["v2000.1"],"group":["Data"]}}}],"addKaboom":[{"kind":"MethodSignature","id":0,"name":"addKaboom","parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"BoomOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj"},"jsDoc":{"doc":"Add an explosion","tags":{"group":["Misc"]}}}],"ASCII_CHARS":[{"kind":"PropertySignature","id":0,"name":"ASCII_CHARS","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"All chars in ASCII.","tags":{"group":["Constants"]}}}],"LEFT":[{"kind":"PropertySignature","id":0,"name":"LEFT","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Left directional vector vec2(-1, 0).","tags":{"group":["Constants"]}}}],"RIGHT":[{"kind":"PropertySignature","id":0,"name":"RIGHT","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Right directional vector vec2(1, 0).","tags":{"group":["Constants"]}}}],"UP":[{"kind":"PropertySignature","id":0,"name":"UP","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Up directional vector vec2(0, -1).","tags":{"group":["Constants"]}}}],"DOWN":[{"kind":"PropertySignature","id":0,"name":"DOWN","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Down directional vector vec2(0, 1).","tags":{"group":["Constants"]}}}],"RED":[{"kind":"PropertySignature","id":0,"name":"RED","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Red color.","tags":{"group":["Constants"]}}}],"GREEN":[{"kind":"PropertySignature","id":0,"name":"GREEN","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Green color.","tags":{"group":["Constants"]}}}],"BLUE":[{"kind":"PropertySignature","id":0,"name":"BLUE","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Blue color.","tags":{"group":["Constants"]}}}],"YELLOW":[{"kind":"PropertySignature","id":0,"name":"YELLOW","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Yellow color.","tags":{"group":["Constants"]}}}],"MAGENTA":[{"kind":"PropertySignature","id":0,"name":"MAGENTA","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Cyan color.","tags":{"group":["Constants"]}}}],"CYAN":[{"kind":"PropertySignature","id":0,"name":"CYAN","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Cyan color.","tags":{"group":["Constants"]}}}],"WHITE":[{"kind":"PropertySignature","id":0,"name":"WHITE","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"White color.","tags":{"group":["Constants"]}}}],"BLACK":[{"kind":"PropertySignature","id":0,"name":"BLACK","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Black color.","tags":{"group":["Constants"]}}}],"canvas":[{"kind":"PropertySignature","id":0,"name":"canvas","type":{"kind":"TypeReference","id":0,"typeName":"HTMLCanvasElement"},"jsDoc":{"doc":"The canvas DOM KAPLAY is currently using.","tags":{"group":["Info"]}}}],"quit":[{"kind":"PropertySignature","id":0,"name":"quit","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"jsDoc":{"doc":"End everything.","tags":{"group":["Start"]}}}],"KEvent":[{"kind":"PropertySignature","id":0,"name":"KEvent","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"KEvent"}},"jsDoc":{"doc":"EventHandler for one single event.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"KEventHandler":[{"kind":"PropertySignature","id":0,"name":"KEventHandler","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"KEventHandler"}},"jsDoc":{"doc":"EventHandler for multiple events.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"KEventController":[{"kind":"PropertySignature","id":0,"name":"KEventController","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"KEventController"}},"jsDoc":{"doc":"The object that can pause or cancel an event.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"VERSION":[{"kind":"PropertySignature","id":0,"name":"VERSION","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"Current KAPLAY library version.","tags":{"since":["v3000.0"],"group":["Info"]}}}]},"jsDoc":{"doc":"Context handle that contains every kaboom function.","tags":{"group":["Start"]}}}],"Tag":[{"kind":"TypeAliasDeclaration","id":0,"name":"Tag","type":{"kind":"StringKeyword","id":0}}],"UnionToIntersection":[{"kind":"TypeAliasDeclaration","id":0,"name":"UnionToIntersection","typeParameters":[{"kind":"TypeParameter","id":0,"name":"U"}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"ParenthesizedType","id":0,"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"U"},"extendsType":{"kind":"AnyKeyword","id":0},"trueType":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"U"}}],"type":{"kind":"VoidKeyword","id":0}},"falseType":{"kind":"NeverKeyword","id":0}}},"extendsType":{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"I"}}}],"type":{"kind":"VoidKeyword","id":0}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"I"},"falseType":{"kind":"NeverKeyword","id":0}}}],"Defined":[{"kind":"TypeAliasDeclaration","id":0,"name":"Defined","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"AnyKeyword","id":0},"trueType":{"kind":"TypeReference","id":0,"typeName":"Pick","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"MappedType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"K","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"T"}}},"questionToken":true,"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"T"},"indexType":{"kind":"TypeReference","id":0,"typeName":"K"}},"extendsType":{"kind":"UndefinedKeyword","id":0},"trueType":{"kind":"NeverKeyword","id":0},"falseType":{"kind":"TypeReference","id":0,"typeName":"K"}},"members":{}},"indexType":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"T"}}}]},"falseType":{"kind":"NeverKeyword","id":0}}}],"Expand":[{"kind":"TypeAliasDeclaration","id":0,"name":"Expand","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"U"}},"trueType":{"kind":"MappedType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"K","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"U"}}},"type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"U"},"indexType":{"kind":"TypeReference","id":0,"typeName":"K"}},"members":{}},"falseType":{"kind":"NeverKeyword","id":0}}}],"MergeObj":[{"kind":"TypeAliasDeclaration","id":0,"name":"MergeObj","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"TypeReference","id":0,"typeName":"Expand","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"UnionToIntersection","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Defined","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}]}]}}],"MergeComps":[{"kind":"TypeAliasDeclaration","id":0,"name":"MergeComps","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"TypeReference","id":0,"typeName":"Omit","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"MergeObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"Comp"}}]},"jsDoc":{"doc":"A type to merge the components of a game object, omiting the default component properties.","tags":{"group":["Component Types"]}}}],"MergePlugins":[{"kind":"TypeAliasDeclaration","id":0,"name":"MergePlugins","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","constraint":{"kind":"TypeReference","id":0,"typeName":"PluginList","typeArguments":[{"kind":"AnyKeyword","id":0}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"MergeObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"ReturnType","typeArguments":[{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"T"},"indexType":{"kind":"NumberKeyword","id":0}}]}]}}],"CompList":[{"kind":"TypeAliasDeclaration","id":0,"name":"CompList","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"TypeReference","id":0,"typeName":"Tag"}]}]},"jsDoc":{"doc":"A component list.","tags":{"group":["Component Types"]}}}],"PluginList":[{"kind":"TypeAliasDeclaration","id":0,"name":"PluginList","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"TypeReference","id":0,"typeName":"KAPLAYPlugin","typeArguments":[{"kind":"AnyKeyword","id":0}]}]}]}}],"Key":[{"kind":"TypeAliasDeclaration","id":0,"name":"Key","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f1","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f2","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f3","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f4","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f5","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f6","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f7","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f8","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f9","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f10","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f11","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f12","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"`","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"1","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"2","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"3","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"4","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"5","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"6","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"7","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"8","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"9","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"0","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"-","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"=","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"q","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"w","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"e","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"r","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"t","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"y","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"u","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"i","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"o","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"p","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"[","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"]","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"\\","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"a","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"s","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"d","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"g","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"h","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"j","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"k","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"l","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":";","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"'","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"z","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"x","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"c","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"v","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"b","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"n","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"m","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":",","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":".","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"/","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"escape","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"backspace","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"enter","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"tab","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"control","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"alt","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"meta","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"space","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":" ","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"right","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"up","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"down","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"shift","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"A key.","tags":{"group":["Input"]}}}],"MouseButton":[{"kind":"TypeAliasDeclaration","id":0,"name":"MouseButton","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"right","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"middle","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"back","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"forward","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"A mouse button.","tags":{"group":["Input"]}}}],"KGamepadButton":[{"kind":"TypeAliasDeclaration","id":0,"name":"KGamepadButton","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"north","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"east","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"south","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"west","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ltrigger","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"rtrigger","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"lshoulder","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"rshoulder","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"select","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"start","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"lstick","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"rstick","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"dpad-up","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"dpad-right","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"dpad-down","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"dpad-left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"home","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"capture","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"A gamepad button.","tags":{"group":["Input"]}}}],"GamepadStick":[{"kind":"TypeAliasDeclaration","id":0,"name":"GamepadStick","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"right","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"A gamepad stick.","tags":{"group":["Input"]}}}],"GamepadDef":[{"kind":"TypeAliasDeclaration","id":0,"name":"GamepadDef","type":{"kind":"TypeLiteral","id":0,"members":{"buttons":[{"kind":"PropertySignature","id":0,"name":"buttons","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}]}}],"sticks":[{"kind":"PropertySignature","id":0,"name":"sticks","type":{"kind":"TypeReference","id":0,"typeName":"Partial","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GamepadStick"},{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}]}}]}]}}]}},"jsDoc":{"doc":"A gamepad definition.","tags":{}}}],"KGamePad":[{"kind":"TypeAliasDeclaration","id":0,"name":"KGamePad","type":{"kind":"TypeLiteral","id":0,"members":{"index":[{"kind":"PropertySignature","id":0,"name":"index","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The order of the gamepad in the gamepad list.","tags":{}}}],"isPressed":[{"kind":"MethodSignature","id":0,"name":"isPressed","parameters":[{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain button is pressed.","tags":{}}}],"isDown":[{"kind":"MethodSignature","id":0,"name":"isDown","parameters":[{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain button is held down.","tags":{}}}],"isReleased":[{"kind":"MethodSignature","id":0,"name":"isReleased","parameters":[{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain button is released.","tags":{}}}],"getStick":[{"kind":"MethodSignature","id":0,"name":"getStick","parameters":[{"kind":"Parameter","id":0,"name":"stick","type":{"kind":"TypeReference","id":0,"typeName":"GamepadStick"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the value of a stick.","tags":{}}}]}},"jsDoc":{"doc":"A KAPLAY's gamepad","tags":{}}}],"GameObjInspect":[{"kind":"TypeAliasDeclaration","id":0,"name":"GameObjInspect","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Tag"},{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}]},"jsDoc":{"doc":"Inspect info for a game object.","tags":{}}}],"KAPLAYOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"KAPLAYOpt","typeParameters":[{"kind":"TypeParameter","id":0,"name":"TPlugin","constraint":{"kind":"TypeReference","id":0,"typeName":"PluginList","typeArguments":[{"kind":"AnyKeyword","id":0}]},"default":{"kind":"AnyKeyword","id":0}},{"kind":"TypeParameter","id":0,"name":"TButtonDef","constraint":{"kind":"TypeReference","id":0,"typeName":"ButtonsDef"},"default":{"kind":"AnyKeyword","id":0}}],"members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Width of game.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Height of game.","tags":{}}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Pixel scale / size.","tags":{}}}],"stretch":[{"kind":"PropertySignature","id":0,"name":"stretch","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If stretch canvas to container when width and height is specified","tags":{}}}],"letterbox":[{"kind":"PropertySignature","id":0,"name":"letterbox","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"When stretching if keep aspect ratio and leave black bars on remaining spaces.","tags":{}}}],"debug":[{"kind":"PropertySignature","id":0,"name":"debug","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If register debug buttons (default true)","tags":{}}}],"debugKey":[{"kind":"PropertySignature","id":0,"name":"debugKey","type":{"kind":"TypeReference","id":0,"typeName":"Key"},"questionToken":true,"jsDoc":{"doc":"Key that toggles debug mode","tags":{}}}],"font":[{"kind":"PropertySignature","id":0,"name":"font","type":{"kind":"StringKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Default font (defaults to \"monospace\").","tags":{}}}],"pixelDensity":[{"kind":"PropertySignature","id":0,"name":"pixelDensity","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Device pixel scale (defaults to window.devicePixelRatio, high pixel density will hurt performance).","tags":{"since":["v3000.0"]}}}],"crisp":[{"kind":"PropertySignature","id":0,"name":"crisp","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Disable antialias and enable sharp pixel display.","tags":{}}}],"canvas":[{"kind":"PropertySignature","id":0,"name":"canvas","type":{"kind":"TypeReference","id":0,"typeName":"HTMLCanvasElement"},"questionToken":true,"jsDoc":{"doc":"The canvas DOM element to use. If empty will create one.","tags":{}}}],"root":[{"kind":"PropertySignature","id":0,"name":"root","type":{"kind":"TypeReference","id":0,"typeName":"HTMLElement"},"questionToken":true,"jsDoc":{"doc":"The container DOM element to insert the canvas if created. Defaults to document.body.","tags":{}}}],"background":[{"kind":"PropertySignature","id":0,"name":"background","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RGBValue"},{"kind":"TypeReference","id":0,"typeName":"RGBAValue"},{"kind":"StringKeyword","id":0}]},"questionToken":true,"jsDoc":{"doc":"Background color. E.g. [ 0, 0, 255 ] for solid blue background, or [ 0, 0, 0, 0 ] for transparent background. Accepts RGB value array or string hex codes.","tags":{}}}],"texFilter":[{"kind":"PropertySignature","id":0,"name":"texFilter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true,"jsDoc":{"doc":"Default texture filter.","tags":{}}}],"logMax":[{"kind":"PropertySignature","id":0,"name":"logMax","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"How many log messages can there be on one screen (default 8).","tags":{}}}],"logTime":[{"kind":"PropertySignature","id":0,"name":"logTime","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"How many seconds log messages stay on screen (default 4).","tags":{"since":["v3000.1"]}}}],"hashGridSize":[{"kind":"PropertySignature","id":0,"name":"hashGridSize","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Size of the spatial hash grid for collision detection (default 64).","tags":{"since":["v3000.0"]}}}],"touchToMouse":[{"kind":"PropertySignature","id":0,"name":"touchToMouse","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If translate touch events as mouse clicks (default true).","tags":{}}}],"loadingScreen":[{"kind":"PropertySignature","id":0,"name":"loadingScreen","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If KAPLAY should render a default loading screen when assets are not fully ready (default true).","tags":{"since":["v3000.0"]}}}],"backgroundAudio":[{"kind":"PropertySignature","id":0,"name":"backgroundAudio","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If pause audio when tab is not active (default false).","tags":{"since":["v3000.0"]}}}],"gamepads":[{"kind":"PropertySignature","id":0,"name":"gamepads","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"GamepadDef"}]},"questionToken":true,"jsDoc":{"doc":"Custom gamepad definitions (see gamepad.json for reference of the format).","tags":{"since":["v3000.0"]}}}],"buttons":[{"kind":"PropertySignature","id":0,"name":"buttons","type":{"kind":"TypeReference","id":0,"typeName":"TButtonDef"},"questionToken":true,"jsDoc":{"doc":"Defined buttons for input binding.","tags":{"since":["v30010"]}}}],"maxFPS":[{"kind":"PropertySignature","id":0,"name":"maxFPS","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Limit framerate to an amount per second.","tags":{"since":["v3000.0"]}}}],"focus":[{"kind":"PropertySignature","id":0,"name":"focus","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If focus on the canvas on start (default true).","tags":{"since":["v3001.0"]}}}],"global":[{"kind":"PropertySignature","id":0,"name":"global","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If import all KAPLAY functions to global (default true).","tags":{}}}],"plugins":[{"kind":"PropertySignature","id":0,"name":"plugins","type":{"kind":"TypeReference","id":0,"typeName":"TPlugin"},"questionToken":true,"jsDoc":{"doc":"List of plugins to import.","tags":{}}}],"burp":[{"kind":"PropertySignature","id":0,"name":"burp","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Enter burp mode.","tags":{}}}]},"jsDoc":{"doc":"KAPLAY configurations.","tags":{"group":["Start"]}}}],"KAPLAYPlugin":[{"kind":"TypeAliasDeclaration","id":0,"name":"KAPLAYPlugin","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"}}],"type":{"kind":"TypeReference","id":0,"typeName":"T"}}}}]}},"jsDoc":{"doc":"A plugin for KAPLAY.","tags":{"example":["```js\n// a plugin that adds a new function to KAPLAY\nconst myPlugin = (k) => ({\n myFunc: () => {\n k.debug.log(\"hello from my plugin\")\n }\n})\n\n// use the plugin\nkaplay({\n plugins: [ myPlugin ]\n})\n\n// now you can use the new function\nmyFunc()\n```"],"group":["Plugins"]}}}],"GameObjRaw":[{"kind":"InterfaceDeclaration","id":0,"name":"GameObjRaw","members":{"add":[{"kind":"MethodSignature","id":0,"name":"add","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"comps","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"ConstructorType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"go","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"R"},"falseType":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"go","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"R"},"falseType":{"kind":"TypeReference","id":0,"typeName":"T"}}}]},"jsDoc":{"doc":"Add a child.","tags":{"since":["v3000.0"]}}}],"readd":[{"kind":"MethodSignature","id":0,"name":"readd","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},"jsDoc":{"doc":"Remove and re-add the game obj, without triggering add / destroy events.","tags":{}}}],"remove":[{"kind":"MethodSignature","id":0,"name":"remove","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove a child.","tags":{"since":["v3000.0"]}}}],"removeAll":[{"kind":"MethodSignature","id":0,"name":"removeAll","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove all children with a certain tag.","tags":{"since":["v3000.0"]}}},{"kind":"MethodSignature","id":0,"name":"removeAll","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove all children.","tags":{"since":["v3000.0"]}}}],"get":[{"kind":"MethodSignature","id":0,"name":"get","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Tag"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Tag"}}]}},{"kind":"Parameter","id":0,"name":"opts","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"GetOpt"}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},"jsDoc":{"doc":"Get a list of all game objs with certain tag.","tags":{"since":["v3000.0"]}}}],"query":[{"kind":"MethodSignature","id":0,"name":"query","parameters":[{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"TypeReference","id":0,"typeName":"QueryOpt"}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},"jsDoc":{"doc":"Get a list of all game objs with certain properties.","tags":{"since":["v3001.0"]}}}],"children":[{"kind":"PropertySignature","id":0,"name":"children","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},"jsDoc":{"doc":"Get all children game objects.","tags":{"since":["v3000.0"]}}}],"tags":[{"kind":"PropertySignature","id":0,"name":"tags","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},"jsDoc":{"doc":"Get the tags of a game object.","tags":{"since":["v3001.0"]}}}],"fixedUpdate":[{"kind":"MethodSignature","id":0,"name":"fixedUpdate","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Update this game object and all children game objects.","tags":{"since":["v3001.0"]}}}],"update":[{"kind":"MethodSignature","id":0,"name":"update","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Update this game object and all children game objects.","tags":{"since":["v3000.0"]}}}],"draw":[{"kind":"MethodSignature","id":0,"name":"draw","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw this game object and all children game objects.","tags":{"since":["v3000.0"]}}}],"drawInspect":[{"kind":"PropertySignature","id":0,"name":"drawInspect","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"jsDoc":{"doc":"Draw debug info in inspect mode","tags":{"since":["v3000.0"]}}}],"clearEvents":[{"kind":"PropertySignature","id":0,"name":"clearEvents","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"is":[{"kind":"MethodSignature","id":0,"name":"is","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Tag"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Tag"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If there's certain tag(s) on the game obj.","tags":{}}}],"use":[{"kind":"MethodSignature","id":0,"name":"use","parameters":[{"kind":"Parameter","id":0,"name":"comp","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Comp"},{"kind":"TypeReference","id":0,"typeName":"Tag"}]}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Add a component or tag.","tags":{}}}],"unuse":[{"kind":"MethodSignature","id":0,"name":"unuse","parameters":[{"kind":"Parameter","id":0,"name":"comp","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove a tag or a component with its id.","tags":{}}}],"on":[{"kind":"MethodSignature","id":0,"name":"on","parameters":[{"kind":"Parameter","id":0,"name":"event","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event.","tags":{}}}],"trigger":[{"kind":"MethodSignature","id":0,"name":"trigger","parameters":[{"kind":"Parameter","id":0,"name":"event","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Trigger an event.","tags":{}}}],"destroy":[{"kind":"MethodSignature","id":0,"name":"destroy","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove the game obj from scene.","tags":{}}}],"c":[{"kind":"MethodSignature","id":0,"name":"c","parameters":[{"kind":"Parameter","id":0,"name":"id","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Comp"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get state for a specific comp.","tags":{}}}],"inspect":[{"kind":"MethodSignature","id":0,"name":"inspect","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"GameObjInspect"},"jsDoc":{"doc":"Gather debug info of all comps.","tags":{}}}],"onAdd":[{"kind":"MethodSignature","id":0,"name":"onAdd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the game obj is added to the scene.","tags":{}}}],"onUpdate":[{"kind":"MethodSignature","id":0,"name":"onUpdate","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame as long as the game obj exists.","tags":{"since":["v2000.1"]}}}],"onDraw":[{"kind":"MethodSignature","id":0,"name":"onDraw","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame as long as the game obj exists (this is the same as `onUpdate()`, but all draw events are run after all update events).","tags":{"since":["v2000.1"]}}}],"onDestroy":[{"kind":"MethodSignature","id":0,"name":"onDestroy","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the game obj is destroyed.","tags":{"since":["v2000.1"]}}}],"exists":[{"kind":"MethodSignature","id":0,"name":"exists","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If game obj is attached to the scene graph.","tags":{}}}],"isAncestorOf":[{"kind":"MethodSignature","id":0,"name":"isAncestorOf","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if is an ancestor (recursive parent) of another game object","tags":{"since":["v3000.0"]}}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"},"jsDoc":{"doc":"Calculated transform matrix of a game object.","tags":{"since":["v3000.0"]}}}],"hidden":[{"kind":"PropertySignature","id":0,"name":"hidden","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If draw the game obj (run \"draw\" event or not).","tags":{}}}],"paused":[{"kind":"PropertySignature","id":0,"name":"paused","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If update the game obj (run \"update\" event or not).","tags":{}}}],"id":[{"kind":"PropertySignature","id":0,"name":"id","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObjID"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"A unique number ID for each game object.","tags":{}}}],"canvas":[{"kind":"PropertySignature","id":0,"name":"canvas","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"FrameBuffer"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"The canvas to draw this game object on","tags":{"since":["v3001.0"]}}}],"onKeyDown":[{"kind":"PropertySignature","id":0,"name":"onKeyDown","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onKeyDown","hasExtendedUnicodeEscape":false}}}}],"onKeyPress":[{"kind":"PropertySignature","id":0,"name":"onKeyPress","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onKeyPress","hasExtendedUnicodeEscape":false}}}}],"onKeyPressRepeat":[{"kind":"PropertySignature","id":0,"name":"onKeyPressRepeat","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onKeyPressRepeat","hasExtendedUnicodeEscape":false}}}}],"onKeyRelease":[{"kind":"PropertySignature","id":0,"name":"onKeyRelease","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onKeyRelease","hasExtendedUnicodeEscape":false}}}}],"onCharInput":[{"kind":"PropertySignature","id":0,"name":"onCharInput","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onCharInput","hasExtendedUnicodeEscape":false}}}}],"onMouseDown":[{"kind":"PropertySignature","id":0,"name":"onMouseDown","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onMouseDown","hasExtendedUnicodeEscape":false}}}}],"onMousePress":[{"kind":"PropertySignature","id":0,"name":"onMousePress","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onMousePress","hasExtendedUnicodeEscape":false}}}}],"onMouseRelease":[{"kind":"PropertySignature","id":0,"name":"onMouseRelease","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onMouseRelease","hasExtendedUnicodeEscape":false}}}}],"onMouseMove":[{"kind":"PropertySignature","id":0,"name":"onMouseMove","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onMouseMove","hasExtendedUnicodeEscape":false}}}}],"onTouchStart":[{"kind":"PropertySignature","id":0,"name":"onTouchStart","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onTouchStart","hasExtendedUnicodeEscape":false}}}}],"onTouchMove":[{"kind":"PropertySignature","id":0,"name":"onTouchMove","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onTouchMove","hasExtendedUnicodeEscape":false}}}}],"onTouchEnd":[{"kind":"PropertySignature","id":0,"name":"onTouchEnd","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onTouchEnd","hasExtendedUnicodeEscape":false}}}}],"onScroll":[{"kind":"PropertySignature","id":0,"name":"onScroll","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onScroll","hasExtendedUnicodeEscape":false}}}}],"onGamepadButtonDown":[{"kind":"PropertySignature","id":0,"name":"onGamepadButtonDown","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onGamepadButtonDown","hasExtendedUnicodeEscape":false}}}}],"onGamepadButtonPress":[{"kind":"PropertySignature","id":0,"name":"onGamepadButtonPress","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onGamepadButtonPress","hasExtendedUnicodeEscape":false}}}}],"onGamepadButtonRelease":[{"kind":"PropertySignature","id":0,"name":"onGamepadButtonRelease","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onGamepadButtonRelease","hasExtendedUnicodeEscape":false}}}}],"onGamepadStick":[{"kind":"PropertySignature","id":0,"name":"onGamepadStick","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onGamepadStick","hasExtendedUnicodeEscape":false}}}}],"onButtonDown":[{"kind":"PropertySignature","id":0,"name":"onButtonDown","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onButtonDown","hasExtendedUnicodeEscape":false}}}}],"onButtonPress":[{"kind":"PropertySignature","id":0,"name":"onButtonPress","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onButtonPress","hasExtendedUnicodeEscape":false}}}}],"onButtonRelease":[{"kind":"PropertySignature","id":0,"name":"onButtonRelease","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onButtonRelease","hasExtendedUnicodeEscape":false}}}}]},"jsDoc":{"doc":"Base interface of all game objects.","tags":{"group":["Game Obj"]}}}],"GameObj":[{"kind":"TypeAliasDeclaration","id":0,"name":"GameObj","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","default":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObjRaw"},{"kind":"TypeReference","id":0,"typeName":"MergeComps","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}]},"jsDoc":{"doc":"The basic unit of object in KAPLAY. The player, a butterfly, a tree, or even a piece of text.","tags":{"group":["Game Obj"]}}}],"GetOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"GetOpt","type":{"kind":"TypeLiteral","id":0,"members":{"recursive":[{"kind":"PropertySignature","id":0,"name":"recursive","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Recursively get all children and their descendents.","tags":{}}}],"liveUpdate":[{"kind":"PropertySignature","id":0,"name":"liveUpdate","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Live update the returned list every time object is added / removed.","tags":{}}}]}},"jsDoc":{"tags":{"group":["Options"]}}}],"QueryOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"QueryOpt","type":{"kind":"TypeLiteral","id":0,"members":{"include":[{"kind":"PropertySignature","id":0,"name":"include","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}]},"questionToken":true,"jsDoc":{"doc":"All objects which include all or any of these tags, depending on includeOp.","tags":{}}}],"includeOp":[{"kind":"PropertySignature","id":0,"name":"includeOp","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"and","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"or","hasExtendedUnicodeEscape":false}}]},"questionToken":true,"jsDoc":{"doc":"Selects the operator to use. Defaults to and.","tags":{}}}],"exclude":[{"kind":"PropertySignature","id":0,"name":"exclude","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}]},"questionToken":true,"jsDoc":{"doc":"All objects which do not have all or any of these tags, depending on excludeOp.","tags":{}}}],"excludeOp":[{"kind":"PropertySignature","id":0,"name":"excludeOp","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"and","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"or","hasExtendedUnicodeEscape":false}}]},"questionToken":true,"jsDoc":{"doc":"Selects the operator to use. Defaults to and.","tags":{}}}],"distance":[{"kind":"PropertySignature","id":0,"name":"distance","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"All objects which are near or far to the position of this, depending on distanceOp.","tags":{}}}],"distanceOp":[{"kind":"PropertySignature","id":0,"name":"distanceOp","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"near","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"far","hasExtendedUnicodeEscape":false}}]},"questionToken":true,"jsDoc":{"doc":"Selects the operator to use. Defaults to near.","tags":{}}}],"visible":[{"kind":"PropertySignature","id":0,"name":"visible","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"All objects visible from this standpoint.","tags":{}}}],"hierarchy":[{"kind":"PropertySignature","id":0,"name":"hierarchy","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"children","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"siblings","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ancestors","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"descendants","hasExtendedUnicodeEscape":false}}]},"questionToken":true,"jsDoc":{"doc":"All objects in the given group. Defaults to children.","tags":{}}}]}},"jsDoc":{"tags":{"group":["Options"]}}}],"Recording":[{"kind":"InterfaceDeclaration","id":0,"name":"Recording","members":{"pause":[{"kind":"MethodSignature","id":0,"name":"pause","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Pause the recording.","tags":{}}}],"resume":[{"kind":"MethodSignature","id":0,"name":"resume","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Resume the recording.","tags":{}}}],"stop":[{"kind":"MethodSignature","id":0,"name":"stop","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Blob"}]},"jsDoc":{"doc":"Stop the recording and get the video data as mp4 Blob.","tags":{"since":["v3000.0"]}}}],"download":[{"kind":"MethodSignature","id":0,"name":"download","parameters":[{"kind":"Parameter","id":0,"name":"filename","questionToken":true,"type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Stop the recording and downloads the file as mp4. Trying to resume later will lead to error.","tags":{}}}]},"jsDoc":{"doc":"Screen recording control handle.","tags":{"group":["Data"]}}}],"SpriteAnimPlayOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"SpriteAnimPlayOpt","members":{"loop":[{"kind":"PropertySignature","id":0,"name":"loop","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If this anim should be played in loop.","tags":{}}}],"pingpong":[{"kind":"PropertySignature","id":0,"name":"pingpong","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"When looping should it move back instead of go to start frame again.","tags":{}}}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"This anim's speed in frames per second.","tags":{}}}],"onEnd":[{"kind":"PropertySignature","id":0,"name":"onEnd","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Runs when this animation ends.","tags":{}}}]},"jsDoc":{"doc":"Sprite animation configuration when playing.","tags":{}}}],"MusicData":[{"kind":"TypeAliasDeclaration","id":0,"name":"MusicData","type":{"kind":"StringKeyword","id":0}}],"LoadFontOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"LoadFontOpt","members":{"filter":[{"kind":"PropertySignature","id":0,"name":"filter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}],"outline":[{"kind":"PropertySignature","id":0,"name":"outline","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Outline"}]},"questionToken":true}],"size":[{"kind":"PropertySignature","id":0,"name":"size","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The size to load the font in (default 64).","tags":{"since":["v3001.0"]}}}]}}],"TextureOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"TextureOpt","type":{"kind":"TypeLiteral","id":0,"members":{"filter":[{"kind":"PropertySignature","id":0,"name":"filter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}],"wrap":[{"kind":"PropertySignature","id":0,"name":"wrap","type":{"kind":"TypeReference","id":0,"typeName":"TexWrap"},"questionToken":true}]}}}],"ImageSource":[{"kind":"TypeAliasDeclaration","id":0,"name":"ImageSource","type":{"kind":"TypeReference","id":0,"typeName":"Exclude","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TexImageSource"},{"kind":"TypeReference","id":0,"typeName":"VideoFrame"}]}}],"Canvas":[{"kind":"TypeAliasDeclaration","id":0,"name":"Canvas","type":{"kind":"TypeLiteral","id":0,"members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"toImageData":[{"kind":"MethodSignature","id":0,"name":"toImageData","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"ImageData"}}],"toDataURL":[{"kind":"MethodSignature","id":0,"name":"toDataURL","parameters":[],"type":{"kind":"StringKeyword","id":0}}],"clear":[{"kind":"MethodSignature","id":0,"name":"clear","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"draw":[{"kind":"MethodSignature","id":0,"name":"draw","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}],"free":[{"kind":"MethodSignature","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]}}}],"Vertex":[{"kind":"InterfaceDeclaration","id":0,"name":"Vertex","members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"uv":[{"kind":"PropertySignature","id":0,"name":"uv","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"color":[{"kind":"PropertySignature","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0}}]}}],"TexFilter":[{"kind":"TypeAliasDeclaration","id":0,"name":"TexFilter","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"nearest","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"linear","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"Texture scaling filter. \"nearest\" is mainly for sharp pixelated scaling, \"linear\" means linear interpolation.","tags":{}}}],"TexWrap":[{"kind":"TypeAliasDeclaration","id":0,"name":"TexWrap","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"repeat","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"clampToEdge","hasExtendedUnicodeEscape":false}}]}}],"RenderProps":[{"kind":"InterfaceDeclaration","id":0,"name":"RenderProps","members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"color":[{"kind":"PropertySignature","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"questionToken":true}],"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"fixed":[{"kind":"PropertySignature","id":0,"name":"fixed","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"shader":[{"kind":"PropertySignature","id":0,"name":"shader","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"ShaderData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"ShaderData"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"questionToken":true}],"uniform":[{"kind":"PropertySignature","id":0,"name":"uniform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Uniform"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"questionToken":true}],"outline":[{"kind":"PropertySignature","id":0,"name":"outline","type":{"kind":"TypeReference","id":0,"typeName":"Outline"},"questionToken":true}]},"jsDoc":{"doc":"Common render properties.","tags":{}}}],"DrawTextureOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawTextureOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"tex":[{"kind":"PropertySignature","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"tiled":[{"kind":"PropertySignature","id":0,"name":"tiled","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"flipX":[{"kind":"PropertySignature","id":0,"name":"flipX","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"flipY":[{"kind":"PropertySignature","id":0,"name":"flipY","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"quad":[{"kind":"PropertySignature","id":0,"name":"quad","type":{"kind":"TypeReference","id":0,"typeName":"Quad"},"questionToken":true}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true}]}}]}}],"DrawUVQuadOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawUVQuadOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width of the UV quad.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height of the UV quad.","tags":{}}}],"flipX":[{"kind":"PropertySignature","id":0,"name":"flipX","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If flip the texture horizontally.","tags":{}}}],"flipY":[{"kind":"PropertySignature","id":0,"name":"flipY","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If flip the texture vertically.","tags":{}}}],"tex":[{"kind":"PropertySignature","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"},"questionToken":true,"jsDoc":{"doc":"The texture to sample for this quad.","tags":{}}}],"quad":[{"kind":"PropertySignature","id":0,"name":"quad","type":{"kind":"TypeReference","id":0,"typeName":"Quad"},"questionToken":true,"jsDoc":{"doc":"The texture sampling area.","tags":{}}}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"The anchor point, or the pivot point. Default to \"topleft\".","tags":{}}}]}}]}}],"DrawEllipseOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawEllipseOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"radiusX":[{"kind":"PropertySignature","id":0,"name":"radiusX","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The horizontal radius.","tags":{}}}],"radiusY":[{"kind":"PropertySignature","id":0,"name":"radiusY","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The vertical radius.","tags":{}}}],"start":[{"kind":"PropertySignature","id":0,"name":"start","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Starting angle.","tags":{}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the shape with color (set this to false if you only want an outline).","tags":{}}}],"gradient":[{"kind":"PropertySignature","id":0,"name":"gradient","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"TypeReference","id":0,"typeName":"Color"}]},"questionToken":true,"jsDoc":{"doc":"Use gradient instead of solid color.","tags":{"since":["v3000.0"]}}}],"resolution":[{"kind":"PropertySignature","id":0,"name":"resolution","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Multiplier for circle vertices resolution (default 1)","tags":{}}}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"The anchor point, or the pivot point. Default to \"topleft\".","tags":{}}}]}}]},"jsDoc":{"doc":"How the ellipse should look like.","tags":{}}}],"DrawPolygonOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawPolygonOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"pts":[{"kind":"PropertySignature","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"The points that make up the polygon","tags":{}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the shape with color (set this to false if you only want an outline).","tags":{}}}],"indices":[{"kind":"PropertySignature","id":0,"name":"indices","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Manual triangulation.","tags":{}}}],"offset":[{"kind":"PropertySignature","id":0,"name":"offset","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true,"jsDoc":{"doc":"The center point of transformation in relation to the position.","tags":{}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}]},"questionToken":true,"jsDoc":{"doc":"The radius of each corner.","tags":{}}}],"colors":[{"kind":"PropertySignature","id":0,"name":"colors","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Color"}},"questionToken":true,"jsDoc":{"doc":"The color of each vertex.","tags":{"since":["v3000.0"]}}}],"uv":[{"kind":"PropertySignature","id":0,"name":"uv","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"questionToken":true,"jsDoc":{"doc":"The uv of each vertex.","tags":{"since":["v3001.0"]}}}],"tex":[{"kind":"PropertySignature","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"},"questionToken":true,"jsDoc":{"doc":"The texture if uv are supplied.","tags":{"since":["v3001.0"]}}}],"triangulate":[{"kind":"PropertySignature","id":0,"name":"triangulate","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Triangulate concave polygons.","tags":{"since":["v3001.0"]}}}]}}]},"jsDoc":{"doc":"How the polygon should look like.","tags":{}}}],"Outline":[{"kind":"InterfaceDeclaration","id":0,"name":"Outline","members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The width, or thinkness of the line.","tags":{}}}],"color":[{"kind":"PropertySignature","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"questionToken":true,"jsDoc":{"doc":"The color of the line.","tags":{}}}],"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Opacity (overrides fill opacity).","tags":{"since":["v3001.0"]}}}],"join":[{"kind":"PropertySignature","id":0,"name":"join","type":{"kind":"TypeReference","id":0,"typeName":"LineJoin"},"questionToken":true,"jsDoc":{"doc":"Line join.","tags":{"since":["v3000.0"]}}}],"miterLimit":[{"kind":"PropertySignature","id":0,"name":"miterLimit","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Miter limit. If the length of the miter divided by the line width exceeds this limit, the style is converted to a bevel.","tags":{"since":["v3001.0"]}}}],"cap":[{"kind":"PropertySignature","id":0,"name":"cap","type":{"kind":"TypeReference","id":0,"typeName":"LineCap"},"questionToken":true,"jsDoc":{"doc":"Line cap.","tags":{"since":["v3001.0"]}}}]}}],"Cursor":[{"kind":"TypeAliasDeclaration","id":0,"name":"Cursor","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"auto","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"default","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"none","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"context-menu","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"help","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"pointer","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"progress","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"wait","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"cell","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"crosshair","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"text","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"vertical-text","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"alias","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"copy","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"move","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"no-drop","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"not-allowed","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"grab","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"grabbing","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"all-scroll","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"col-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"row-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"n-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"e-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"s-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"w-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ne-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"nw-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"se-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"sw-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ew-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ns-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"nesw-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"nwse-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"zoom-int","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"zoom-out","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"tags":{"group":["Draw"]}}}],"Anchor":[{"kind":"TypeAliasDeclaration","id":0,"name":"Anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"topleft","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"top","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"topright","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"center","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"right","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"botleft","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"bot","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"botright","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"tags":{"group":["Draw"]}}}],"LerpValue":[{"kind":"TypeAliasDeclaration","id":0,"name":"LerpValue","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Color"}]},"jsDoc":{"tags":{"group":["Math"]}}}],"RNGValue":[{"kind":"TypeAliasDeclaration","id":0,"name":"RNGValue","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Color"}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Comp":[{"kind":"InterfaceDeclaration","id":0,"name":"Comp","members":{"id":[{"kind":"PropertySignature","id":0,"name":"id","type":{"kind":"TypeReference","id":0,"typeName":"Tag"},"questionToken":true,"jsDoc":{"doc":"Component ID (if left out won't be treated as a comp).","tags":{}}}],"require":[{"kind":"PropertySignature","id":0,"name":"require","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Tag"}},"questionToken":true,"jsDoc":{"doc":"What other comps this comp depends on.","tags":{}}}],"add":[{"kind":"PropertySignature","id":0,"name":"add","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Event that runs when host game obj is added to scene.","tags":{}}}],"fixedUpdate":[{"kind":"PropertySignature","id":0,"name":"fixedUpdate","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Event that runs at a fixed frame rate.","tags":{}}}],"update":[{"kind":"PropertySignature","id":0,"name":"update","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Event that runs every frame.","tags":{}}}],"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Event that runs every frame after update.","tags":{}}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Event that runs when obj is removed from scene.","tags":{}}}],"inspect":[{"kind":"PropertySignature","id":0,"name":"inspect","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},"questionToken":true,"jsDoc":{"doc":"Debug info for inspect mode.","tags":{}}}],"drawInspect":[{"kind":"PropertySignature","id":0,"name":"drawInspect","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Draw debug info in inspect mode","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"tags":{"group":["Components"]}}}],"GameObjID":[{"kind":"TypeAliasDeclaration","id":0,"name":"GameObjID","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"tags":{"group":["Game Obj"]}}}],"EmptyComp":[{"kind":"TypeAliasDeclaration","id":0,"name":"EmptyComp","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeLiteral","id":0,"members":{"id":[{"kind":"PropertySignature","id":0,"name":"id","type":{"kind":"StringKeyword","id":0}}]}},{"kind":"TypeReference","id":0,"typeName":"Comp"}]},"jsDoc":{"doc":"A component without own properties.","tags":{"group":["Component Types"]}}}],"Collision":[{"kind":"InterfaceDeclaration","id":0,"name":"Collision","members":{"source":[{"kind":"PropertySignature","id":0,"name":"source","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"},"jsDoc":{"doc":"The first game object in the collision.","tags":{}}}],"target":[{"kind":"PropertySignature","id":0,"name":"target","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"},"jsDoc":{"doc":"The second game object in the collision.","tags":{}}}],"normal":[{"kind":"PropertySignature","id":0,"name":"normal","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The contact normal.","tags":{}}}],"distance":[{"kind":"PropertySignature","id":0,"name":"distance","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The length of the displacement.","tags":{}}}],"displacement":[{"kind":"PropertySignature","id":0,"name":"displacement","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The displacement source game object have to make to avoid the collision.","tags":{}}}],"resolved":[{"kind":"PropertySignature","id":0,"name":"resolved","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the collision is resolved.","tags":{}}}],"preventResolution":[{"kind":"MethodSignature","id":0,"name":"preventResolution","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Prevent collision resolution if not yet resolved.","tags":{"since":["v3000.0"]}}}],"hasOverlap":[{"kind":"MethodSignature","id":0,"name":"hasOverlap","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the 2 objects have any overlap, or they're just touching edges.","tags":{"since":["v3000.0"]}}}],"reverse":[{"kind":"MethodSignature","id":0,"name":"reverse","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Collision"},"jsDoc":{"doc":"Get a new collision with reversed source and target relationship.","tags":{}}}],"isTop":[{"kind":"MethodSignature","id":0,"name":"isTop","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the collision happened (roughly) on the top side.","tags":{}}}],"isBottom":[{"kind":"MethodSignature","id":0,"name":"isBottom","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the collision happened (roughly) on the bottom side.","tags":{}}}],"isLeft":[{"kind":"MethodSignature","id":0,"name":"isLeft","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the collision happened (roughly) on the left side.","tags":{}}}],"isRight":[{"kind":"MethodSignature","id":0,"name":"isRight","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the collision happened (roughly) on the right side.","tags":{}}}]},"jsDoc":{"doc":"Collision resolution data.","tags":{"group":["Math"]}}}],"Shape":[{"kind":"TypeAliasDeclaration","id":0,"name":"Shape","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Rect"},{"kind":"TypeReference","id":0,"typeName":"Line"},{"kind":"TypeReference","id":0,"typeName":"Point"},{"kind":"TypeReference","id":0,"typeName":"Circle"},{"kind":"TypeReference","id":0,"typeName":"Ellipse"},{"kind":"TypeReference","id":0,"typeName":"Polygon"}]},"jsDoc":{"tags":{"group":["Draw"]}}}],"Debug":[{"kind":"InterfaceDeclaration","id":0,"name":"Debug","members":{"paused":[{"kind":"PropertySignature","id":0,"name":"paused","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Pause the whole game.","tags":{}}}],"inspect":[{"kind":"PropertySignature","id":0,"name":"inspect","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Draw bounding boxes of all objects with `area()` component, hover to inspect their states.","tags":{}}}],"timeScale":[{"kind":"PropertySignature","id":0,"name":"timeScale","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Global time scale.","tags":{}}}],"showLog":[{"kind":"PropertySignature","id":0,"name":"showLog","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Show the debug log or not.","tags":{}}}],"fps":[{"kind":"MethodSignature","id":0,"name":"fps","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Current frames per second.","tags":{}}}],"numFrames":[{"kind":"MethodSignature","id":0,"name":"numFrames","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Total number of frames elapsed.","tags":{"since":["v3000.0"]}}}],"drawCalls":[{"kind":"MethodSignature","id":0,"name":"drawCalls","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Number of draw calls made last frame.","tags":{}}}],"stepFrame":[{"kind":"MethodSignature","id":0,"name":"stepFrame","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Step to the next frame. Useful with pausing.","tags":{}}}],"clearLog":[{"kind":"MethodSignature","id":0,"name":"clearLog","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Clear the debug log.","tags":{}}}],"log":[{"kind":"MethodSignature","id":0,"name":"log","parameters":[{"kind":"Parameter","id":0,"name":"msg","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{}}]}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Log some text to on screen debug log.","tags":{}}}],"error":[{"kind":"MethodSignature","id":0,"name":"error","parameters":[{"kind":"Parameter","id":0,"name":"msg","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{}}]}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Log an error message to on screen debug log.","tags":{}}}],"curRecording":[{"kind":"PropertySignature","id":0,"name":"curRecording","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Recording"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"The recording handle if currently in recording mode.","tags":{"since":["v2000.1"]}}}],"numObjects":[{"kind":"MethodSignature","id":0,"name":"numObjects","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get total number of objects.","tags":{"since":["v3001.0"]}}}]},"jsDoc":{"tags":{"group":["Debug"]}}}],"Mask":[{"kind":"TypeAliasDeclaration","id":0,"name":"Mask","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"intersect","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"subtract","hasExtendedUnicodeEscape":false}}]}}],"Edge":[{"kind":"TypeAliasDeclaration","id":0,"name":"Edge","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"right","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"top","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"bottom","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"EdgeMask":[{"kind":"EnumDeclaration","id":0,"name":"EdgeMask","members":{"None":[{"kind":"EnumMember","id":0,"name":"None","initializer":{"kind":"FirstLiteralToken","id":0,"text":"0","numericLiteralFlags":0}}],"Left":[{"kind":"EnumMember","id":0,"name":"Left","initializer":{"kind":"FirstLiteralToken","id":0,"text":"1","numericLiteralFlags":0}}],"Top":[{"kind":"EnumMember","id":0,"name":"Top","initializer":{"kind":"FirstLiteralToken","id":0,"text":"2","numericLiteralFlags":0}}],"LeftTop":[{"kind":"EnumMember","id":0,"name":"LeftTop","initializer":{"kind":"FirstLiteralToken","id":0,"text":"3","numericLiteralFlags":0}}],"Right":[{"kind":"EnumMember","id":0,"name":"Right","initializer":{"kind":"FirstLiteralToken","id":0,"text":"4","numericLiteralFlags":0}}],"Horizontal":[{"kind":"EnumMember","id":0,"name":"Horizontal","initializer":{"kind":"FirstLiteralToken","id":0,"text":"5","numericLiteralFlags":0}}],"RightTop":[{"kind":"EnumMember","id":0,"name":"RightTop","initializer":{"kind":"FirstLiteralToken","id":0,"text":"6","numericLiteralFlags":0}}],"HorizontalTop":[{"kind":"EnumMember","id":0,"name":"HorizontalTop","initializer":{"kind":"FirstLiteralToken","id":0,"text":"7","numericLiteralFlags":0}}],"Bottom":[{"kind":"EnumMember","id":0,"name":"Bottom","initializer":{"kind":"FirstLiteralToken","id":0,"text":"8","numericLiteralFlags":0}}],"LeftBottom":[{"kind":"EnumMember","id":0,"name":"LeftBottom","initializer":{"kind":"FirstLiteralToken","id":0,"text":"9","numericLiteralFlags":0}}],"Vertical":[{"kind":"EnumMember","id":0,"name":"Vertical","initializer":{"kind":"FirstLiteralToken","id":0,"text":"10","numericLiteralFlags":0}}],"LeftVertical":[{"kind":"EnumMember","id":0,"name":"LeftVertical","initializer":{"kind":"FirstLiteralToken","id":0,"text":"11","numericLiteralFlags":0}}],"RightBottom":[{"kind":"EnumMember","id":0,"name":"RightBottom","initializer":{"kind":"FirstLiteralToken","id":0,"text":"12","numericLiteralFlags":0}}],"HorizontalBottom":[{"kind":"EnumMember","id":0,"name":"HorizontalBottom","initializer":{"kind":"FirstLiteralToken","id":0,"text":"13","numericLiteralFlags":0}}],"RightVertical":[{"kind":"EnumMember","id":0,"name":"RightVertical","initializer":{"kind":"FirstLiteralToken","id":0,"text":"14","numericLiteralFlags":0}}],"All":[{"kind":"EnumMember","id":0,"name":"All","initializer":{"kind":"FirstLiteralToken","id":0,"text":"15","numericLiteralFlags":0}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"LevelComp":[{"kind":"InterfaceDeclaration","id":0,"name":"LevelComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"tileWidth":[{"kind":"MethodSignature","id":0,"name":"tileWidth","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"tileHeight":[{"kind":"MethodSignature","id":0,"name":"tileHeight","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"numRows":[{"kind":"MethodSignature","id":0,"name":"numRows","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"numColumns":[{"kind":"MethodSignature","id":0,"name":"numColumns","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"spawn":[{"kind":"MethodSignature","id":0,"name":"spawn","parameters":[{"kind":"Parameter","id":0,"name":"sym","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObj"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Spawn a tile from a symbol defined previously.","tags":{}}},{"kind":"MethodSignature","id":0,"name":"spawn","parameters":[{"kind":"Parameter","id":0,"name":"sym","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObj"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"MethodSignature","id":0,"name":"spawn","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Spawn a tile from a component list.","tags":{"returns":["The spawned game object, or null if the obj hasn't components."]}}},{"kind":"MethodSignature","id":0,"name":"spawn","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"sym","type":{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}},{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"levelWidth":[{"kind":"MethodSignature","id":0,"name":"levelWidth","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Total width of level in pixels.","tags":{}}}],"levelHeight":[{"kind":"MethodSignature","id":0,"name":"levelHeight","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Total height of level in pixels.","tags":{}}}],"getAt":[{"kind":"MethodSignature","id":0,"name":"getAt","parameters":[{"kind":"Parameter","id":0,"name":"tilePos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},"jsDoc":{"doc":"Get all game objects that's currently inside a given tile.","tags":{}}}],"raycast":[{"kind":"MethodSignature","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"},"jsDoc":{"doc":"Raycast all game objects on the given path.","tags":{}}}],"tile2Pos":[{"kind":"MethodSignature","id":0,"name":"tile2Pos","parameters":[{"kind":"Parameter","id":0,"name":"tilePos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Convert tile position to pixel position.","tags":{}}},{"kind":"MethodSignature","id":0,"name":"tile2Pos","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"pos2Tile":[{"kind":"MethodSignature","id":0,"name":"pos2Tile","parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Convert pixel position to tile position.","tags":{}}},{"kind":"MethodSignature","id":0,"name":"pos2Tile","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"getTilePath":[{"kind":"MethodSignature","id":0,"name":"getTilePath","parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"opts","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"PathFindOpt"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Find the path to navigate from one tile to another tile.","tags":{"returns":["A list of traverse points in tile positions."]}}}],"getPath":[{"kind":"MethodSignature","id":0,"name":"getPath","parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"opts","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"PathFindOpt"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Find the path to navigate from one tile to another tile.","tags":{"returns":["A list of traverse points in pixel positions."]}}}],"getSpatialMap":[{"kind":"MethodSignature","id":0,"name":"getSpatialMap","parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}}}],"onSpatialMapChanged":[{"kind":"MethodSignature","id":0,"name":"onSpatialMapChanged","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onNavigationMapInvalid":[{"kind":"MethodSignature","id":0,"name":"onNavigationMapInvalid","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"invalidateNavigationMap":[{"kind":"MethodSignature","id":0,"name":"invalidateNavigationMap","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"onNavigationMapChanged":[{"kind":"MethodSignature","id":0,"name":"onNavigationMapChanged","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}]},"jsDoc":{"doc":"A level component.","tags":{"group":["Component Types"]}}}],"PathFindOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"PathFindOpt","type":{"kind":"TypeLiteral","id":0,"members":{"allowDiagonals":[{"kind":"PropertySignature","id":0,"name":"allowDiagonals","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}]}},"jsDoc":{"tags":{"group":["Options"]}}}],"EaseFuncs":[{"kind":"TypeAliasDeclaration","id":0,"name":"EaseFuncs","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"linear","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInSine","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutSine","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutSine","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInQuad","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutQuad","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutQuad","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInCubic","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutCubic","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutCubic","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInQuart","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutQuart","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutQuart","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInQuint","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutQuint","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutQuint","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInExpo","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutExpo","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutExpo","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInCirc","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutCirc","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutCirc","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInBack","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutBack","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutBack","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInElastic","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutElastic","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutElastic","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInBounce","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutBounce","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutBounce","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"The list of easing functions available.","tags":{"group":["Math"]}}}],"EaseFunc":[{"kind":"TypeAliasDeclaration","id":0,"name":"EaseFunc","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}},"jsDoc":{"doc":"A function that takes a time value and returns a new time value.","tags":{"group":["Math"]}}}],"TimerController":[{"kind":"TypeAliasDeclaration","id":0,"name":"TimerController","type":{"kind":"TypeLiteral","id":0,"members":{"paused":[{"kind":"PropertySignature","id":0,"name":"paused","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the event handler is paused.","tags":{}}}],"cancel":[{"kind":"MethodSignature","id":0,"name":"cancel","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Cancel the event handler.","tags":{}}}],"onEnd":[{"kind":"MethodSignature","id":0,"name":"onEnd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event when finished.","tags":{}}}],"then":[{"kind":"MethodSignature","id":0,"name":"then","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"TimerController"}}]}},"jsDoc":{"tags":{"group":["Timer"]}}}],"TweenController":[{"kind":"TypeAliasDeclaration","id":0,"name":"TweenController","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TimerController"},{"kind":"TypeLiteral","id":0,"members":{"finish":[{"kind":"MethodSignature","id":0,"name":"finish","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Finish the tween now and cancel.","tags":{}}}]}}]},"jsDoc":{"doc":"Event controller for tween.","tags":{"group":["Timer"]}}}],"SpriteCurAnim":[{"kind":"InterfaceDeclaration","id":0,"name":"SpriteCurAnim","members":{"timer":[{"kind":"PropertySignature","id":0,"name":"timer","type":{"kind":"NumberKeyword","id":0}}],"loop":[{"kind":"PropertySignature","id":0,"name":"loop","type":{"kind":"BooleanKeyword","id":0}}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0}}],"pingpong":[{"kind":"PropertySignature","id":0,"name":"pingpong","type":{"kind":"BooleanKeyword","id":0}}],"onEnd":[{"kind":"PropertySignature","id":0,"name":"onEnd","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}]}}],"ButtonBinding":[{"kind":"TypeAliasDeclaration","id":0,"name":"ButtonBinding","type":{"kind":"TypeLiteral","id":0,"members":{"keyboard":[{"kind":"PropertySignature","id":0,"name":"keyboard","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]},"questionToken":true}],"gamepad":[{"kind":"PropertySignature","id":0,"name":"gamepad","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}]},"questionToken":true}],"mouse":[{"kind":"PropertySignature","id":0,"name":"mouse","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]},"questionToken":true}]}},"jsDoc":{"doc":"A button binding.","tags":{"group":["Button Bindings"]}}}],"ButtonsDef":[{"kind":"TypeAliasDeclaration","id":0,"name":"ButtonsDef","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"ButtonBinding"}]},"jsDoc":{"doc":"A buttons definition for an action (jump, walk-left, run).","tags":{"group":["Button Bindings"]}}}],"ButtonBindingDevice":[{"kind":"TypeAliasDeclaration","id":0,"name":"ButtonBindingDevice","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"keyboard","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"gamepad","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"mouse","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"A button binding device","tags":{"group":["Button Bindings"]}}}],"initAppGfx":[{"kind":"FunctionDeclaration","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initAppGfx","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"gopt","type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYOpt"}},{"kind":"Parameter","id":0,"name":"ggl","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"type":{"kind":"TypeLiteral","id":0,"members":{"lastDrawCalls":[{"kind":"PropertySignature","id":0,"name":"lastDrawCalls","type":{"kind":"NumberKeyword","id":0}}],"ggl":[{"kind":"PropertySignature","id":0,"name":"ggl","type":{"kind":"TypeLiteral","id":0,"members":{"gl":[{"kind":"PropertySignature","id":0,"name":"gl","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderingContext"}}],"opts":[{"kind":"PropertySignature","id":0,"name":"opts","type":{"kind":"TypeLiteral","id":0,"members":{"texFilter":[{"kind":"PropertySignature","id":0,"name":"texFilter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}]}}}],"onDestroy":[{"kind":"PropertySignature","id":0,"name":"onDestroy","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"UnknownKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushTexture2D":[{"kind":"PropertySignature","id":0,"name":"pushTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLTexture"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popTexture2D":[{"kind":"PropertySignature","id":0,"name":"popTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushFramebuffer":[{"kind":"PropertySignature","id":0,"name":"pushFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLFramebuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popFramebuffer":[{"kind":"PropertySignature","id":0,"name":"popFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"pushRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderbuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"popRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushViewport":[{"kind":"PropertySignature","id":0,"name":"pushViewport","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"w":[{"kind":"PropertySignature","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertySignature","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}]}}}],"type":{"kind":"VoidKeyword","id":0}}}],"popViewport":[{"kind":"PropertySignature","id":0,"name":"popViewport","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushProgram":[{"kind":"PropertySignature","id":0,"name":"pushProgram","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLProgram"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popProgram":[{"kind":"PropertySignature","id":0,"name":"popProgram","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"setVertexFormat":[{"kind":"PropertySignature","id":0,"name":"setVertexFormat","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"fmt","type":{"kind":"TypeReference","id":0,"typeName":"VertexFormat"}}],"type":{"kind":"VoidKeyword","id":0}}}]}}}],"defShader":[{"kind":"PropertySignature","id":0,"name":"defShader","type":{"kind":"TypeReference","id":0,"typeName":"Shader"}}],"defTex":[{"kind":"PropertySignature","id":0,"name":"defTex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"frameBuffer":[{"kind":"PropertySignature","id":0,"name":"frameBuffer","type":{"kind":"TypeReference","id":0,"typeName":"FrameBuffer"}}],"postShader":[{"kind":"PropertySignature","id":0,"name":"postShader","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"postShaderUniform":[{"kind":"PropertySignature","id":0,"name":"postShaderUniform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Uniform"},{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"renderer":[{"kind":"PropertySignature","id":0,"name":"renderer","type":{"kind":"TypeReference","id":0,"typeName":"BatchRenderer"}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"transformStack":[{"kind":"PropertySignature","id":0,"name":"transformStack","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}}],"bgTex":[{"kind":"PropertySignature","id":0,"name":"bgTex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"bgColor":[{"kind":"PropertySignature","id":0,"name":"bgColor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"bgAlpha":[{"kind":"PropertySignature","id":0,"name":"bgAlpha","type":{"kind":"NumberKeyword","id":0}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"viewport":[{"kind":"PropertySignature","id":0,"name":"viewport","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}]}}}],"fixed":[{"kind":"PropertySignature","id":0,"name":"fixed","type":{"kind":"BooleanKeyword","id":0}}]}}}}]},"name":"initAppGfx","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"gopt","type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYOpt"}},{"kind":"Parameter","id":0,"name":"ggl","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"type":{"kind":"TypeLiteral","id":0,"members":{"lastDrawCalls":[{"kind":"PropertySignature","id":0,"name":"lastDrawCalls","type":{"kind":"NumberKeyword","id":0}}],"ggl":[{"kind":"PropertySignature","id":0,"name":"ggl","type":{"kind":"TypeLiteral","id":0,"members":{"gl":[{"kind":"PropertySignature","id":0,"name":"gl","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderingContext"}}],"opts":[{"kind":"PropertySignature","id":0,"name":"opts","type":{"kind":"TypeLiteral","id":0,"members":{"texFilter":[{"kind":"PropertySignature","id":0,"name":"texFilter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}]}}}],"onDestroy":[{"kind":"PropertySignature","id":0,"name":"onDestroy","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"UnknownKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushTexture2D":[{"kind":"PropertySignature","id":0,"name":"pushTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLTexture"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popTexture2D":[{"kind":"PropertySignature","id":0,"name":"popTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushFramebuffer":[{"kind":"PropertySignature","id":0,"name":"pushFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLFramebuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popFramebuffer":[{"kind":"PropertySignature","id":0,"name":"popFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"pushRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderbuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"popRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushViewport":[{"kind":"PropertySignature","id":0,"name":"pushViewport","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"w":[{"kind":"PropertySignature","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertySignature","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}]}}}],"type":{"kind":"VoidKeyword","id":0}}}],"popViewport":[{"kind":"PropertySignature","id":0,"name":"popViewport","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushProgram":[{"kind":"PropertySignature","id":0,"name":"pushProgram","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLProgram"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popProgram":[{"kind":"PropertySignature","id":0,"name":"popProgram","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"setVertexFormat":[{"kind":"PropertySignature","id":0,"name":"setVertexFormat","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"fmt","type":{"kind":"TypeReference","id":0,"typeName":"VertexFormat"}}],"type":{"kind":"VoidKeyword","id":0}}}]}}}],"defShader":[{"kind":"PropertySignature","id":0,"name":"defShader","type":{"kind":"TypeReference","id":0,"typeName":"Shader"}}],"defTex":[{"kind":"PropertySignature","id":0,"name":"defTex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"frameBuffer":[{"kind":"PropertySignature","id":0,"name":"frameBuffer","type":{"kind":"TypeReference","id":0,"typeName":"FrameBuffer"}}],"postShader":[{"kind":"PropertySignature","id":0,"name":"postShader","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"postShaderUniform":[{"kind":"PropertySignature","id":0,"name":"postShaderUniform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Uniform"},{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"renderer":[{"kind":"PropertySignature","id":0,"name":"renderer","type":{"kind":"TypeReference","id":0,"typeName":"BatchRenderer"}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"transformStack":[{"kind":"PropertySignature","id":0,"name":"transformStack","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}}],"bgTex":[{"kind":"PropertySignature","id":0,"name":"bgTex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"bgColor":[{"kind":"PropertySignature","id":0,"name":"bgColor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"bgAlpha":[{"kind":"PropertySignature","id":0,"name":"bgAlpha","type":{"kind":"NumberKeyword","id":0}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"viewport":[{"kind":"PropertySignature","id":0,"name":"viewport","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}]}}}],"fixed":[{"kind":"PropertySignature","id":0,"name":"fixed","type":{"kind":"BooleanKeyword","id":0}}]}}}}],"initAssets":[{"kind":"FunctionDeclaration","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initAssets","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"ggl","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"type":{"kind":"TypeLiteral","id":0,"members":{"urlPrefix":[{"kind":"PropertySignature","id":0,"name":"urlPrefix","type":{"kind":"StringKeyword","id":0}}],"sprites":[{"kind":"PropertySignature","id":0,"name":"sprites","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}}],"fonts":[{"kind":"PropertySignature","id":0,"name":"fonts","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"FontData"}]}}],"bitmapFonts":[{"kind":"PropertySignature","id":0,"name":"bitmapFonts","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GfxFont"}]}}],"sounds":[{"kind":"PropertySignature","id":0,"name":"sounds","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]}}],"shaders":[{"kind":"PropertySignature","id":0,"name":"shaders","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Shader"}]}}],"custom":[{"kind":"PropertySignature","id":0,"name":"custom","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"AnyKeyword","id":0}]}}],"music":[{"kind":"PropertySignature","id":0,"name":"music","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"StringKeyword","id":0}]}}],"packer":[{"kind":"PropertySignature","id":0,"name":"packer","type":{"kind":"TypeReference","id":0,"typeName":"TexPacker"}}],"loaded":[{"kind":"PropertySignature","id":0,"name":"loaded","type":{"kind":"BooleanKeyword","id":0}}]}}}}]},"name":"initAssets","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"ggl","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"type":{"kind":"TypeLiteral","id":0,"members":{"urlPrefix":[{"kind":"PropertySignature","id":0,"name":"urlPrefix","type":{"kind":"StringKeyword","id":0}}],"sprites":[{"kind":"PropertySignature","id":0,"name":"sprites","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}}],"fonts":[{"kind":"PropertySignature","id":0,"name":"fonts","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"FontData"}]}}],"bitmapFonts":[{"kind":"PropertySignature","id":0,"name":"bitmapFonts","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GfxFont"}]}}],"sounds":[{"kind":"PropertySignature","id":0,"name":"sounds","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]}}],"shaders":[{"kind":"PropertySignature","id":0,"name":"shaders","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Shader"}]}}],"custom":[{"kind":"PropertySignature","id":0,"name":"custom","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"AnyKeyword","id":0}]}}],"music":[{"kind":"PropertySignature","id":0,"name":"music","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"StringKeyword","id":0}]}}],"packer":[{"kind":"PropertySignature","id":0,"name":"packer","type":{"kind":"TypeReference","id":0,"typeName":"TexPacker"}}],"loaded":[{"kind":"PropertySignature","id":0,"name":"loaded","type":{"kind":"BooleanKeyword","id":0}}]}}}}],"initAudio":[{"kind":"FunctionDeclaration","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initAudio","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"ctx":[{"kind":"PropertySignature","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"AudioContext"}}],"masterNode":[{"kind":"PropertySignature","id":0,"name":"masterNode","type":{"kind":"TypeReference","id":0,"typeName":"GainNode"}}],"burpSnd":[{"kind":"PropertySignature","id":0,"name":"burpSnd","type":{"kind":"TypeReference","id":0,"typeName":"SoundData"}}]}}}}]},"name":"initAudio","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"ctx":[{"kind":"PropertySignature","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"AudioContext"}}],"masterNode":[{"kind":"PropertySignature","id":0,"name":"masterNode","type":{"kind":"TypeReference","id":0,"typeName":"GainNode"}}],"burpSnd":[{"kind":"PropertySignature","id":0,"name":"burpSnd","type":{"kind":"TypeReference","id":0,"typeName":"SoundData"}}]}}}}],"initGame":[{"kind":"FunctionDeclaration","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initGame","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"events":[{"kind":"PropertySignature","id":0,"name":"events","type":{"kind":"TypeReference","id":0,"typeName":"KEventHandler","typeArguments":[{"kind":"TypeLiteral","id":0,"members":{"mouseMove":[{"kind":"PropertySignature","id":0,"name":"mouseMove","type":{"kind":"TupleType","id":0,"elements":[]}}],"mouseDown":[{"kind":"PropertySignature","id":0,"name":"mouseDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"mousePress":[{"kind":"PropertySignature","id":0,"name":"mousePress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"mouseRelease":[{"kind":"PropertySignature","id":0,"name":"mouseRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"charInput":[{"kind":"PropertySignature","id":0,"name":"charInput","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"keyPress":[{"kind":"PropertySignature","id":0,"name":"keyPress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyDown":[{"kind":"PropertySignature","id":0,"name":"keyDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyPressRepeat":[{"kind":"PropertySignature","id":0,"name":"keyPressRepeat","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyRelease":[{"kind":"PropertySignature","id":0,"name":"keyRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"touchStart":[{"kind":"PropertySignature","id":0,"name":"touchStart","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"touchMove":[{"kind":"PropertySignature","id":0,"name":"touchMove","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"touchEnd":[{"kind":"PropertySignature","id":0,"name":"touchEnd","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"gamepadButtonDown":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadButtonPress":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonPress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadButtonRelease":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadStick":[{"kind":"PropertySignature","id":0,"name":"gamepadStick","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"gamepadConnect":[{"kind":"PropertySignature","id":0,"name":"gamepadConnect","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Gamepad"}]}}],"gamepadDisconnect":[{"kind":"PropertySignature","id":0,"name":"gamepadDisconnect","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Gamepad"}]}}],"scroll":[{"kind":"PropertySignature","id":0,"name":"scroll","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"add":[{"kind":"PropertySignature","id":0,"name":"add","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"GameObj"}]}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"GameObj"}]}}],"load":[{"kind":"PropertySignature","id":0,"name":"load","type":{"kind":"TupleType","id":0,"elements":[]}}],"loading":[{"kind":"PropertySignature","id":0,"name":"loading","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0}]}}],"error":[{"kind":"PropertySignature","id":0,"name":"error","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Error"}]}}],"input":[{"kind":"PropertySignature","id":0,"name":"input","type":{"kind":"TupleType","id":0,"elements":[]}}],"frameEnd":[{"kind":"PropertySignature","id":0,"name":"frameEnd","type":{"kind":"TupleType","id":0,"elements":[]}}],"resize":[{"kind":"PropertySignature","id":0,"name":"resize","type":{"kind":"TupleType","id":0,"elements":[]}}],"sceneLeave":[{"kind":"PropertySignature","id":0,"name":"sceneLeave","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}]}}]}}],"objEvents":[{"kind":"PropertySignature","id":0,"name":"objEvents","type":{"kind":"TypeReference","id":0,"typeName":"KEventHandler","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GameObjEventMap"}]}}],"root":[{"kind":"PropertySignature","id":0,"name":"root","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TimerComp"}]}}],"gravity":[{"kind":"PropertySignature","id":0,"name":"gravity","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"scenes":[{"kind":"PropertySignature","id":0,"name":"scenes","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SceneName"},{"kind":"TypeReference","id":0,"typeName":"SceneDef"}]}}],"currentScene":[{"kind":"PropertySignature","id":0,"name":"currentScene","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"SceneName"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"layers":[{"kind":"PropertySignature","id":0,"name":"layers","type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"defaultLayerIndex":[{"kind":"PropertySignature","id":0,"name":"defaultLayerIndex","type":{"kind":"NumberKeyword","id":0}}],"logs":[{"kind":"PropertySignature","id":0,"name":"logs","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeLiteral","id":0,"members":{"msg":[{"kind":"PropertySignature","id":0,"name":"msg","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{}}]}}],"time":[{"kind":"PropertySignature","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}}]}}}}],"cam":[{"kind":"PropertySignature","id":0,"name":"cam","type":{"kind":"TypeLiteral","id":0,"members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"shake":[{"kind":"PropertySignature","id":0,"name":"shake","type":{"kind":"NumberKeyword","id":0}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}]}}}]}}}}]},"name":"initGame","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"events":[{"kind":"PropertySignature","id":0,"name":"events","type":{"kind":"TypeReference","id":0,"typeName":"KEventHandler","typeArguments":[{"kind":"TypeLiteral","id":0,"members":{"mouseMove":[{"kind":"PropertySignature","id":0,"name":"mouseMove","type":{"kind":"TupleType","id":0,"elements":[]}}],"mouseDown":[{"kind":"PropertySignature","id":0,"name":"mouseDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"mousePress":[{"kind":"PropertySignature","id":0,"name":"mousePress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"mouseRelease":[{"kind":"PropertySignature","id":0,"name":"mouseRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"charInput":[{"kind":"PropertySignature","id":0,"name":"charInput","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"keyPress":[{"kind":"PropertySignature","id":0,"name":"keyPress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyDown":[{"kind":"PropertySignature","id":0,"name":"keyDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyPressRepeat":[{"kind":"PropertySignature","id":0,"name":"keyPressRepeat","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyRelease":[{"kind":"PropertySignature","id":0,"name":"keyRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"touchStart":[{"kind":"PropertySignature","id":0,"name":"touchStart","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"touchMove":[{"kind":"PropertySignature","id":0,"name":"touchMove","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"touchEnd":[{"kind":"PropertySignature","id":0,"name":"touchEnd","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"gamepadButtonDown":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadButtonPress":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonPress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadButtonRelease":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadStick":[{"kind":"PropertySignature","id":0,"name":"gamepadStick","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"gamepadConnect":[{"kind":"PropertySignature","id":0,"name":"gamepadConnect","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Gamepad"}]}}],"gamepadDisconnect":[{"kind":"PropertySignature","id":0,"name":"gamepadDisconnect","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Gamepad"}]}}],"scroll":[{"kind":"PropertySignature","id":0,"name":"scroll","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"add":[{"kind":"PropertySignature","id":0,"name":"add","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"GameObj"}]}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"GameObj"}]}}],"load":[{"kind":"PropertySignature","id":0,"name":"load","type":{"kind":"TupleType","id":0,"elements":[]}}],"loading":[{"kind":"PropertySignature","id":0,"name":"loading","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0}]}}],"error":[{"kind":"PropertySignature","id":0,"name":"error","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Error"}]}}],"input":[{"kind":"PropertySignature","id":0,"name":"input","type":{"kind":"TupleType","id":0,"elements":[]}}],"frameEnd":[{"kind":"PropertySignature","id":0,"name":"frameEnd","type":{"kind":"TupleType","id":0,"elements":[]}}],"resize":[{"kind":"PropertySignature","id":0,"name":"resize","type":{"kind":"TupleType","id":0,"elements":[]}}],"sceneLeave":[{"kind":"PropertySignature","id":0,"name":"sceneLeave","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}]}}]}}],"objEvents":[{"kind":"PropertySignature","id":0,"name":"objEvents","type":{"kind":"TypeReference","id":0,"typeName":"KEventHandler","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GameObjEventMap"}]}}],"root":[{"kind":"PropertySignature","id":0,"name":"root","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TimerComp"}]}}],"gravity":[{"kind":"PropertySignature","id":0,"name":"gravity","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"scenes":[{"kind":"PropertySignature","id":0,"name":"scenes","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SceneName"},{"kind":"TypeReference","id":0,"typeName":"SceneDef"}]}}],"currentScene":[{"kind":"PropertySignature","id":0,"name":"currentScene","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"SceneName"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"layers":[{"kind":"PropertySignature","id":0,"name":"layers","type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"defaultLayerIndex":[{"kind":"PropertySignature","id":0,"name":"defaultLayerIndex","type":{"kind":"NumberKeyword","id":0}}],"logs":[{"kind":"PropertySignature","id":0,"name":"logs","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeLiteral","id":0,"members":{"msg":[{"kind":"PropertySignature","id":0,"name":"msg","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{}}]}}],"time":[{"kind":"PropertySignature","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}}]}}}}],"cam":[{"kind":"PropertySignature","id":0,"name":"cam","type":{"kind":"TypeLiteral","id":0,"members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"shake":[{"kind":"PropertySignature","id":0,"name":"shake","type":{"kind":"NumberKeyword","id":0}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}]}}}]}}}}],"kaplay":[{"kind":"FunctionDeclaration","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"kaplay","type":{"kind":"FunctionType","id":0,"typeParameters":[{"kind":"TypeParameter","id":0,"name":"TPlugins","constraint":{"kind":"TypeReference","id":0,"typeName":"PluginList","typeArguments":[{"kind":"UnknownKeyword","id":0}]},"default":{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]}},{"kind":"TypeParameter","id":0,"name":"TButtons","constraint":{"kind":"TypeReference","id":0,"typeName":"ButtonsDef"},"default":{"kind":"TypeLiteral","id":0,"members":{}}},{"kind":"TypeParameter","id":0,"name":"TButtonsName","constraint":{"kind":"StringKeyword","id":0},"default":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"TButtons"}},{"kind":"StringKeyword","id":0}]}}],"parameters":[{"kind":"Parameter","id":0,"name":"gopt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYOpt","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TPlugins"},{"kind":"TypeReference","id":0,"typeName":"TButtons"}]}}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"TPlugins"},"extendsType":{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]},"trueType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TButtons"},{"kind":"TypeReference","id":0,"typeName":"TButtonsName"}]},"falseType":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TButtons"},{"kind":"TypeReference","id":0,"typeName":"TButtonsName"}]},{"kind":"TypeReference","id":0,"typeName":"MergePlugins","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TPlugins"}]}]}}}}]},"jsDoc":{"doc":"Initialize KAPLAY context. The starting point of all KAPLAY games.","tags":{"example":["```js\n// Start KAPLAY with default options (will create a fullscreen canvas under )\nkaplay()\n\n// Init with some options\nkaplay({\n width: 320,\n height: 240,\n font: \"sans-serif\",\n canvas: document.querySelector(\"#mycanvas\"),\n background: [ 0, 0, 255, ],\n})\n\n// All KAPLAY functions are imported to global after calling kaplay()\nadd()\nonUpdate()\nonKeyPress()\nvec2()\n\n// If you want to prevent KAPLAY from importing all functions to global and use a context handle for all KAPLAY functions\nconst k = kaplay({ global: false })\n\nk.add(...)\nk.onUpdate(...)\nk.onKeyPress(...)\nk.vec2(...)\n```"],"group":["Start"]}},"name":"kaplay","type":{"kind":"FunctionType","id":0,"typeParameters":[{"kind":"TypeParameter","id":0,"name":"TPlugins","constraint":{"kind":"TypeReference","id":0,"typeName":"PluginList","typeArguments":[{"kind":"UnknownKeyword","id":0}]},"default":{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]}},{"kind":"TypeParameter","id":0,"name":"TButtons","constraint":{"kind":"TypeReference","id":0,"typeName":"ButtonsDef"},"default":{"kind":"TypeLiteral","id":0,"members":{}}},{"kind":"TypeParameter","id":0,"name":"TButtonsName","constraint":{"kind":"StringKeyword","id":0},"default":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"TButtons"}},{"kind":"StringKeyword","id":0}]}}],"parameters":[{"kind":"Parameter","id":0,"name":"gopt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYOpt","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TPlugins"},{"kind":"TypeReference","id":0,"typeName":"TButtons"}]}}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"TPlugins"},"extendsType":{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]},"trueType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TButtons"},{"kind":"TypeReference","id":0,"typeName":"TButtonsName"}]},"falseType":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TButtons"},{"kind":"TypeReference","id":0,"typeName":"TButtonsName"}]},{"kind":"TypeReference","id":0,"typeName":"MergePlugins","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TPlugins"}]}]}}}}]},"groups":{"Start":{"name":"Start","entries":["kaplay","quit","KAPLAYOpt"]},"Assets":{"name":"Assets","entries":["loadRoot","loadSprite","loadSpriteAtlas","loadAseprite","loadPedit","loadBean","loadJSON","loadSound","loadMusic","loadFont","loadBitmapFont","loadShader","loadShaderURL","load","loadProgress","getSprite","getSound","getFont","getBitmapFont","getShader","getAsset","Asset","SpriteData","SoundData"]},"Game Obj":{"name":"Game Obj","entries":["add","make","readd","get","query","destroy","destroyAll","GameObjRaw","GameObj","GameObjID"]},"Components":{"name":"Components","entries":["pos","scale","rotate","color","opacity","sprite","text","polygon","rect","circle","uvquad","area","anchor","z","layer","outline","body","surfaceEffector","areaEffector","pointEffector","buoyancyEffector","constantForce","doubleJump","move","offscreen","follow","shader","textInput","timer","fixed","stay","health","lifespan","named","state","fadeIn","mask","tile","agent","animate","sentry","patrol","navigation","Comp"]},"Component Types":{"name":"Component Types","entries":["CircleComp","CircleCompOpt","ColorComp","MaskComp","OpacityComp","OutlineComp","PolygonComp","PolygonCompOpt","RectComp","RectCompOpt","ShaderComp","SpriteComp","SpriteCompOpt","TextComp","TextCompOpt","UVQuadComp","AgentComp","AgentCompOpt","FixedComp","PosComp","SentryComp","SentryCompOpt","TileComp","TileCompOpt","HealthComp","LifespanCompOpt","NamedComp","StateComp","StayComp","TextInputComp","TimerComp","AreaComp","AreaCompOpt","BodyComp","BodyCompOpt","DoubleJumpComp","AnchorComp","FollowComp","LayerComp","OffScreenComp","OffScreenCompOpt","RotateComp","ScaleComp","ZComp","MergeComps","CompList","EmptyComp","LevelComp"]},"Scene":{"name":"Scene","entries":["getSceneName","scene","go","layers"]},"Input":{"name":"Input","entries":["onGamepadConnect","onGamepadDisconnect","onClick","onKeyDown","onKeyPress","onKeyPressRepeat","onKeyRelease","onCharInput","onMouseDown","onMousePress","onMouseRelease","onMouseMove","onTouchStart","onTouchMove","onTouchEnd","onScroll","onGamepadButtonDown","onGamepadButtonPress","onGamepadButtonRelease","onGamepadStick","onButtonPress","onButtonRelease","onButtonDown","isTouchscreen","mousePos","mouseDeltaPos","isKeyDown","isKeyPressed","isKeyPressedRepeat","isKeyReleased","isMouseDown","isMousePressed","isMouseReleased","isMouseMoved","isGamepadButtonPressed","isGamepadButtonDown","isGamepadButtonReleased","isButtonPressed","isButtonDown","isButtonReleased","getButton","setButton","getGamepadStick","charInputted","Key","MouseButton","KGamepadButton","GamepadStick"]},"Events":{"name":"Events","entries":["KEventController","GameObjEventMap","on","onUpdate","onDraw","onAdd","onDestroy","onLoad","onLoading","onError","onResize","onCleanup","onCollide","onCollideUpdate","onCollideEnd","onHover","onHoverUpdate","onHoverEnd","onHide","onShow","onSceneLeave","KEvent","KEventHandler","KEventController"]},"Info":{"name":"Info","entries":["width","getTreeRoot","height","center","dt","fixedDt","restDt","time","isFocused","shake","camPos","camScale","camRot","camFlash","camTransform","toScreen","toWorld","setGravity","getGravity","setBackground","getBackground","getGamepads","setCursor","getCursor","setCursorLocked","isCursorLocked","setFullscreen","isFullscreen","canvas","VERSION"]},"Timer":{"name":"Timer","entries":["wait","loop","TimerController","TweenController"]},"Math":{"name":"Math","entries":["Color","Vec2Args","Vec2","Quad","Mat4","RNG","ShapeType","RaycastHit","RaycastResult","Line","Rect","Circle","Ellipse","Polygon","UniformValue","UniformKey","Uniform","raycast","rand","randi","randSeed","vec2","rgb","hsl2rgb","quad","choose","chooseMultiple","shuffle","chance","lerp","tween","easings","easingSteps","easingLinear","easingCubicBezier","map","mapc","wave","deg2rad","rad2deg","clamp","evaluateQuadratic","evaluateQuadraticFirstDerivative","evaluateQuadraticSecondDerivative","evaluateBezier","evaluateBezierFirstDerivative","evaluateBezierSecondDerivative","evaluateCatmullRom","evaluateCatmullRomFirstDerivative","curveLengthApproximation","normalizedCurve","testLinePoint","testLineLine","testLineCircle","testRectRect","testRectLine","testRectPoint","testCirclePolygon","isConvex","triangulate","NavMesh","Point","Line","Rect","Circle","Ellipse","Polygon","Vec2","Color","Mat4","Quad","RNG","LerpValue","RNGValue","Collision","Edge","EdgeMask","EaseFuncs","EaseFunc"]},"Misc":{"name":"Misc","entries":["GfxCtx","Texture","VertexFormat","BatchRenderer","Mesh","initGfx","RGBValue","RGBAValue","ColorArgs","Mat2","Point","StepPosition","DrawCurveOpt","DrawBezierOpt","DrawCircleOpt","GfxFont","BitmapFontData","LoadBitmapFontOpt","FontData","CharTransformFunc","FormattedText","FormattedChar","DrawLineOpt","LineJoin","LineCap","DrawLinesOpt","DrawRectOpt","Graph","Grid","NavEdge","NavPolygon","NavMesh","DrawSpriteOpt","DrawTriangleOpt","ShaderData","AppGfxCtx","TexPacker","SoundData","SpriteAnim","SpriteAnims","LoadSpriteOpt","NineSlice","LoadSpriteSrc","SpriteData","Asset","AssetBucket","AssetsCtx","AsepriteData","PeditFile","SpriteAtlasData","SpriteAtlasEntry","AudioCtx","BinaryHeap","Registry","KEvent","KEventHandler","AudioPlayOpt","AudioPlay","EmitterOpt","ParticlesOpt","ParticlesComp","NavigationMapComp","NavigationMapCompOpt","NavigationComp","NavigationCompOpt","PatrolComp","PatrolEndBehavior","PatrolCompOpt","SentryCandidatesCb","SentryCandidates","TimeDirection","Interpolation","AnimateOpt","AnimateCompOpt","BaseValues","AnimateComp","AnimationChannelKeys","AnimationOptions","AnimationChannel","SurfaceEffectorCompOpt","SurfaceEffectorComp","AreaEffectorCompOpt","AreaEffectorComp","ForceMode","PointEffectorCompOpt","PointEffectorComp","ConstantForceCompOpt","ConstantForceComp","BuoyancyEffectorCompOpt","BuoyancyEffectorComp","GameObjEventNames","TupleWithoutFirst","SceneName","SceneDef","Game","addKaboom","Tag","UnionToIntersection","Defined","Expand","MergeObj","MergePlugins","PluginList","GamepadDef","KGamePad","GameObjInspect","SpriteAnimPlayOpt","MusicData","LoadFontOpt","TextureOpt","ImageSource","Canvas","Vertex","TexFilter","TexWrap","RenderProps","DrawTextureOpt","DrawUVQuadOpt","DrawEllipseOpt","DrawPolygonOpt","Outline","Mask","SpriteCurAnim","initAppGfx","initAssets","initAudio","initGame"]},"GFX":{"name":"GFX","entries":["FrameBuffer","Shader"]},"Draw":{"name":"Draw","entries":["DrawTextOpt","TextAlign","drawSprite","drawText","drawRect","drawLine","drawLines","drawCurve","drawBezier","drawTriangle","drawCircle","drawEllipse","drawPolygon","drawUVQuad","drawFormattedText","drawMasked","drawSubtracted","pushTransform","popTransform","pushTranslate","pushScale","pushRotate","pushMatrix","usePostEffect","formatText","makeCanvas","Cursor","Anchor","Shape"]},"Options":{"name":"Options","entries":["CharTransform","BoomOpt","LevelOpt","GetOpt","QueryOpt","PathFindOpt"]},"Audio":{"name":"Audio","entries":["play","burp","volume","audioCtx"]},"Level":{"name":"Level","entries":["addLevel"]},"Data":{"name":"Data","entries":["getData","setData","screenshot","download","downloadText","downloadJSON","downloadBlob","record","Recording"]},"Debug":{"name":"Debug","entries":["debug","Debug"]},"Plugins":{"name":"Plugins","entries":["plug","KAPLAYPlugin"]},"Constants":{"name":"Constants","entries":["ASCII_CHARS","LEFT","RIGHT","UP","DOWN","RED","GREEN","BLUE","YELLOW","MAGENTA","CYAN","WHITE","BLACK"]},"Button Bindings":{"name":"Button Bindings","entries":["ButtonBinding","ButtonsDef","ButtonBindingDevice"]}}} \ No newline at end of file diff --git a/public/doc.json b/public/doc.json new file mode 100644 index 0000000..9dc84f8 --- /dev/null +++ b/public/doc.json @@ -0,0 +1 @@ +{"types":{"GfxCtx":[{"kind":"TypeAliasDeclaration","id":0,"name":"GfxCtx","type":{"kind":"TypeReference","id":0,"typeName":"ReturnType","typeArguments":[{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"initGfx"}}]}}],"Texture":[{"kind":"ClassDeclaration","id":0,"name":"Texture","members":{"ctx":[{"kind":"PropertyDeclaration","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"src":[{"kind":"PropertyDeclaration","id":0,"name":"src","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}},{"kind":"TypeReference","id":0,"typeName":"ImageSource"}]}}],"glTex":[{"kind":"PropertyDeclaration","id":0,"name":"glTex","type":{"kind":"TypeReference","id":0,"typeName":"WebGLTexture"}}],"width":[{"kind":"PropertyDeclaration","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertyDeclaration","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"fromImage":[{"kind":"MethodDeclaration","id":0,"name":"fromImage","parameters":[{"kind":"Parameter","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}},{"kind":"Parameter","id":0,"name":"img","type":{"kind":"TypeReference","id":0,"typeName":"ImageSource"}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"TextureOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"update":[{"kind":"MethodDeclaration","id":0,"name":"update","parameters":[{"kind":"Parameter","id":0,"name":"img","type":{"kind":"TypeReference","id":0,"typeName":"ImageSource"}},{"kind":"Parameter","id":0,"name":"x","questionToken":true,"type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"bind":[{"kind":"MethodDeclaration","id":0,"name":"bind","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"unbind":[{"kind":"MethodDeclaration","id":0,"name":"unbind","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"free":[{"kind":"MethodDeclaration","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Frees up texture memory. Call this once the texture is no longer being used to avoid memory leaks.","tags":{}}}]}}],"FrameBuffer":[{"kind":"ClassDeclaration","id":0,"name":"FrameBuffer","members":{"ctx":[{"kind":"PropertyDeclaration","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"tex":[{"kind":"PropertyDeclaration","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"glFramebuffer":[{"kind":"PropertyDeclaration","id":0,"name":"glFramebuffer","type":{"kind":"TypeReference","id":0,"typeName":"WebGLFramebuffer"}}],"glRenderbuffer":[{"kind":"PropertyDeclaration","id":0,"name":"glRenderbuffer","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderbuffer"}}],"width":[{"kind":"GetAccessor","id":0,"name":"width","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"GetAccessor","id":0,"name":"height","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"toImageData":[{"kind":"MethodDeclaration","id":0,"name":"toImageData","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"ImageData"}}],"toDataURL":[{"kind":"MethodDeclaration","id":0,"name":"toDataURL","parameters":[],"type":{"kind":"StringKeyword","id":0}}],"clear":[{"kind":"MethodDeclaration","id":0,"name":"clear","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"draw":[{"kind":"MethodDeclaration","id":0,"name":"draw","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}],"bind":[{"kind":"MethodDeclaration","id":0,"name":"bind","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"unbind":[{"kind":"MethodDeclaration","id":0,"name":"unbind","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"free":[{"kind":"MethodDeclaration","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]},"jsDoc":{"tags":{"group":["GFX"]}}}],"VertexFormat":[{"kind":"TypeAliasDeclaration","id":0,"name":"VertexFormat","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeLiteral","id":0,"members":{"size":[{"kind":"PropertySignature","id":0,"name":"size","type":{"kind":"NumberKeyword","id":0}}]}}}}],"BatchRenderer":[{"kind":"ClassDeclaration","id":0,"name":"BatchRenderer","members":{"ctx":[{"kind":"PropertyDeclaration","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"glVBuf":[{"kind":"PropertyDeclaration","id":0,"name":"glVBuf","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"glIBuf":[{"kind":"PropertyDeclaration","id":0,"name":"glIBuf","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"vqueue":[{"kind":"PropertyDeclaration","id":0,"name":"vqueue","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"iqueue":[{"kind":"PropertyDeclaration","id":0,"name":"iqueue","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"stride":[{"kind":"PropertyDeclaration","id":0,"name":"stride","type":{"kind":"NumberKeyword","id":0}}],"maxVertices":[{"kind":"PropertyDeclaration","id":0,"name":"maxVertices","type":{"kind":"NumberKeyword","id":0}}],"maxIndices":[{"kind":"PropertyDeclaration","id":0,"name":"maxIndices","type":{"kind":"NumberKeyword","id":0}}],"vertexFormat":[{"kind":"PropertyDeclaration","id":0,"name":"vertexFormat","type":{"kind":"TypeReference","id":0,"typeName":"VertexFormat"}}],"numDraws":[{"kind":"PropertyDeclaration","id":0,"name":"numDraws","type":{"kind":"NumberKeyword","id":0}}],"curPrimitive":[{"kind":"PropertyDeclaration","id":0,"name":"curPrimitive","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GLenum"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"curTex":[{"kind":"PropertyDeclaration","id":0,"name":"curTex","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Texture"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"curShader":[{"kind":"PropertyDeclaration","id":0,"name":"curShader","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Shader"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"curUniform":[{"kind":"PropertyDeclaration","id":0,"name":"curUniform","type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}],"push":[{"kind":"MethodDeclaration","id":0,"name":"push","parameters":[{"kind":"Parameter","id":0,"name":"primitive","type":{"kind":"TypeReference","id":0,"typeName":"GLenum"}},{"kind":"Parameter","id":0,"name":"verts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"indices","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"shader","type":{"kind":"TypeReference","id":0,"typeName":"Shader"}},{"kind":"Parameter","id":0,"name":"tex","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Texture"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"uniform","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}],"type":{"kind":"VoidKeyword","id":0}}],"flush":[{"kind":"MethodDeclaration","id":0,"name":"flush","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"free":[{"kind":"MethodDeclaration","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]}}],"Mesh":[{"kind":"ClassDeclaration","id":0,"name":"Mesh","members":{"ctx":[{"kind":"PropertyDeclaration","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"glVBuf":[{"kind":"PropertyDeclaration","id":0,"name":"glVBuf","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"glIBuf":[{"kind":"PropertyDeclaration","id":0,"name":"glIBuf","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"vertexFormat":[{"kind":"PropertyDeclaration","id":0,"name":"vertexFormat","type":{"kind":"TypeReference","id":0,"typeName":"VertexFormat"}}],"count":[{"kind":"PropertyDeclaration","id":0,"name":"count","type":{"kind":"NumberKeyword","id":0}}],"draw":[{"kind":"MethodDeclaration","id":0,"name":"draw","parameters":[{"kind":"Parameter","id":0,"name":"primitive","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"GLenum"}}],"type":{"kind":"VoidKeyword","id":0}}],"free":[{"kind":"MethodDeclaration","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]}}],"initGfx":[{"kind":"FunctionDeclaration","id":0,"name":"initGfx","parameters":[{"kind":"Parameter","id":0,"name":"gl","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderingContext"}},{"kind":"Parameter","id":0,"name":"opts","questionToken":true,"type":{"kind":"TypeLiteral","id":0,"members":{"texFilter":[{"kind":"PropertySignature","id":0,"name":"texFilter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}]}}}],"type":{"kind":"TypeLiteral","id":0,"members":{"gl":[{"kind":"PropertySignature","id":0,"name":"gl","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderingContext"}}],"opts":[{"kind":"PropertySignature","id":0,"name":"opts","type":{"kind":"TypeLiteral","id":0,"members":{"texFilter":[{"kind":"PropertySignature","id":0,"name":"texFilter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}]}}}],"onDestroy":[{"kind":"PropertySignature","id":0,"name":"onDestroy","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"UnknownKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushTexture2D":[{"kind":"PropertySignature","id":0,"name":"pushTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLTexture"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popTexture2D":[{"kind":"PropertySignature","id":0,"name":"popTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushFramebuffer":[{"kind":"PropertySignature","id":0,"name":"pushFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLFramebuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popFramebuffer":[{"kind":"PropertySignature","id":0,"name":"popFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"pushRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderbuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"popRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushViewport":[{"kind":"PropertySignature","id":0,"name":"pushViewport","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"w":[{"kind":"PropertySignature","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertySignature","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}]}}}],"type":{"kind":"VoidKeyword","id":0}}}],"popViewport":[{"kind":"PropertySignature","id":0,"name":"popViewport","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushProgram":[{"kind":"PropertySignature","id":0,"name":"pushProgram","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLProgram"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popProgram":[{"kind":"PropertySignature","id":0,"name":"popProgram","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"setVertexFormat":[{"kind":"PropertySignature","id":0,"name":"setVertexFormat","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"fmt","type":{"kind":"TypeReference","id":0,"typeName":"VertexFormat"}}],"type":{"kind":"VoidKeyword","id":0}}}]}}}],"RGBValue":[{"kind":"TypeAliasDeclaration","id":0,"name":"RGBValue","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]}}],"RGBAValue":[{"kind":"TypeAliasDeclaration","id":0,"name":"RGBAValue","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]}}],"Color":[{"kind":"ClassDeclaration","id":0,"name":"Color","members":{"r":[{"kind":"PropertyDeclaration","id":0,"name":"r","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Red (0-255.","tags":{}}}],"g":[{"kind":"PropertyDeclaration","id":0,"name":"g","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Green (0-255).","tags":{}}}],"b":[{"kind":"PropertyDeclaration","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Blue (0-255).","tags":{}}}],"fromArray":[{"kind":"MethodDeclaration","id":0,"name":"fromArray","parameters":[{"kind":"Parameter","id":0,"name":"arr","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"fromHex":[{"kind":"MethodDeclaration","id":0,"name":"fromHex","parameters":[{"kind":"Parameter","id":0,"name":"hex","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"NumberKeyword","id":0}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Create color from hex string or literal.","tags":{"example":["```js\nColor.fromHex(0xfcef8d)\nColor.fromHex(\"#5ba675\")\nColor.fromHex(\"d46eb3\")\n```"],"since":["v3000.0"]}}}],"fromHSL":[{"kind":"MethodDeclaration","id":0,"name":"fromHSL","parameters":[{"kind":"Parameter","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"s","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"l","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"RED":[{"kind":"PropertyDeclaration","id":0,"name":"RED","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"GREEN":[{"kind":"PropertyDeclaration","id":0,"name":"GREEN","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"BLUE":[{"kind":"PropertyDeclaration","id":0,"name":"BLUE","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"YELLOW":[{"kind":"PropertyDeclaration","id":0,"name":"YELLOW","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"MAGENTA":[{"kind":"PropertyDeclaration","id":0,"name":"MAGENTA","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"CYAN":[{"kind":"PropertyDeclaration","id":0,"name":"CYAN","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"WHITE":[{"kind":"PropertyDeclaration","id":0,"name":"WHITE","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"BLACK":[{"kind":"PropertyDeclaration","id":0,"name":"BLACK","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"lighten":[{"kind":"MethodDeclaration","id":0,"name":"lighten","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Lighten the color (adds RGB by n).","tags":{}}}],"darken":[{"kind":"MethodDeclaration","id":0,"name":"darken","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Darkens the color (subtracts RGB by n).","tags":{}}}],"invert":[{"kind":"MethodDeclaration","id":0,"name":"invert","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"mult":[{"kind":"MethodDeclaration","id":0,"name":"mult","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"lerp":[{"kind":"MethodDeclaration","id":0,"name":"lerp","parameters":[{"kind":"Parameter","id":0,"name":"dest","type":{"kind":"TypeReference","id":0,"typeName":"Color"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Linear interpolate to a destination color.","tags":{"since":["v3000.0"]}}}],"toHSL":[{"kind":"MethodDeclaration","id":0,"name":"toHSL","parameters":[],"type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},"jsDoc":{"doc":"Convert color into HSL format.","tags":{"since":["v3001.0"]}}}],"eq":[{"kind":"MethodDeclaration","id":0,"name":"eq","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"type":{"kind":"BooleanKeyword","id":0}}],"toHex":[{"kind":"MethodDeclaration","id":0,"name":"toHex","parameters":[],"type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"Return the hex string of color.","tags":{"since":["v3000.0"]}}}],"toArray":[{"kind":"MethodDeclaration","id":0,"name":"toArray","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"NumberKeyword","id":0}]},"jsDoc":{"doc":"Return the color converted to an array.","tags":{"since":["v3001.0"]}}}]},"jsDoc":{"doc":"0-255 RGBA color.","tags":{"group":["Math"]}}}],"ColorArgs":[{"kind":"TypeAliasDeclaration","id":0,"name":"ColorArgs","type":{"kind":"UnionType","id":0,"types":[{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Color"}]},{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"NumberKeyword","id":0}]},{"kind":"TypeReference","id":0,"typeName":"RGBValue"},{"kind":"TypeReference","id":0,"typeName":"RGBAValue"},{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]},{"kind":"TupleType","id":0,"elements":[{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}]},{"kind":"TupleType","id":0,"elements":[]}]}}],"Vec2Args":[{"kind":"TypeAliasDeclaration","id":0,"name":"Vec2Args","type":{"kind":"UnionType","id":0,"types":[{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0}]},{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},{"kind":"TupleType","id":0,"elements":[{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}]},{"kind":"TupleType","id":0,"elements":[]}]},"jsDoc":{"doc":"Possible arguments for a Vec2.","tags":{"group":["Math"]}}}],"Vec2":[{"kind":"ClassDeclaration","id":0,"name":"Vec2","members":{"x":[{"kind":"PropertyDeclaration","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The x coordinate","tags":{}}}],"y":[{"kind":"PropertyDeclaration","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The y coordinate","tags":{}}}],"fromAngle":[{"kind":"MethodDeclaration","id":0,"name":"fromAngle","parameters":[{"kind":"Parameter","id":0,"name":"deg","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Create a new Vec2 from an angle in degrees","tags":{}}}],"fromArray":[{"kind":"MethodDeclaration","id":0,"name":"fromArray","parameters":[{"kind":"Parameter","id":0,"name":"arr","type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"NumberKeyword","id":0}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Create a new Vec2 from an array","tags":{}}}],"LEFT":[{"kind":"PropertyDeclaration","id":0,"name":"LEFT","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"RIGHT":[{"kind":"PropertyDeclaration","id":0,"name":"RIGHT","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"UP":[{"kind":"PropertyDeclaration","id":0,"name":"UP","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"DOWN":[{"kind":"PropertyDeclaration","id":0,"name":"DOWN","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Clone the vector","tags":{}}}],"add":[{"kind":"MethodDeclaration","id":0,"name":"add","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Returns the addition with another vector.","tags":{}}}],"sub":[{"kind":"MethodDeclaration","id":0,"name":"sub","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Returns the subtraction with another vector.","tags":{}}}],"scale":[{"kind":"MethodDeclaration","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Scale by another vector. or a single number","tags":{}}}],"dist":[{"kind":"MethodDeclaration","id":0,"name":"dist","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get distance between another vector","tags":{}}}],"sdist":[{"kind":"MethodDeclaration","id":0,"name":"sdist","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get squared distance between another vector","tags":{}}}],"len":[{"kind":"MethodDeclaration","id":0,"name":"len","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"slen":[{"kind":"MethodDeclaration","id":0,"name":"slen","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get squared length of the vector","tags":{"since":["v3000.0"]}}}],"unit":[{"kind":"MethodDeclaration","id":0,"name":"unit","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the unit vector (length of 1).","tags":{}}}],"normal":[{"kind":"MethodDeclaration","id":0,"name":"normal","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the perpendicular vector.","tags":{}}}],"reflect":[{"kind":"MethodDeclaration","id":0,"name":"reflect","parameters":[{"kind":"Parameter","id":0,"name":"normal","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the reflection of a vector with a normal.","tags":{"since":["v3000.0"]}}}],"project":[{"kind":"MethodDeclaration","id":0,"name":"project","parameters":[{"kind":"Parameter","id":0,"name":"on","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the projection of a vector onto another vector.","tags":{"since":["v3000.0"]}}}],"reject":[{"kind":"MethodDeclaration","id":0,"name":"reject","parameters":[{"kind":"Parameter","id":0,"name":"on","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the rejection of a vector onto another vector.","tags":{"since":["v3000.0"]}}}],"dot":[{"kind":"MethodDeclaration","id":0,"name":"dot","parameters":[{"kind":"Parameter","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the dot product with another vector.","tags":{}}}],"cross":[{"kind":"MethodDeclaration","id":0,"name":"cross","parameters":[{"kind":"Parameter","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the cross product with another vector.","tags":{"since":["v3000.0"]}}}],"angle":[{"kind":"MethodDeclaration","id":0,"name":"angle","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the angle of the vector in degrees.","tags":{}}}],"angleBetween":[{"kind":"MethodDeclaration","id":0,"name":"angleBetween","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Vec2Args"}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the angle between this vector and another vector.","tags":{"since":["v3000.0"]}}}],"lerp":[{"kind":"MethodDeclaration","id":0,"name":"lerp","parameters":[{"kind":"Parameter","id":0,"name":"dest","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Linear interpolate to a destination vector (for positions).","tags":{}}}],"slerp":[{"kind":"MethodDeclaration","id":0,"name":"slerp","parameters":[{"kind":"Parameter","id":0,"name":"dest","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Spherical linear interpolate to a destination vector (for rotations).","tags":{"since":["v3000.0"]}}}],"isZero":[{"kind":"MethodDeclaration","id":0,"name":"isZero","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the vector (x, y) is zero.","tags":{"since":["v3000.0"]}}}],"toFixed":[{"kind":"MethodDeclaration","id":0,"name":"toFixed","parameters":[{"kind":"Parameter","id":0,"name":"n","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"To n precision floating point.","tags":{}}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Multiply by a Mat4.","tags":{"since":["v3000.0"]}}}],"eq":[{"kind":"MethodDeclaration","id":0,"name":"eq","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"toArray":[{"kind":"MethodDeclaration","id":0,"name":"toArray","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"NumberKeyword","id":0}]}}]},"jsDoc":{"doc":"A 2D vector.","tags":{"group":["Math"]}}}],"Quad":[{"kind":"ClassDeclaration","id":0,"name":"Quad","members":{"x":[{"kind":"PropertyDeclaration","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertyDeclaration","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"w":[{"kind":"PropertyDeclaration","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertyDeclaration","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}],"scale":[{"kind":"MethodDeclaration","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Quad"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Quad"}}],"pos":[{"kind":"MethodDeclaration","id":0,"name":"pos","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Quad"}}],"eq":[{"kind":"MethodDeclaration","id":0,"name":"eq","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Quad"}}],"type":{"kind":"BooleanKeyword","id":0}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Mat2":[{"kind":"ClassDeclaration","id":0,"name":"Mat2","members":{"a":[{"kind":"PropertyDeclaration","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"b":[{"kind":"PropertyDeclaration","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"c":[{"kind":"PropertyDeclaration","id":0,"name":"c","type":{"kind":"NumberKeyword","id":0}}],"d":[{"kind":"PropertyDeclaration","id":0,"name":"d","type":{"kind":"NumberKeyword","id":0}}],"mul":[{"kind":"MethodDeclaration","id":0,"name":"mul","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"inverse":[{"kind":"GetAccessor","id":0,"name":"inverse","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"transpose":[{"kind":"GetAccessor","id":0,"name":"transpose","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"eigenvalues":[{"kind":"GetAccessor","id":0,"name":"eigenvalues","parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"eigenvectors":[{"kind":"MethodDeclaration","id":0,"name":"eigenvectors","parameters":[{"kind":"Parameter","id":0,"name":"e1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"e2","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}}],"det":[{"kind":"GetAccessor","id":0,"name":"det","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"trace":[{"kind":"GetAccessor","id":0,"name":"trace","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"rotation":[{"kind":"MethodDeclaration","id":0,"name":"rotation","parameters":[{"kind":"Parameter","id":0,"name":"radians","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"scale":[{"kind":"MethodDeclaration","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}]}}],"Mat4":[{"kind":"ClassDeclaration","id":0,"name":"Mat4","members":{"m":[{"kind":"PropertyDeclaration","id":0,"name":"m","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"translate":[{"kind":"MethodDeclaration","id":0,"name":"translate","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}},{"kind":"MethodDeclaration","id":0,"name":"translate","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"ThisType","id":0}}],"scale":[{"kind":"MethodDeclaration","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}},{"kind":"MethodDeclaration","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"ThisType","id":0}}],"rotateX":[{"kind":"MethodDeclaration","id":0,"name":"rotateX","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"rotateY":[{"kind":"MethodDeclaration","id":0,"name":"rotateY","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"rotateZ":[{"kind":"MethodDeclaration","id":0,"name":"rotateZ","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"rotate":[{"kind":"MethodDeclaration","id":0,"name":"rotate","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"mult":[{"kind":"MethodDeclaration","id":0,"name":"mult","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"multVec2":[{"kind":"MethodDeclaration","id":0,"name":"multVec2","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"getTranslation":[{"kind":"MethodDeclaration","id":0,"name":"getTranslation","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"getScale":[{"kind":"MethodDeclaration","id":0,"name":"getScale","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"getRotation":[{"kind":"MethodDeclaration","id":0,"name":"getRotation","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"getSkew":[{"kind":"MethodDeclaration","id":0,"name":"getSkew","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"invert":[{"kind":"MethodDeclaration","id":0,"name":"invert","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"RNG":[{"kind":"ClassDeclaration","id":0,"name":"RNG","members":{"seed":[{"kind":"PropertyDeclaration","id":0,"name":"seed","type":{"kind":"NumberKeyword","id":0}}],"gen":[{"kind":"MethodDeclaration","id":0,"name":"gen","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"genNumber":[{"kind":"MethodDeclaration","id":0,"name":"genNumber","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"genVec2":[{"kind":"MethodDeclaration","id":0,"name":"genVec2","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"genColor":[{"kind":"MethodDeclaration","id":0,"name":"genColor","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"Color"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"genAny":[{"kind":"MethodDeclaration","id":0,"name":"genAny","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","default":{"kind":"TypeReference","id":0,"typeName":"RNGValue"}}],"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"UnionType","id":0,"types":[{"kind":"TupleType","id":0,"elements":[]},{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"T"}]},{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"TypeReference","id":0,"typeName":"T"}]}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"T"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"ShapeType":[{"kind":"TypeAliasDeclaration","id":0,"name":"ShapeType","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Point"},{"kind":"TypeReference","id":0,"typeName":"Circle"},{"kind":"TypeReference","id":0,"typeName":"Line"},{"kind":"TypeReference","id":0,"typeName":"Rect"},{"kind":"TypeReference","id":0,"typeName":"Polygon"},{"kind":"TypeReference","id":0,"typeName":"Ellipse"}]},"jsDoc":{"tags":{"group":["Math"]}}}],"RaycastHit":[{"kind":"TypeAliasDeclaration","id":0,"name":"RaycastHit","type":{"kind":"TypeLiteral","id":0,"members":{"fraction":[{"kind":"PropertySignature","id":0,"name":"fraction","type":{"kind":"NumberKeyword","id":0}}],"normal":[{"kind":"PropertySignature","id":0,"name":"normal","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"point":[{"kind":"PropertySignature","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"gridPos":[{"kind":"PropertySignature","id":0,"name":"gridPos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true}],"object":[{"kind":"PropertySignature","id":0,"name":"object","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"},"questionToken":true}]}},"jsDoc":{"tags":{"group":["Math"]}}}],"RaycastResult":[{"kind":"TypeAliasDeclaration","id":0,"name":"RaycastResult","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RaycastHit"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Point":[{"kind":"ClassDeclaration","id":0,"name":"Point","members":{"pt":[{"kind":"PropertyDeclaration","id":0,"name":"pt","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Point"}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"area":[{"kind":"MethodDeclaration","id":0,"name":"area","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Point"}}],"collides":[{"kind":"MethodDeclaration","id":0,"name":"collides","parameters":[{"kind":"Parameter","id":0,"name":"shape","type":{"kind":"TypeReference","id":0,"typeName":"ShapeType"}}],"type":{"kind":"BooleanKeyword","id":0}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"raycast":[{"kind":"MethodDeclaration","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"}}],"random":[{"kind":"MethodDeclaration","id":0,"name":"random","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]}}],"Line":[{"kind":"ClassDeclaration","id":0,"name":"Line","members":{"p1":[{"kind":"PropertyDeclaration","id":0,"name":"p1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"p2":[{"kind":"PropertyDeclaration","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Line"}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"area":[{"kind":"MethodDeclaration","id":0,"name":"area","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Line"}}],"collides":[{"kind":"MethodDeclaration","id":0,"name":"collides","parameters":[{"kind":"Parameter","id":0,"name":"shape","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"ShapeType"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"type":{"kind":"BooleanKeyword","id":0}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"raycast":[{"kind":"MethodDeclaration","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"}}],"random":[{"kind":"MethodDeclaration","id":0,"name":"random","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Rect":[{"kind":"ClassDeclaration","id":0,"name":"Rect","members":{"pos":[{"kind":"PropertyDeclaration","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"width":[{"kind":"PropertyDeclaration","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertyDeclaration","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"fromPoints":[{"kind":"MethodDeclaration","id":0,"name":"fromPoints","parameters":[{"kind":"Parameter","id":0,"name":"p1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"center":[{"kind":"MethodDeclaration","id":0,"name":"center","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"points":[{"kind":"MethodDeclaration","id":0,"name":"points","parameters":[],"type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"area":[{"kind":"MethodDeclaration","id":0,"name":"area","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"distToPoint":[{"kind":"MethodDeclaration","id":0,"name":"distToPoint","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"NumberKeyword","id":0}}],"sdistToPoint":[{"kind":"MethodDeclaration","id":0,"name":"sdistToPoint","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"NumberKeyword","id":0}}],"collides":[{"kind":"MethodDeclaration","id":0,"name":"collides","parameters":[{"kind":"Parameter","id":0,"name":"shape","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"ShapeType"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"type":{"kind":"BooleanKeyword","id":0}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"raycast":[{"kind":"MethodDeclaration","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"}}],"random":[{"kind":"MethodDeclaration","id":0,"name":"random","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Circle":[{"kind":"ClassDeclaration","id":0,"name":"Circle","members":{"center":[{"kind":"PropertyDeclaration","id":0,"name":"center","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"radius":[{"kind":"PropertyDeclaration","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"tr","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Ellipse"}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"area":[{"kind":"MethodDeclaration","id":0,"name":"area","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Circle"}}],"collides":[{"kind":"MethodDeclaration","id":0,"name":"collides","parameters":[{"kind":"Parameter","id":0,"name":"shape","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"ShapeType"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"type":{"kind":"BooleanKeyword","id":0}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"raycast":[{"kind":"MethodDeclaration","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"}}],"random":[{"kind":"MethodDeclaration","id":0,"name":"random","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Ellipse":[{"kind":"ClassDeclaration","id":0,"name":"Ellipse","members":{"center":[{"kind":"PropertyDeclaration","id":0,"name":"center","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"radiusX":[{"kind":"PropertyDeclaration","id":0,"name":"radiusX","type":{"kind":"NumberKeyword","id":0}}],"radiusY":[{"kind":"PropertyDeclaration","id":0,"name":"radiusY","type":{"kind":"NumberKeyword","id":0}}],"angle":[{"kind":"PropertyDeclaration","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"fromMat2":[{"kind":"MethodDeclaration","id":0,"name":"fromMat2","parameters":[{"kind":"Parameter","id":0,"name":"tr","type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Ellipse"}}],"toMat2":[{"kind":"MethodDeclaration","id":0,"name":"toMat2","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Mat2"}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"tr","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Ellipse"}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"area":[{"kind":"MethodDeclaration","id":0,"name":"area","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Ellipse"}}],"collides":[{"kind":"MethodDeclaration","id":0,"name":"collides","parameters":[{"kind":"Parameter","id":0,"name":"shape","type":{"kind":"TypeReference","id":0,"typeName":"ShapeType"}}],"type":{"kind":"BooleanKeyword","id":0}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"raycast":[{"kind":"MethodDeclaration","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"}}],"random":[{"kind":"MethodDeclaration","id":0,"name":"random","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Polygon":[{"kind":"ClassDeclaration","id":0,"name":"Polygon","members":{"pts":[{"kind":"PropertyDeclaration","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}],"transform":[{"kind":"MethodDeclaration","id":0,"name":"transform","parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}],"bbox":[{"kind":"MethodDeclaration","id":0,"name":"bbox","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"area":[{"kind":"MethodDeclaration","id":0,"name":"area","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clone":[{"kind":"MethodDeclaration","id":0,"name":"clone","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}],"collides":[{"kind":"MethodDeclaration","id":0,"name":"collides","parameters":[{"kind":"Parameter","id":0,"name":"shape","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"ShapeType"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"type":{"kind":"BooleanKeyword","id":0}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"point","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}],"raycast":[{"kind":"MethodDeclaration","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"}}],"random":[{"kind":"MethodDeclaration","id":0,"name":"random","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"cut":[{"kind":"MethodDeclaration","id":0,"name":"cut","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TupleType","id":0,"elements":[{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Polygon"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Polygon"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}]}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"StepPosition":[{"kind":"TypeAliasDeclaration","id":0,"name":"StepPosition","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"jump-start","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"jump-end","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"jump-none","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"jump-both","hasExtendedUnicodeEscape":false}}]}}],"DrawCurveOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawCurveOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"segments":[{"kind":"PropertySignature","id":0,"name":"segments","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The amount of line segments to draw.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The width of the line.","tags":{}}}]}}]}}],"DrawBezierOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawBezierOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"DrawCurveOpt"},{"kind":"TypeLiteral","id":0,"members":{"pt1":[{"kind":"PropertySignature","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The first point.","tags":{}}}],"pt2":[{"kind":"PropertySignature","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The the first control point.","tags":{}}}],"pt3":[{"kind":"PropertySignature","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The the second control point.","tags":{}}}],"pt4":[{"kind":"PropertySignature","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The second point.","tags":{}}}]}}]}}],"DrawCircleOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawCircleOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Omit","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"angle","hasExtendedUnicodeEscape":false}}]},{"kind":"TypeLiteral","id":0,"members":{"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Radius of the circle.","tags":{}}}],"start":[{"kind":"PropertySignature","id":0,"name":"start","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Starting angle.","tags":{}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the shape with color (set this to false if you only want an outline).","tags":{}}}],"gradient":[{"kind":"PropertySignature","id":0,"name":"gradient","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"TypeReference","id":0,"typeName":"Color"}]},"questionToken":true,"jsDoc":{"doc":"Use gradient instead of solid color.","tags":{"since":["v3000.0"]}}}],"resolution":[{"kind":"PropertySignature","id":0,"name":"resolution","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Multiplier for circle vertices resolution (default 1)","tags":{}}}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"The anchor point, or the pivot point. Default to \"topleft\".","tags":{}}}]}}]},"jsDoc":{"doc":"How the circle should look like.","tags":{}}}],"GfxFont":[{"kind":"InterfaceDeclaration","id":0,"name":"GfxFont","members":{"tex":[{"kind":"PropertySignature","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"map":[{"kind":"PropertySignature","id":0,"name":"map","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Quad"}]}}],"size":[{"kind":"PropertySignature","id":0,"name":"size","type":{"kind":"NumberKeyword","id":0}}]}}],"BitmapFontData":[{"kind":"TypeAliasDeclaration","id":0,"name":"BitmapFontData","type":{"kind":"TypeReference","id":0,"typeName":"GfxFont"}}],"LoadBitmapFontOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"LoadBitmapFontOpt","members":{"chars":[{"kind":"PropertySignature","id":0,"name":"chars","type":{"kind":"StringKeyword","id":0},"questionToken":true}],"filter":[{"kind":"PropertySignature","id":0,"name":"filter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}],"outline":[{"kind":"PropertySignature","id":0,"name":"outline","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]}}],"FontData":[{"kind":"ClassDeclaration","id":0,"name":"FontData","members":{"fontface":[{"kind":"PropertyDeclaration","id":0,"name":"fontface","type":{"kind":"TypeReference","id":0,"typeName":"FontFace"}}],"filter":[{"kind":"PropertyDeclaration","id":0,"name":"filter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"}}],"outline":[{"kind":"PropertyDeclaration","id":0,"name":"outline","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Outline"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"size":[{"kind":"PropertyDeclaration","id":0,"name":"size","type":{"kind":"NumberKeyword","id":0}}]}}],"DrawTextOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawTextOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"text":[{"kind":"PropertySignature","id":0,"name":"text","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"The text to render.","tags":{}}}],"font":[{"kind":"PropertySignature","id":0,"name":"font","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"FontData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"FontData"}]},{"kind":"TypeReference","id":0,"typeName":"BitmapFontData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"BitmapFontData"}]}]},"questionToken":true,"jsDoc":{"doc":"The name of font to use.","tags":{}}}],"size":[{"kind":"PropertySignature","id":0,"name":"size","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The size of text (the height of each character).","tags":{}}}],"align":[{"kind":"PropertySignature","id":0,"name":"align","type":{"kind":"TypeReference","id":0,"typeName":"TextAlign"},"questionToken":true,"jsDoc":{"doc":"Text alignment (default \"left\")","tags":{"since":["v3000.0"]}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The maximum width. Will wrap word around if exceed.","tags":{}}}],"lineSpacing":[{"kind":"PropertySignature","id":0,"name":"lineSpacing","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The gap between each line (only available for bitmap fonts).","tags":{"since":["v2000.2"]}}}],"letterSpacing":[{"kind":"PropertySignature","id":0,"name":"letterSpacing","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The gap between each character (only available for bitmap fonts).","tags":{"since":["v2000.2"]}}}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"The anchor point, or the pivot point. Default to \"topleft\".","tags":{}}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CharTransform"},{"kind":"TypeReference","id":0,"typeName":"CharTransformFunc"}]},"questionToken":true,"jsDoc":{"doc":"Transform the pos, scale, rotation or color for each character based on the index or char (only available for bitmap fonts).","tags":{"since":["v2000.1"]}}}],"styles":[{"kind":"PropertySignature","id":0,"name":"styles","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CharTransform"},{"kind":"TypeReference","id":0,"typeName":"CharTransformFunc"}]}]},"questionToken":true,"jsDoc":{"doc":"Stylesheet for styled chunks, in the syntax of \"this is a [stylename]styled[/stylename] word\" (only available for bitmap fonts).","tags":{"since":["v2000.2"]}}}]}}]},"jsDoc":{"doc":"How the text should look like.","tags":{"group":["Draw"]}}}],"CharTransformFunc":[{"kind":"TypeAliasDeclaration","id":0,"name":"CharTransformFunc","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"idx","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"ch","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"CharTransform"}},"jsDoc":{"doc":"A function that returns a character transform config. Useful if you're generating dynamic styles.","tags":{}}}],"CharTransform":[{"kind":"InterfaceDeclaration","id":0,"name":"CharTransform","members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"color":[{"kind":"PropertySignature","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"questionToken":true}],"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]},"jsDoc":{"doc":"Describes how to transform each character.","tags":{"group":["Options"]}}}],"TextAlign":[{"kind":"TypeAliasDeclaration","id":0,"name":"TextAlign","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"center","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"right","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"How the text should be aligned.","tags":{"group":["Draw"]}}}],"FormattedText":[{"kind":"TypeAliasDeclaration","id":0,"name":"FormattedText","type":{"kind":"TypeLiteral","id":0,"members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"chars":[{"kind":"PropertySignature","id":0,"name":"chars","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"FormattedChar"}}}],"opt":[{"kind":"PropertySignature","id":0,"name":"opt","type":{"kind":"TypeReference","id":0,"typeName":"DrawTextOpt"}}]}},"jsDoc":{"doc":"Formatted text with info on how and where to render each character.","tags":{}}}],"FormattedChar":[{"kind":"InterfaceDeclaration","id":0,"name":"FormattedChar","members":{"ch":[{"kind":"PropertySignature","id":0,"name":"ch","type":{"kind":"StringKeyword","id":0}}],"tex":[{"kind":"PropertySignature","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"quad":[{"kind":"PropertySignature","id":0,"name":"quad","type":{"kind":"TypeReference","id":0,"typeName":"Quad"}}],"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"color":[{"kind":"PropertySignature","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0}}]},"jsDoc":{"doc":"One formated character.","tags":{}}}],"DrawLineOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawLineOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Omit","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"angle","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"scale","hasExtendedUnicodeEscape":false}}]}]},{"kind":"TypeLiteral","id":0,"members":{"p1":[{"kind":"PropertySignature","id":0,"name":"p1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Starting point of the line.","tags":{}}}],"p2":[{"kind":"PropertySignature","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Ending point of the line.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The width, or thickness of the line,","tags":{}}}]}}]},"jsDoc":{"doc":"How the line should look like.","tags":{}}}],"LineJoin":[{"kind":"TypeAliasDeclaration","id":0,"name":"LineJoin","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"none","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"round","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"bevel","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"miter","hasExtendedUnicodeEscape":false}}]}}],"LineCap":[{"kind":"TypeAliasDeclaration","id":0,"name":"LineCap","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"butt","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"round","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"square","hasExtendedUnicodeEscape":false}}]}}],"DrawLinesOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawLinesOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Omit","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"angle","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"scale","hasExtendedUnicodeEscape":false}}]}]},{"kind":"TypeLiteral","id":0,"members":{"pts":[{"kind":"PropertySignature","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"The points that should be connected with a line.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The width, or thickness of the lines,","tags":{}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}]},"questionToken":true,"jsDoc":{"doc":"The radius of each corner.","tags":{}}}],"join":[{"kind":"PropertySignature","id":0,"name":"join","type":{"kind":"TypeReference","id":0,"typeName":"LineJoin"},"questionToken":true,"jsDoc":{"doc":"Line join style (default \"none\").","tags":{}}}],"cap":[{"kind":"PropertySignature","id":0,"name":"cap","type":{"kind":"TypeReference","id":0,"typeName":"LineCap"},"questionToken":true,"jsDoc":{"doc":"Line cap style (default \"none\").","tags":{}}}],"miterLimit":[{"kind":"PropertySignature","id":0,"name":"miterLimit","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Maximum miter length, anything longer becomes bevel.","tags":{}}}]}}]},"jsDoc":{"doc":"How the lines should look like.","tags":{}}}],"DrawRectOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawRectOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width of the rectangle.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height of the rectangle.","tags":{}}}],"gradient":[{"kind":"PropertySignature","id":0,"name":"gradient","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"TypeReference","id":0,"typeName":"Color"}]},"questionToken":true,"jsDoc":{"doc":"Use gradient instead of solid color.","tags":{"since":["v3000.0"]}}}],"horizontal":[{"kind":"PropertySignature","id":0,"name":"horizontal","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If the gradient should be horizontal.","tags":{"since":["v3000.0"]}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the shape with color (set this to false if you only want an outline).","tags":{}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}]},"questionToken":true,"jsDoc":{"doc":"The radius of each corner.","tags":{}}}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"The anchor point, or the pivot point. Default to \"topleft\".","tags":{}}}]}}]},"jsDoc":{"doc":"How the rectangle should look like.","tags":{}}}],"Graph":[{"kind":"InterfaceDeclaration","id":0,"name":"Graph","members":{"getNeighbours":[{"kind":"MethodSignature","id":0,"name":"getNeighbours","parameters":[{"kind":"Parameter","id":0,"name":"node","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"getCost":[{"kind":"MethodSignature","id":0,"name":"getCost","parameters":[{"kind":"Parameter","id":0,"name":"node","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"neighbor","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"getHeuristic":[{"kind":"MethodSignature","id":0,"name":"getHeuristic","parameters":[{"kind":"Parameter","id":0,"name":"node","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"goal","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"getPath":[{"kind":"MethodSignature","id":0,"name":"getPath","parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"getWaypointPath":[{"kind":"MethodSignature","id":0,"name":"getWaypointPath","parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}]}}],"Grid":[{"kind":"ClassDeclaration","id":0,"name":"Grid","heritageClauses":[{"kind":"HeritageClause","id":0,"token":119,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Graph"}}]}],"members":{"_columns":[{"kind":"PropertyDeclaration","id":0,"name":"_columns"}],"_rows":[{"kind":"PropertyDeclaration","id":0,"name":"_rows"}],"_tileWidth":[{"kind":"PropertyDeclaration","id":0,"name":"_tileWidth"}],"_tileHeight":[{"kind":"PropertyDeclaration","id":0,"name":"_tileHeight"}],"_data":[{"kind":"PropertyDeclaration","id":0,"name":"_data"}],"_diagonals":[{"kind":"PropertyDeclaration","id":0,"name":"_diagonals"}],"_connMap":[{"kind":"PropertyDeclaration","id":0,"name":"_connMap"}],"_buildConnectivityMap":[{"kind":"PropertyDeclaration","id":0,"name":"_buildConnectivityMap"}],"_getTile":[{"kind":"PropertyDeclaration","id":0,"name":"_getTile"}],"_getTileX":[{"kind":"PropertyDeclaration","id":0,"name":"_getTileX"}],"_getTileY":[{"kind":"PropertyDeclaration","id":0,"name":"_getTileY"}],"getNeighbours":[{"kind":"MethodDeclaration","id":0,"name":"getNeighbours","parameters":[{"kind":"Parameter","id":0,"name":"tile","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"getCost":[{"kind":"MethodDeclaration","id":0,"name":"getCost","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"getHeuristic":[{"kind":"MethodDeclaration","id":0,"name":"getHeuristic","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"getPath":[{"kind":"MethodDeclaration","id":0,"name":"getPath","parameters":[{"kind":"Parameter","id":0,"name":"start","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"goal","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"getWaypointPath":[{"kind":"MethodDeclaration","id":0,"name":"getWaypointPath","parameters":[{"kind":"Parameter","id":0,"name":"start","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"goal","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}]},"jsDoc":{"doc":"A grid is a graph consisting of connected grid cells","tags":{}}}],"NavEdge":[{"kind":"ClassDeclaration","id":0,"name":"NavEdge","members":{"a":[{"kind":"PropertyDeclaration","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"b":[{"kind":"PropertyDeclaration","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"polygon":[{"kind":"PropertyDeclaration","id":0,"name":"polygon","type":{"kind":"TypeReference","id":0,"typeName":"WeakRef","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"NavPolygon"}]}}],"isLeft":[{"kind":"MethodDeclaration","id":0,"name":"isLeft","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"middle":[{"kind":"GetAccessor","id":0,"name":"middle","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]}}],"NavPolygon":[{"kind":"ClassDeclaration","id":0,"name":"NavPolygon","members":{"_edges":[{"kind":"PropertyDeclaration","id":0,"name":"_edges"}],"_centroid":[{"kind":"PropertyDeclaration","id":0,"name":"_centroid"}],"_id":[{"kind":"PropertyDeclaration","id":0,"name":"_id"}],"id":[{"kind":"GetAccessor","id":0,"name":"id","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"edges":[{"kind":"SetAccessor","id":0,"name":"edges","parameters":[{"kind":"Parameter","id":0,"name":"edges","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"NavEdge"}}}]},{"kind":"GetAccessor","id":0,"name":"edges","parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"NavEdge"}}}],"centroid":[{"kind":"GetAccessor","id":0,"name":"centroid","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"contains":[{"kind":"MethodDeclaration","id":0,"name":"contains","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0}}]}}],"NavMesh":[{"kind":"ClassDeclaration","id":0,"name":"NavMesh","heritageClauses":[{"kind":"HeritageClause","id":0,"token":119,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Graph"}}]}],"members":{"_polygons":[{"kind":"PropertyDeclaration","id":0,"name":"_polygons"}],"_pointCache":[{"kind":"PropertyDeclaration","id":0,"name":"_pointCache"}],"_edgeCache":[{"kind":"PropertyDeclaration","id":0,"name":"_edgeCache"}],"_addPoint":[{"kind":"PropertyDeclaration","id":0,"name":"_addPoint"}],"_addEdge":[{"kind":"PropertyDeclaration","id":0,"name":"_addEdge"}],"_findEdge":[{"kind":"PropertyDeclaration","id":0,"name":"_findEdge"}],"_findCommonEdge":[{"kind":"PropertyDeclaration","id":0,"name":"_findCommonEdge"}],"addPolygon":[{"kind":"MethodDeclaration","id":0,"name":"addPolygon","parameters":[{"kind":"Parameter","id":0,"name":"vertices","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}],"type":{"kind":"TypeReference","id":0,"typeName":"NavPolygon"}}],"addRect":[{"kind":"MethodDeclaration","id":0,"name":"addRect","parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"size","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"NavPolygon"}}],"_getLocation":[{"kind":"PropertyDeclaration","id":0,"name":"_getLocation"}],"getNeighbours":[{"kind":"MethodDeclaration","id":0,"name":"getNeighbours","parameters":[{"kind":"Parameter","id":0,"name":"index","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"getCost":[{"kind":"MethodDeclaration","id":0,"name":"getCost","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"getHeuristic":[{"kind":"MethodDeclaration","id":0,"name":"getHeuristic","parameters":[{"kind":"Parameter","id":0,"name":"indexA","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"indexB","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}],"getPath":[{"kind":"MethodDeclaration","id":0,"name":"getPath","parameters":[{"kind":"Parameter","id":0,"name":"start","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"goal","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}],"getWaypointPath":[{"kind":"MethodDeclaration","id":0,"name":"getWaypointPath","parameters":[{"kind":"Parameter","id":0,"name":"start","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"goal","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}]}}],"DrawSpriteOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawSpriteOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"sprite":[{"kind":"PropertySignature","id":0,"name":"sprite","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SpriteData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}]},"jsDoc":{"doc":"The sprite name in the asset manager, or the raw sprite data.","tags":{}}}],"frame":[{"kind":"PropertySignature","id":0,"name":"frame","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If the sprite is loaded with multiple frames, or sliced, use the frame option to specify which frame to draw.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Width of sprite. If `height` is not specified it'll stretch with aspect ratio. If `tiled` is set to true it'll tiled to the specified width horizontally.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Height of sprite. If `width` is not specified it'll stretch with aspect ratio. If `tiled` is set to true it'll tiled to the specified width vertically.","tags":{}}}],"tiled":[{"kind":"PropertySignature","id":0,"name":"tiled","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"When set to true, `width` and `height` will not scale the sprite but instead render multiple tiled copies of them until the specified width and height. Useful for background texture pattern etc.","tags":{}}}],"flipX":[{"kind":"PropertySignature","id":0,"name":"flipX","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If flip the texture horizontally.","tags":{}}}],"flipY":[{"kind":"PropertySignature","id":0,"name":"flipY","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If flip the texture vertically.","tags":{}}}],"quad":[{"kind":"PropertySignature","id":0,"name":"quad","type":{"kind":"TypeReference","id":0,"typeName":"Quad"},"questionToken":true,"jsDoc":{"doc":"The sub-area to render from the texture, by default it'll render the whole `quad(0, 0, 1, 1)`","tags":{}}}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"The anchor point, or the pivot point. Default to \"topleft\".","tags":{}}}]}}]},"jsDoc":{"doc":"How the sprite should look like.","tags":{}}}],"DrawTriangleOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawTriangleOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"p1":[{"kind":"PropertySignature","id":0,"name":"p1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"First point of triangle.","tags":{}}}],"p2":[{"kind":"PropertySignature","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Second point of triangle.","tags":{}}}],"p3":[{"kind":"PropertySignature","id":0,"name":"p3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Third point of triangle.","tags":{}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the shape with color (set this to false if you only want an outline).","tags":{}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The radius of each corner.","tags":{}}}]}}]},"jsDoc":{"doc":"How the triangle should look like.","tags":{}}}],"ShaderData":[{"kind":"TypeAliasDeclaration","id":0,"name":"ShaderData","type":{"kind":"TypeReference","id":0,"typeName":"Shader"}}],"UniformValue":[{"kind":"TypeAliasDeclaration","id":0,"name":"UniformValue","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"TypeReference","id":0,"typeName":"Mat4"},{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Color"}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"UniformKey":[{"kind":"TypeAliasDeclaration","id":0,"name":"UniformKey","type":{"kind":"TypeReference","id":0,"typeName":"Exclude","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"u_tex","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Uniform":[{"kind":"TypeAliasDeclaration","id":0,"name":"Uniform","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"UniformKey"},{"kind":"TypeReference","id":0,"typeName":"UniformValue"}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Shader":[{"kind":"ClassDeclaration","id":0,"name":"Shader","members":{"ctx":[{"kind":"PropertyDeclaration","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"glProgram":[{"kind":"PropertyDeclaration","id":0,"name":"glProgram","type":{"kind":"TypeReference","id":0,"typeName":"WebGLProgram"}}],"bind":[{"kind":"MethodDeclaration","id":0,"name":"bind","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"unbind":[{"kind":"MethodDeclaration","id":0,"name":"unbind","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"send":[{"kind":"MethodDeclaration","id":0,"name":"send","parameters":[{"kind":"Parameter","id":0,"name":"uniform","type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}],"type":{"kind":"VoidKeyword","id":0}}],"free":[{"kind":"MethodDeclaration","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]},"jsDoc":{"tags":{"group":["GFX"]}}}],"AppGfxCtx":[{"kind":"TypeAliasDeclaration","id":0,"name":"AppGfxCtx","type":{"kind":"TypeReference","id":0,"typeName":"ReturnType","typeArguments":[{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"initAppGfx"}}]}}],"undefined":[{"kind":"FirstStatement","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initAppGfx","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"gopt","type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYOpt"}},{"kind":"Parameter","id":0,"name":"ggl","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"type":{"kind":"TypeLiteral","id":0,"members":{"lastDrawCalls":[{"kind":"PropertySignature","id":0,"name":"lastDrawCalls","type":{"kind":"NumberKeyword","id":0}}],"ggl":[{"kind":"PropertySignature","id":0,"name":"ggl","type":{"kind":"TypeLiteral","id":0,"members":{"gl":[{"kind":"PropertySignature","id":0,"name":"gl","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderingContext"}}],"opts":[{"kind":"PropertySignature","id":0,"name":"opts","type":{"kind":"TypeLiteral","id":0,"members":{"texFilter":[{"kind":"PropertySignature","id":0,"name":"texFilter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}]}}}],"onDestroy":[{"kind":"PropertySignature","id":0,"name":"onDestroy","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"UnknownKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushTexture2D":[{"kind":"PropertySignature","id":0,"name":"pushTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLTexture"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popTexture2D":[{"kind":"PropertySignature","id":0,"name":"popTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushFramebuffer":[{"kind":"PropertySignature","id":0,"name":"pushFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLFramebuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popFramebuffer":[{"kind":"PropertySignature","id":0,"name":"popFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"pushRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderbuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"popRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushViewport":[{"kind":"PropertySignature","id":0,"name":"pushViewport","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"w":[{"kind":"PropertySignature","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertySignature","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}]}}}],"type":{"kind":"VoidKeyword","id":0}}}],"popViewport":[{"kind":"PropertySignature","id":0,"name":"popViewport","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushProgram":[{"kind":"PropertySignature","id":0,"name":"pushProgram","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLProgram"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popProgram":[{"kind":"PropertySignature","id":0,"name":"popProgram","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"setVertexFormat":[{"kind":"PropertySignature","id":0,"name":"setVertexFormat","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"fmt","type":{"kind":"TypeReference","id":0,"typeName":"VertexFormat"}}],"type":{"kind":"VoidKeyword","id":0}}}]}}}],"defShader":[{"kind":"PropertySignature","id":0,"name":"defShader","type":{"kind":"TypeReference","id":0,"typeName":"Shader"}}],"defTex":[{"kind":"PropertySignature","id":0,"name":"defTex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"frameBuffer":[{"kind":"PropertySignature","id":0,"name":"frameBuffer","type":{"kind":"TypeReference","id":0,"typeName":"FrameBuffer"}}],"postShader":[{"kind":"PropertySignature","id":0,"name":"postShader","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"postShaderUniform":[{"kind":"PropertySignature","id":0,"name":"postShaderUniform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Uniform"},{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"renderer":[{"kind":"PropertySignature","id":0,"name":"renderer","type":{"kind":"TypeReference","id":0,"typeName":"BatchRenderer"}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"transformStack":[{"kind":"PropertySignature","id":0,"name":"transformStack","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}}],"bgTex":[{"kind":"PropertySignature","id":0,"name":"bgTex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"bgColor":[{"kind":"PropertySignature","id":0,"name":"bgColor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"bgAlpha":[{"kind":"PropertySignature","id":0,"name":"bgAlpha","type":{"kind":"NumberKeyword","id":0}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"viewport":[{"kind":"PropertySignature","id":0,"name":"viewport","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}]}}}],"fixed":[{"kind":"PropertySignature","id":0,"name":"fixed","type":{"kind":"BooleanKeyword","id":0}}]}}}}]}},{"kind":"FirstStatement","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initAssets","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"ggl","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"type":{"kind":"TypeLiteral","id":0,"members":{"urlPrefix":[{"kind":"PropertySignature","id":0,"name":"urlPrefix","type":{"kind":"StringKeyword","id":0}}],"sprites":[{"kind":"PropertySignature","id":0,"name":"sprites","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}}],"fonts":[{"kind":"PropertySignature","id":0,"name":"fonts","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"FontData"}]}}],"bitmapFonts":[{"kind":"PropertySignature","id":0,"name":"bitmapFonts","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GfxFont"}]}}],"sounds":[{"kind":"PropertySignature","id":0,"name":"sounds","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]}}],"shaders":[{"kind":"PropertySignature","id":0,"name":"shaders","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Shader"}]}}],"custom":[{"kind":"PropertySignature","id":0,"name":"custom","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"AnyKeyword","id":0}]}}],"music":[{"kind":"PropertySignature","id":0,"name":"music","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"StringKeyword","id":0}]}}],"packer":[{"kind":"PropertySignature","id":0,"name":"packer","type":{"kind":"TypeReference","id":0,"typeName":"TexPacker"}}],"loaded":[{"kind":"PropertySignature","id":0,"name":"loaded","type":{"kind":"BooleanKeyword","id":0}}]}}}}]}},{"kind":"FirstStatement","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initAudio","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"ctx":[{"kind":"PropertySignature","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"AudioContext"}}],"masterNode":[{"kind":"PropertySignature","id":0,"name":"masterNode","type":{"kind":"TypeReference","id":0,"typeName":"GainNode"}}],"burpSnd":[{"kind":"PropertySignature","id":0,"name":"burpSnd","type":{"kind":"TypeReference","id":0,"typeName":"SoundData"}}]}}}}]}},{"kind":"FirstStatement","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initGame","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"events":[{"kind":"PropertySignature","id":0,"name":"events","type":{"kind":"TypeReference","id":0,"typeName":"KEventHandler","typeArguments":[{"kind":"TypeLiteral","id":0,"members":{"mouseMove":[{"kind":"PropertySignature","id":0,"name":"mouseMove","type":{"kind":"TupleType","id":0,"elements":[]}}],"mouseDown":[{"kind":"PropertySignature","id":0,"name":"mouseDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"mousePress":[{"kind":"PropertySignature","id":0,"name":"mousePress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"mouseRelease":[{"kind":"PropertySignature","id":0,"name":"mouseRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"charInput":[{"kind":"PropertySignature","id":0,"name":"charInput","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"keyPress":[{"kind":"PropertySignature","id":0,"name":"keyPress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyDown":[{"kind":"PropertySignature","id":0,"name":"keyDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyPressRepeat":[{"kind":"PropertySignature","id":0,"name":"keyPressRepeat","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyRelease":[{"kind":"PropertySignature","id":0,"name":"keyRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"touchStart":[{"kind":"PropertySignature","id":0,"name":"touchStart","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"touchMove":[{"kind":"PropertySignature","id":0,"name":"touchMove","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"touchEnd":[{"kind":"PropertySignature","id":0,"name":"touchEnd","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"gamepadButtonDown":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadButtonPress":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonPress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadButtonRelease":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadStick":[{"kind":"PropertySignature","id":0,"name":"gamepadStick","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"gamepadConnect":[{"kind":"PropertySignature","id":0,"name":"gamepadConnect","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Gamepad"}]}}],"gamepadDisconnect":[{"kind":"PropertySignature","id":0,"name":"gamepadDisconnect","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Gamepad"}]}}],"scroll":[{"kind":"PropertySignature","id":0,"name":"scroll","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"add":[{"kind":"PropertySignature","id":0,"name":"add","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"GameObj"}]}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"GameObj"}]}}],"load":[{"kind":"PropertySignature","id":0,"name":"load","type":{"kind":"TupleType","id":0,"elements":[]}}],"loading":[{"kind":"PropertySignature","id":0,"name":"loading","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0}]}}],"error":[{"kind":"PropertySignature","id":0,"name":"error","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Error"}]}}],"input":[{"kind":"PropertySignature","id":0,"name":"input","type":{"kind":"TupleType","id":0,"elements":[]}}],"frameEnd":[{"kind":"PropertySignature","id":0,"name":"frameEnd","type":{"kind":"TupleType","id":0,"elements":[]}}],"resize":[{"kind":"PropertySignature","id":0,"name":"resize","type":{"kind":"TupleType","id":0,"elements":[]}}],"sceneLeave":[{"kind":"PropertySignature","id":0,"name":"sceneLeave","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}]}}]}}],"objEvents":[{"kind":"PropertySignature","id":0,"name":"objEvents","type":{"kind":"TypeReference","id":0,"typeName":"KEventHandler","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GameObjEventMap"}]}}],"root":[{"kind":"PropertySignature","id":0,"name":"root","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TimerComp"}]}}],"gravity":[{"kind":"PropertySignature","id":0,"name":"gravity","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"scenes":[{"kind":"PropertySignature","id":0,"name":"scenes","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SceneName"},{"kind":"TypeReference","id":0,"typeName":"SceneDef"}]}}],"currentScene":[{"kind":"PropertySignature","id":0,"name":"currentScene","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"SceneName"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"layers":[{"kind":"PropertySignature","id":0,"name":"layers","type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"defaultLayerIndex":[{"kind":"PropertySignature","id":0,"name":"defaultLayerIndex","type":{"kind":"NumberKeyword","id":0}}],"logs":[{"kind":"PropertySignature","id":0,"name":"logs","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeLiteral","id":0,"members":{"msg":[{"kind":"PropertySignature","id":0,"name":"msg","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{}}]}}],"time":[{"kind":"PropertySignature","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}}]}}}}],"cam":[{"kind":"PropertySignature","id":0,"name":"cam","type":{"kind":"TypeLiteral","id":0,"members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"shake":[{"kind":"PropertySignature","id":0,"name":"shake","type":{"kind":"NumberKeyword","id":0}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}]}}}]}}}}]}},{"kind":"FirstStatement","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"kaplay","type":{"kind":"FunctionType","id":0,"typeParameters":[{"kind":"TypeParameter","id":0,"name":"TPlugins","constraint":{"kind":"TypeReference","id":0,"typeName":"PluginList","typeArguments":[{"kind":"UnknownKeyword","id":0}]},"default":{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]}},{"kind":"TypeParameter","id":0,"name":"TButtons","constraint":{"kind":"TypeReference","id":0,"typeName":"ButtonsDef"},"default":{"kind":"TypeLiteral","id":0,"members":{}}},{"kind":"TypeParameter","id":0,"name":"TButtonsName","constraint":{"kind":"StringKeyword","id":0},"default":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"TButtons"}},{"kind":"StringKeyword","id":0}]}}],"parameters":[{"kind":"Parameter","id":0,"name":"gopt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYOpt","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TPlugins"},{"kind":"TypeReference","id":0,"typeName":"TButtons"}]}}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"TPlugins"},"extendsType":{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]},"trueType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TButtons"},{"kind":"TypeReference","id":0,"typeName":"TButtonsName"}]},"falseType":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TButtons"},{"kind":"TypeReference","id":0,"typeName":"TButtonsName"}]},{"kind":"TypeReference","id":0,"typeName":"MergePlugins","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TPlugins"}]}]}}}}]},"jsDoc":{"doc":"Initialize KAPLAY context. The starting point of all KAPLAY games.","tags":{"example":["```js\n// Start KAPLAY with default options (will create a fullscreen canvas under )\nkaplay()\n\n// Init with some options\nkaplay({\n width: 320,\n height: 240,\n font: \"sans-serif\",\n canvas: document.querySelector(\"#mycanvas\"),\n background: [ 0, 0, 255, ],\n})\n\n// All KAPLAY functions are imported to global after calling kaplay()\nadd()\nonUpdate()\nonKeyPress()\nvec2()\n\n// If you want to prevent KAPLAY from importing all functions to global and use a context handle for all KAPLAY functions\nconst k = kaplay({ global: false })\n\nk.add(...)\nk.onUpdate(...)\nk.onKeyPress(...)\nk.vec2(...)\n```"],"group":["Start"]}}},{"kind":"ExportDeclaration","id":0,"isTypeOnly":false,"exportClause":{"kind":"NamedExports","id":0,"elements":[{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"KAPLAYCtx"},"name":"KaboomCtx"},{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"KAPLAYOpt"},"name":"KaboomOpt"},{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"KAPLAYPlugin"},"name":"KaboomPlugin"},{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"KEvent"},"name":"Event"},{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"KEventController"},"name":"EventController"},{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"KEventHandler"},"name":"EventHandler"},{"kind":"ExportSpecifier","id":0,"isTypeOnly":false,"propertyName":{"kind":"Identifier","id":0,"escapedText":"kaplay"},"name":"default"}]}},{"kind":"ExportDeclaration","id":0,"isTypeOnly":false,"exportClause":{"kind":"NamedExports","id":0,"elements":[]}}],"TexPacker":[{"kind":"ClassDeclaration","id":0,"name":"TexPacker","members":{"textures":[{"kind":"PropertyDeclaration","id":0,"name":"textures"}],"bigTextures":[{"kind":"PropertyDeclaration","id":0,"name":"bigTextures"}],"canvas":[{"kind":"PropertyDeclaration","id":0,"name":"canvas"}],"c2d":[{"kind":"PropertyDeclaration","id":0,"name":"c2d"}],"x":[{"kind":"PropertyDeclaration","id":0,"name":"x"}],"y":[{"kind":"PropertyDeclaration","id":0,"name":"y"}],"curHeight":[{"kind":"PropertyDeclaration","id":0,"name":"curHeight"}],"gfx":[{"kind":"PropertyDeclaration","id":0,"name":"gfx"}],"add":[{"kind":"MethodDeclaration","id":0,"name":"add","parameters":[{"kind":"Parameter","id":0,"name":"img","type":{"kind":"TypeReference","id":0,"typeName":"ImageSource"}}],"type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Texture"},{"kind":"TypeReference","id":0,"typeName":"Quad"}]}}],"free":[{"kind":"MethodDeclaration","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]}}],"SoundData":[{"kind":"ClassDeclaration","id":0,"name":"SoundData","members":{"buf":[{"kind":"PropertyDeclaration","id":0,"name":"buf","type":{"kind":"TypeReference","id":0,"typeName":"AudioBuffer"}}],"fromArrayBuffer":[{"kind":"MethodDeclaration","id":0,"name":"fromArrayBuffer","parameters":[{"kind":"Parameter","id":0,"name":"buf","type":{"kind":"TypeReference","id":0,"typeName":"ArrayBuffer"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]}}],"fromURL":[{"kind":"MethodDeclaration","id":0,"name":"fromURL","parameters":[{"kind":"Parameter","id":0,"name":"url","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]}}]}}],"SpriteAnim":[{"kind":"TypeAliasDeclaration","id":0,"name":"SpriteAnim","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{"from":[{"kind":"PropertySignature","id":0,"name":"from","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The starting frame.","tags":{}}}],"to":[{"kind":"PropertySignature","id":0,"name":"to","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The end frame.","tags":{}}}],"loop":[{"kind":"PropertySignature","id":0,"name":"loop","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If this anim should be played in loop.","tags":{}}}],"pingpong":[{"kind":"PropertySignature","id":0,"name":"pingpong","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"When looping should it move back instead of go to start frame again.","tags":{}}}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"This anim's speed in frames per second.","tags":{}}}]}}]},"jsDoc":{"doc":"Frame-based animation configuration.","tags":{}}}],"SpriteAnims":[{"kind":"TypeAliasDeclaration","id":0,"name":"SpriteAnims","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SpriteAnim"}]},"jsDoc":{"doc":"A dict of name <-> animation.","tags":{}}}],"LoadSpriteOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"LoadSpriteOpt","members":{"sliceX":[{"kind":"PropertySignature","id":0,"name":"sliceX","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If the defined area contains multiple sprites, how many frames are in the area hozizontally.","tags":{}}}],"sliceY":[{"kind":"PropertySignature","id":0,"name":"sliceY","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If the defined area contains multiple sprites, how many frames are in the area vertically.","tags":{}}}],"slice9":[{"kind":"PropertySignature","id":0,"name":"slice9","type":{"kind":"TypeReference","id":0,"typeName":"NineSlice"},"questionToken":true,"jsDoc":{"doc":"9 slice sprite for proportional scaling.","tags":{"since":["v3000.0"]}}}],"frames":[{"kind":"PropertySignature","id":0,"name":"frames","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Quad"}},"questionToken":true,"jsDoc":{"doc":"Individual frames.","tags":{"since":["v3000.0"]}}}],"anims":[{"kind":"PropertySignature","id":0,"name":"anims","type":{"kind":"TypeReference","id":0,"typeName":"SpriteAnims"},"questionToken":true,"jsDoc":{"doc":"Animation configuration.","tags":{}}}]},"jsDoc":{"doc":"Sprite loading configuration.","tags":{}}}],"NineSlice":[{"kind":"TypeAliasDeclaration","id":0,"name":"NineSlice","type":{"kind":"TypeLiteral","id":0,"members":{"left":[{"kind":"PropertySignature","id":0,"name":"left","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The width of the 9-slice's left column.","tags":{}}}],"right":[{"kind":"PropertySignature","id":0,"name":"right","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The width of the 9-slice's right column.","tags":{}}}],"top":[{"kind":"PropertySignature","id":0,"name":"top","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The height of the 9-slice's top row.","tags":{}}}],"bottom":[{"kind":"PropertySignature","id":0,"name":"bottom","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The height of the 9-slice's bottom row.","tags":{}}}]}}}],"LoadSpriteSrc":[{"kind":"TypeAliasDeclaration","id":0,"name":"LoadSpriteSrc","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"ImageSource"}]}}],"SpriteData":[{"kind":"ClassDeclaration","id":0,"name":"SpriteData","members":{"tex":[{"kind":"PropertyDeclaration","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"frames":[{"kind":"PropertyDeclaration","id":0,"name":"frames","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Quad"}}}],"anims":[{"kind":"PropertyDeclaration","id":0,"name":"anims","type":{"kind":"TypeReference","id":0,"typeName":"SpriteAnims"}}],"slice9":[{"kind":"PropertyDeclaration","id":0,"name":"slice9","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"NineSlice"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"width":[{"kind":"GetAccessor","id":0,"name":"width","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"tags":{"since":["v3001.0"]}}}],"height":[{"kind":"GetAccessor","id":0,"name":"height","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"from":[{"kind":"MethodDeclaration","id":0,"name":"from","parameters":[{"kind":"Parameter","id":0,"name":"src","type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteSrc"}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}}],"fromImage":[{"kind":"MethodDeclaration","id":0,"name":"fromImage","parameters":[{"kind":"Parameter","id":0,"name":"data","type":{"kind":"TypeReference","id":0,"typeName":"ImageSource"}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"SpriteData"}}],"fromURL":[{"kind":"MethodDeclaration","id":0,"name":"fromURL","parameters":[{"kind":"Parameter","id":0,"name":"url","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}}]}}],"Asset":[{"kind":"ClassDeclaration","id":0,"name":"Asset","typeParameters":[{"kind":"TypeParameter","id":0,"name":"D"}],"members":{"loaded":[{"kind":"PropertyDeclaration","id":0,"name":"loaded","type":{"kind":"BooleanKeyword","id":0}},{"kind":"MethodDeclaration","id":0,"name":"loaded","typeParameters":[{"kind":"TypeParameter","id":0,"name":"D"}],"parameters":[{"kind":"Parameter","id":0,"name":"data","type":{"kind":"TypeReference","id":0,"typeName":"D"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}],"data":[{"kind":"PropertyDeclaration","id":0,"name":"data","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"D"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"error":[{"kind":"PropertyDeclaration","id":0,"name":"error","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Error"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"onLoadEvents":[{"kind":"PropertyDeclaration","id":0,"name":"onLoadEvents"}],"onErrorEvents":[{"kind":"PropertyDeclaration","id":0,"name":"onErrorEvents"}],"onFinishEvents":[{"kind":"PropertyDeclaration","id":0,"name":"onFinishEvents"}],"onLoad":[{"kind":"MethodDeclaration","id":0,"name":"onLoad","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"data","type":{"kind":"TypeReference","id":0,"typeName":"D"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"ThisType","id":0}}],"onError":[{"kind":"MethodDeclaration","id":0,"name":"onError","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"err","type":{"kind":"TypeReference","id":0,"typeName":"Error"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"ThisType","id":0}}],"onFinish":[{"kind":"MethodDeclaration","id":0,"name":"onFinish","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"ThisType","id":0}}],"then":[{"kind":"MethodDeclaration","id":0,"name":"then","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"data","type":{"kind":"TypeReference","id":0,"typeName":"D"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}],"catch":[{"kind":"MethodDeclaration","id":0,"name":"catch","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"err","type":{"kind":"TypeReference","id":0,"typeName":"Error"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}],"finally":[{"kind":"MethodDeclaration","id":0,"name":"finally","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}]},"jsDoc":{"doc":"An asset is a resource that is loaded asynchronously.","tags":{}}}],"AssetBucket":[{"kind":"ClassDeclaration","id":0,"name":"AssetBucket","typeParameters":[{"kind":"TypeParameter","id":0,"name":"D"}],"members":{"assets":[{"kind":"PropertyDeclaration","id":0,"name":"assets","type":{"kind":"TypeReference","id":0,"typeName":"Map","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}]}}],"lastUID":[{"kind":"PropertyDeclaration","id":0,"name":"lastUID","type":{"kind":"NumberKeyword","id":0}}],"add":[{"kind":"MethodDeclaration","id":0,"name":"add","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"loader","type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}],"addLoaded":[{"kind":"MethodDeclaration","id":0,"name":"addLoaded","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"data","type":{"kind":"TypeReference","id":0,"typeName":"D"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]}}],"get":[{"kind":"MethodDeclaration","id":0,"name":"get","parameters":[{"kind":"Parameter","id":0,"name":"handle","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"D"}]},{"kind":"UndefinedKeyword","id":0}]}}],"progress":[{"kind":"MethodDeclaration","id":0,"name":"progress","parameters":[],"type":{"kind":"NumberKeyword","id":0}}]}}],"AssetsCtx":[{"kind":"TypeAliasDeclaration","id":0,"name":"AssetsCtx","type":{"kind":"TypeReference","id":0,"typeName":"ReturnType","typeArguments":[{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"initAssets"}}]}}],"AsepriteData":[{"kind":"TypeAliasDeclaration","id":0,"name":"AsepriteData","type":{"kind":"TypeLiteral","id":0,"members":{"frames":[{"kind":"PropertySignature","id":0,"name":"frames","type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"TypeLiteral","id":0,"members":{"frame":[{"kind":"PropertySignature","id":0,"name":"frame","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"w":[{"kind":"PropertySignature","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertySignature","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}]}}}]}}]}}],"meta":[{"kind":"PropertySignature","id":0,"name":"meta","type":{"kind":"TypeLiteral","id":0,"members":{"size":[{"kind":"PropertySignature","id":0,"name":"size","type":{"kind":"TypeLiteral","id":0,"members":{"w":[{"kind":"PropertySignature","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertySignature","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}]}}}],"frameTags":[{"kind":"PropertySignature","id":0,"name":"frameTags","type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"TypeLiteral","id":0,"members":{"from":[{"kind":"PropertySignature","id":0,"name":"from","type":{"kind":"NumberKeyword","id":0}}],"to":[{"kind":"PropertySignature","id":0,"name":"to","type":{"kind":"NumberKeyword","id":0}}],"direction":[{"kind":"PropertySignature","id":0,"name":"direction","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"forward","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"reverse","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"pingpong","hasExtendedUnicodeEscape":false}}]}}]}}]}}]}}}]}}}],"PeditFile":[{"kind":"InterfaceDeclaration","id":0,"name":"PeditFile","members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"frames":[{"kind":"PropertySignature","id":0,"name":"frames","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}}],"anims":[{"kind":"PropertySignature","id":0,"name":"anims","type":{"kind":"TypeReference","id":0,"typeName":"SpriteAnims"}}]}}],"SpriteAtlasData":[{"kind":"TypeAliasDeclaration","id":0,"name":"SpriteAtlasData","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SpriteAtlasEntry"}]}}],"SpriteAtlasEntry":[{"kind":"TypeAliasDeclaration","id":0,"name":"SpriteAtlasEntry","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"LoadSpriteOpt"},{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"X position of the top left corner.","tags":{}}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Y position of the top left corner.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Sprite area width.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Sprite area height.","tags":{}}}]}}]},"jsDoc":{"doc":"A sprite in a sprite atlas.","tags":{}}}],"AudioCtx":[{"kind":"TypeAliasDeclaration","id":0,"name":"AudioCtx","type":{"kind":"TypeReference","id":0,"typeName":"ReturnType","typeArguments":[{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"initAudio"}}]}}],"BinaryHeap":[{"kind":"ClassDeclaration","id":0,"name":"BinaryHeap","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"members":{"_items":[{"kind":"PropertyDeclaration","id":0,"name":"_items","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}}}],"_compareFn":[{"kind":"PropertyDeclaration","id":0,"name":"_compareFn","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"T"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"BooleanKeyword","id":0}}}],"insert":[{"kind":"MethodDeclaration","id":0,"name":"insert","parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Insert an item into the binary heap","tags":{}}}],"remove":[{"kind":"MethodDeclaration","id":0,"name":"remove","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Remove the smallest item from the binary heap in case of a min heap\nor the greatest item from the binary heap in case of a max heap","tags":{}}}],"clear":[{"kind":"MethodDeclaration","id":0,"name":"clear","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove all items","tags":{}}}],"moveUp":[{"kind":"MethodDeclaration","id":0,"name":"moveUp","parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"moveDown":[{"kind":"MethodDeclaration","id":0,"name":"moveDown","parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"swap":[{"kind":"MethodDeclaration","id":0,"name":"swap","parameters":[{"kind":"Parameter","id":0,"name":"index1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"index2","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"length":[{"kind":"GetAccessor","id":0,"name":"length","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Returns the amount of items","tags":{}}}]}}],"Registry":[{"kind":"ClassDeclaration","id":0,"name":"Registry","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Map"},"typeArguments":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"T"}]}]}],"members":{"lastID":[{"kind":"PropertyDeclaration","id":0,"name":"lastID"}],"push":[{"kind":"MethodDeclaration","id":0,"name":"push","parameters":[{"kind":"Parameter","id":0,"name":"v","type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"NumberKeyword","id":0}}],"pushd":[{"kind":"MethodDeclaration","id":0,"name":"pushd","parameters":[{"kind":"Parameter","id":0,"name":"v","type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}]}}],"KEventController":[{"kind":"ClassDeclaration","id":0,"name":"KEventController","members":{"paused":[{"kind":"PropertyDeclaration","id":0,"name":"paused","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the event is paused","tags":{}}}],"cancel":[{"kind":"PropertyDeclaration","id":0,"name":"cancel","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"jsDoc":{"doc":"Cancel the event","tags":{}}}],"join":[{"kind":"MethodDeclaration","id":0,"name":"join","parameters":[{"kind":"Parameter","id":0,"name":"events","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}]},"jsDoc":{"doc":"A controller for all events in KAPLAY.","tags":{"example":["```js\n// Create a new event\nconst logHi = onUpdate(() => {\n debug.log(\"hi\");\n});\n\n// Pause the event\nlogHi.paused = true;\n\n// Cancel the event\nlogHi.cancel();\n\n```"],"group":["Events"]}}}],"KEvent":[{"kind":"ClassDeclaration","id":0,"name":"KEvent","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Args","constraint":{"kind":"ArrayType","id":0,"elementType":{"kind":"AnyKeyword","id":0}},"default":{"kind":"ArrayType","id":0,"elementType":{"kind":"AnyKeyword","id":0}}}],"members":{"handlers":[{"kind":"PropertyDeclaration","id":0,"name":"handlers"}],"add":[{"kind":"MethodDeclaration","id":0,"name":"add","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Args"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"addOnce":[{"kind":"MethodDeclaration","id":0,"name":"addOnce","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"ParenthesizedType","id":0,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Args"},{"kind":"TypeReference","id":0,"typeName":"PromiseLike","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Args"}]}]}}}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"next":[{"kind":"MethodDeclaration","id":0,"name":"next","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Args"}]}}],"trigger":[{"kind":"MethodDeclaration","id":0,"name":"trigger","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"Args"}}],"type":{"kind":"VoidKeyword","id":0}}],"numListeners":[{"kind":"MethodDeclaration","id":0,"name":"numListeners","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"clear":[{"kind":"MethodDeclaration","id":0,"name":"clear","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]}}],"KEventHandler":[{"kind":"ClassDeclaration","id":0,"name":"KEventHandler","typeParameters":[{"kind":"TypeParameter","id":0,"name":"EventMap","constraint":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"AnyKeyword","id":0}}]}}],"members":{"handlers":[{"kind":"PropertyDeclaration","id":0,"name":"handlers"}],"registers":[{"kind":"PropertyDeclaration","id":0,"name":"registers","type":{"kind":"TypeReference","id":0,"typeName":"Partial","typeArguments":[{"kind":"MappedType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}},"type":{"kind":"TypeReference","id":0,"typeName":"Registry","typeArguments":[{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"EventMap"},"indexType":{"kind":"TypeReference","id":0,"typeName":"Name"}}}],"type":{"kind":"VoidKeyword","id":0}}]},"members":{}}]}}],"on":[{"kind":"MethodDeclaration","id":0,"name":"on","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"TypeReference","id":0,"typeName":"Name"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"EventMap"},"indexType":{"kind":"TypeReference","id":0,"typeName":"Name"}}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onOnce":[{"kind":"MethodDeclaration","id":0,"name":"onOnce","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"TypeReference","id":0,"typeName":"Name"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"EventMap"},"indexType":{"kind":"TypeReference","id":0,"typeName":"Name"}}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"next":[{"kind":"MethodDeclaration","id":0,"name":"next","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"TypeReference","id":0,"typeName":"Name"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"UnknownKeyword","id":0}]}}],"trigger":[{"kind":"MethodDeclaration","id":0,"name":"trigger","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"TypeReference","id":0,"typeName":"Name"}},{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"EventMap"},"indexType":{"kind":"TypeReference","id":0,"typeName":"Name"}}}],"type":{"kind":"VoidKeyword","id":0}}],"remove":[{"kind":"MethodDeclaration","id":0,"name":"remove","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"TypeReference","id":0,"typeName":"Name"}}],"type":{"kind":"VoidKeyword","id":0}}],"clear":[{"kind":"MethodDeclaration","id":0,"name":"clear","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"numListeners":[{"kind":"MethodDeclaration","id":0,"name":"numListeners","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Name","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"EventMap"}}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"TypeReference","id":0,"typeName":"Name"}}],"type":{"kind":"NumberKeyword","id":0}}]}}],"AudioPlayOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"AudioPlayOpt","members":{"paused":[{"kind":"PropertySignature","id":0,"name":"paused","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If audio should start out paused.","tags":{"since":["v3000.0"]}}}],"loop":[{"kind":"PropertySignature","id":0,"name":"loop","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If audio should be played again from start when its ended.","tags":{}}}],"volume":[{"kind":"PropertySignature","id":0,"name":"volume","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Volume of audio. 1.0 means full volume, 0.5 means half volume.","tags":{}}}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Playback speed. 1.0 means normal playback speed, 2.0 means twice as fast.","tags":{}}}],"detune":[{"kind":"PropertySignature","id":0,"name":"detune","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Detune the sound. Every 100 means a semitone.","tags":{"example":["```js\n// play a random note in the octave\nplay(\"noteC\", {\n detune: randi(0, 12) * 100,\n})\n```"]}}}],"seek":[{"kind":"PropertySignature","id":0,"name":"seek","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The start time, in seconds.","tags":{}}}]},"jsDoc":{"doc":"Audio play configurations.","tags":{}}}],"AudioPlay":[{"kind":"InterfaceDeclaration","id":0,"name":"AudioPlay","members":{"play":[{"kind":"MethodSignature","id":0,"name":"play","parameters":[{"kind":"Parameter","id":0,"name":"time","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Start playing audio.","tags":{"since":["v3000.0"]}}}],"seek":[{"kind":"MethodSignature","id":0,"name":"seek","parameters":[{"kind":"Parameter","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Seek time.","tags":{"since":["v3000.0"]}}}],"stop":[{"kind":"MethodSignature","id":0,"name":"stop","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Stop the sound.","tags":{"since":["v3001.0"]}}}],"paused":[{"kind":"PropertySignature","id":0,"name":"paused","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the sound is paused.","tags":{"since":["v2000.1"]}}}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Playback speed of the sound. 1.0 means normal playback speed, 2.0 means twice as fast.","tags":{}}}],"detune":[{"kind":"PropertySignature","id":0,"name":"detune","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Detune the sound. Every 100 means a semitone.","tags":{"example":["```js\n// tune down a semitone\nmusic.detune = -100\n\n// tune up an octave\nmusic.detune = 1200\n```"]}}}],"volume":[{"kind":"PropertySignature","id":0,"name":"volume","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Volume of the sound. 1.0 means full volume, 0.5 means half volume.","tags":{}}}],"loop":[{"kind":"PropertySignature","id":0,"name":"loop","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the audio should start again when it ends.","tags":{}}}],"time":[{"kind":"MethodSignature","id":0,"name":"time","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The current playing time (not accurate if speed is changed).","tags":{}}}],"duration":[{"kind":"MethodSignature","id":0,"name":"duration","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The total duration.","tags":{}}}],"onEnd":[{"kind":"MethodSignature","id":0,"name":"onEnd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when audio ends.","tags":{"since":["v3000.0"]}}}],"then":[{"kind":"MethodSignature","id":0,"name":"then","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}]}}],"CircleComp":[{"kind":"InterfaceDeclaration","id":0,"name":"CircleComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"Comp"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Radius of circle.","tags":{}}}],"renderArea":[{"kind":"MethodSignature","id":0,"name":"renderArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"},"jsDoc":{"doc":"Render area of the circle.","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"circle","text":"`circle()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"CircleCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"CircleCompOpt","members":{"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"If fill the circle (useful if you only want to render outline with\n"},{"kind":"JSDocLink","id":0,"name":"outline","text":"`outline()`"},{"kind":"JSDocText","id":0,"text":" component)."}],"tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"circle","text":"`circle()``"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"ColorComp":[{"kind":"InterfaceDeclaration","id":0,"name":"ColorComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"color":[{"kind":"PropertySignature","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"color","text":"`color()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"MaskComp":[{"kind":"InterfaceDeclaration","id":0,"name":"MaskComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"mask":[{"kind":"PropertySignature","id":0,"name":"mask","type":{"kind":"TypeReference","id":0,"typeName":"Mask"}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"mask","text":"`mask()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"OpacityComp":[{"kind":"InterfaceDeclaration","id":0,"name":"OpacityComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Opacity of the current object.","tags":{}}}],"fadeIn":[{"kind":"MethodSignature","id":0,"name":"fadeIn","parameters":[{"kind":"Parameter","id":0,"name":"time","questionToken":true,"type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"easeFunc","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"EaseFunc"}}],"type":{"kind":"TypeReference","id":0,"typeName":"TweenController"},"jsDoc":{"doc":"Fade in at the start.","tags":{}}}],"fadeOut":[{"kind":"MethodSignature","id":0,"name":"fadeOut","parameters":[{"kind":"Parameter","id":0,"name":"time","questionToken":true,"type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"easeFunc","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"EaseFunc"}}],"type":{"kind":"TypeReference","id":0,"typeName":"TweenController"},"jsDoc":{"doc":"Fade out at the start.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"opacity","text":"`opacity()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"OutlineComp":[{"kind":"InterfaceDeclaration","id":0,"name":"OutlineComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"outline":[{"kind":"PropertySignature","id":0,"name":"outline","type":{"kind":"TypeReference","id":0,"typeName":"Outline"}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"outline","text":"`outline()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"EmitterOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"EmitterOpt","type":{"kind":"TypeLiteral","id":0,"members":{"shape":[{"kind":"PropertySignature","id":0,"name":"shape","type":{"kind":"TypeReference","id":0,"typeName":"ShapeType"},"questionToken":true}],"lifetime":[{"kind":"PropertySignature","id":0,"name":"lifetime","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"rate":[{"kind":"PropertySignature","id":0,"name":"rate","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"direction":[{"kind":"PropertySignature","id":0,"name":"direction","type":{"kind":"NumberKeyword","id":0}}],"spread":[{"kind":"PropertySignature","id":0,"name":"spread","type":{"kind":"NumberKeyword","id":0}}]}}}],"ParticlesOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"ParticlesOpt","type":{"kind":"TypeLiteral","id":0,"members":{"max":[{"kind":"PropertySignature","id":0,"name":"max","type":{"kind":"NumberKeyword","id":0}}],"lifeTime":[{"kind":"PropertySignature","id":0,"name":"lifeTime","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"acceleration":[{"kind":"PropertySignature","id":0,"name":"acceleration","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true}],"damping":[{"kind":"PropertySignature","id":0,"name":"damping","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"angularVelocity":[{"kind":"PropertySignature","id":0,"name":"angularVelocity","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"scales":[{"kind":"PropertySignature","id":0,"name":"scales","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},"questionToken":true}],"colors":[{"kind":"PropertySignature","id":0,"name":"colors","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Color"}},"questionToken":true}],"opacities":[{"kind":"PropertySignature","id":0,"name":"opacities","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},"questionToken":true}],"quads":[{"kind":"PropertySignature","id":0,"name":"quads","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Quad"}},"questionToken":true}],"texture":[{"kind":"PropertySignature","id":0,"name":"texture","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}]}}}],"ParticlesComp":[{"kind":"InterfaceDeclaration","id":0,"name":"ParticlesComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"emit":[{"kind":"MethodSignature","id":0,"name":"emit","parameters":[{"kind":"Parameter","id":0,"name":"n","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"onEnd":[{"kind":"MethodSignature","id":0,"name":"onEnd","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}]}}],"PolygonComp":[{"kind":"InterfaceDeclaration","id":0,"name":"PolygonComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"Comp"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}}}}],"pts":[{"kind":"PropertySignature","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"Points in the polygon.","tags":{}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}]},"questionToken":true,"jsDoc":{"doc":"The radius of each corner.","tags":{}}}],"colors":[{"kind":"PropertySignature","id":0,"name":"colors","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Color"}},"questionToken":true,"jsDoc":{"doc":"The color of each vertex.","tags":{}}}],"uv":[{"kind":"PropertySignature","id":0,"name":"uv","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"questionToken":true,"jsDoc":{"doc":"The uv of each vertex.","tags":{"since":["v3001.0"]}}}],"tex":[{"kind":"PropertySignature","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"},"questionToken":true,"jsDoc":{"doc":"The texture used when uv coordinates are present.","tags":{"since":["v3001.0"]}}}],"renderArea":[{"kind":"MethodSignature","id":0,"name":"renderArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"polygon","text":"`polygon()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"since":["v3001.0"],"group":["Component Types"]}}}],"PolygonCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"PolygonCompOpt","type":{"kind":"TypeReference","id":0,"typeName":"Omit","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"DrawPolygonOpt"},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"pts","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"polygon","text":"`polygon()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"RectComp":[{"kind":"InterfaceDeclaration","id":0,"name":"RectComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"Comp"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width of rectangle.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height of rectangle.","tags":{}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The radius of each corner.","tags":{}}}],"renderArea":[{"kind":"MethodSignature","id":0,"name":"renderArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"},"jsDoc":{"tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"rect","text":"`rect()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"RectCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"RectCompOpt","members":{"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Radius of the rectangle corners.","tags":{}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the rectangle (useful if you only want to render outline with outline() component).","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"rect","text":"`rect()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"ShaderComp":[{"kind":"InterfaceDeclaration","id":0,"name":"ShaderComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"uniform":[{"kind":"PropertySignature","id":0,"name":"uniform","type":{"kind":"TypeReference","id":0,"typeName":"Uniform"},"questionToken":true}],"shader":[{"kind":"PropertySignature","id":0,"name":"shader","type":{"kind":"StringKeyword","id":0}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"shader","text":"`shader()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"SpriteComp":[{"kind":"InterfaceDeclaration","id":0,"name":"SpriteComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"Comp"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}}}}],"sprite":[{"kind":"PropertySignature","id":0,"name":"sprite","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"Name of the sprite.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width for sprite.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height for sprite.","tags":{}}}],"frame":[{"kind":"PropertySignature","id":0,"name":"frame","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Current frame.","tags":{}}}],"quad":[{"kind":"PropertySignature","id":0,"name":"quad","type":{"kind":"TypeReference","id":0,"typeName":"Quad"},"jsDoc":{"doc":"The rectangular area of the texture to render.","tags":{}}}],"play":[{"kind":"MethodSignature","id":0,"name":"play","parameters":[{"kind":"Parameter","id":0,"name":"anim","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"SpriteAnimPlayOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Play a piece of anim.","tags":{}}}],"stop":[{"kind":"MethodSignature","id":0,"name":"stop","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Stop current anim.","tags":{}}}],"numFrames":[{"kind":"MethodSignature","id":0,"name":"numFrames","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get total number of frames.","tags":{}}}],"getCurAnim":[{"kind":"MethodSignature","id":0,"name":"getCurAnim","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"SpriteCurAnim"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get the current animation data.","tags":{"since":["v3001.0"]}}}],"curAnim":[{"kind":"MethodSignature","id":0,"name":"curAnim","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"UndefinedKeyword","id":0}]},"jsDoc":{"doc":"Get current anim name.","tags":{"deprecated":["Use `getCurAnim().name` instead."]}}}],"hasAnim":[{"kind":"MethodSignature","id":0,"name":"hasAnim","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if object's sprite has an animation.","tags":{}}}],"getAnim":[{"kind":"MethodSignature","id":0,"name":"getAnim","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"SpriteAnim"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get an animation.","tags":{}}}],"animSpeed":[{"kind":"PropertySignature","id":0,"name":"animSpeed","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Speed multiplier for all animations (for the actual fps for an anim use .play(\"anim\", { speed: 10 })).","tags":{}}}],"flipX":[{"kind":"PropertySignature","id":0,"name":"flipX","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Flip texture horizontally.","tags":{}}}],"flipY":[{"kind":"PropertySignature","id":0,"name":"flipY","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Flip texture vertically.","tags":{}}}],"onAnimStart":[{"kind":"MethodSignature","id":0,"name":"onAnimStart","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"anim","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when an animation is played.","tags":{}}}],"onAnimEnd":[{"kind":"MethodSignature","id":0,"name":"onAnimEnd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"anim","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when an animation is ended.","tags":{}}}],"renderArea":[{"kind":"MethodSignature","id":0,"name":"renderArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"},"jsDoc":{"tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"sprite","text":"`sprite()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"SpriteCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"SpriteCompOpt","members":{"frame":[{"kind":"PropertySignature","id":0,"name":"frame","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If the sprite is loaded with multiple frames, or sliced, use the frame option to specify which frame to draw.","tags":{}}}],"tiled":[{"kind":"PropertySignature","id":0,"name":"tiled","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If provided width and height, don't stretch but instead render tiled.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Stretch sprite to a certain width.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Stretch sprite to a certain height.","tags":{}}}],"anim":[{"kind":"PropertySignature","id":0,"name":"anim","type":{"kind":"StringKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Play an animation on start.","tags":{}}}],"animSpeed":[{"kind":"PropertySignature","id":0,"name":"animSpeed","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Speed multiplier for all animations (for the actual fps for an anim use .play(\"anim\", { speed: 10 })).","tags":{}}}],"flipX":[{"kind":"PropertySignature","id":0,"name":"flipX","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Flip texture horizontally.","tags":{}}}],"flipY":[{"kind":"PropertySignature","id":0,"name":"flipY","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Flip texture vertically.","tags":{}}}],"quad":[{"kind":"PropertySignature","id":0,"name":"quad","type":{"kind":"TypeReference","id":0,"typeName":"Quad"},"questionToken":true,"jsDoc":{"doc":"The rectangular sub-area of the texture to render, default to full texture `quad(0, 0, 1, 1)`.","tags":{}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the sprite (useful if you only want to render outline with outline() component).","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"sprite","text":"`sprite()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"TextComp":[{"kind":"InterfaceDeclaration","id":0,"name":"TextComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"Comp"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}}}}],"text":[{"kind":"PropertySignature","id":0,"name":"text","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"The text to render.","tags":{}}}],"textSize":[{"kind":"PropertySignature","id":0,"name":"textSize","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The text size.","tags":{}}}],"font":[{"kind":"PropertySignature","id":0,"name":"font","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"BitmapFontData"}]},"jsDoc":{"doc":"The font to use.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width of text.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height of text.","tags":{}}}],"align":[{"kind":"PropertySignature","id":0,"name":"align","type":{"kind":"TypeReference","id":0,"typeName":"TextAlign"},"jsDoc":{"doc":"Text alignment (\"left\", \"center\" or \"right\", default \"left\").","tags":{"since":["v3000.0"]}}}],"lineSpacing":[{"kind":"PropertySignature","id":0,"name":"lineSpacing","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The gap between each line.","tags":{"since":["v2000.2"]}}}],"letterSpacing":[{"kind":"PropertySignature","id":0,"name":"letterSpacing","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The gap between each character.","tags":{"since":["v2000.2"]}}}],"textTransform":[{"kind":"PropertySignature","id":0,"name":"textTransform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CharTransform"},{"kind":"TypeReference","id":0,"typeName":"CharTransformFunc"}]},"jsDoc":{"doc":"Transform the pos, scale, rotation or color for each character based on the index or char.","tags":{"since":["v2000.1"]}}}],"textStyles":[{"kind":"PropertySignature","id":0,"name":"textStyles","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CharTransform"},{"kind":"TypeReference","id":0,"typeName":"CharTransformFunc"}]}]},"jsDoc":{"doc":"Stylesheet for styled chunks, in the syntax of \"this is a [style]text[/style] word\".","tags":{"since":["v2000.2"]}}}],"renderArea":[{"kind":"MethodSignature","id":0,"name":"renderArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"},"jsDoc":{"tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"text","text":"`text()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"TextCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"TextCompOpt","members":{"size":[{"kind":"PropertySignature","id":0,"name":"size","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Height of text.","tags":{}}}],"font":[{"kind":"PropertySignature","id":0,"name":"font","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"BitmapFontData"}]},"questionToken":true,"jsDoc":{"doc":"The font to use.","tags":{}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Wrap text to a certain width.","tags":{}}}],"align":[{"kind":"PropertySignature","id":0,"name":"align","type":{"kind":"TypeReference","id":0,"typeName":"TextAlign"},"questionToken":true,"jsDoc":{"doc":"Text alignment (\"left\", \"center\" or \"right\", default \"left\").","tags":{"since":["v3000.0"]}}}],"lineSpacing":[{"kind":"PropertySignature","id":0,"name":"lineSpacing","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The gap between each line.","tags":{"since":["v2000.2"]}}}],"letterSpacing":[{"kind":"PropertySignature","id":0,"name":"letterSpacing","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The gap between each character.","tags":{"since":["v2000.2"]}}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CharTransform"},{"kind":"TypeReference","id":0,"typeName":"CharTransformFunc"}]},"questionToken":true,"jsDoc":{"doc":"Transform the pos, scale, rotation or color for each character based on the index or char.","tags":{"since":["v2000.1"]}}}],"styles":[{"kind":"PropertySignature","id":0,"name":"styles","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CharTransform"},{"kind":"TypeReference","id":0,"typeName":"CharTransformFunc"}]}]},"questionToken":true,"jsDoc":{"doc":"Stylesheet for styled chunks, in the syntax of \"this is a [style]text[/style] word\".","tags":{"since":["v2000.2"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"text","text":"`text()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"UVQuadComp":[{"kind":"InterfaceDeclaration","id":0,"name":"UVQuadComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"Comp"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}}}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width of rect.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height of height.","tags":{}}}],"renderArea":[{"kind":"MethodSignature","id":0,"name":"renderArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Rect"},"jsDoc":{"tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"uvquad","text":"`uvquad()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"AgentComp":[{"kind":"InterfaceDeclaration","id":0,"name":"AgentComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"agentSpeed":[{"kind":"PropertySignature","id":0,"name":"agentSpeed","type":{"kind":"NumberKeyword","id":0}}],"allowDiagonals":[{"kind":"PropertySignature","id":0,"name":"allowDiagonals","type":{"kind":"BooleanKeyword","id":0}}],"getDistanceToTarget":[{"kind":"MethodSignature","id":0,"name":"getDistanceToTarget","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"getNextLocation":[{"kind":"MethodSignature","id":0,"name":"getNextLocation","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"getPath":[{"kind":"MethodSignature","id":0,"name":"getPath","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"getTarget":[{"kind":"MethodSignature","id":0,"name":"getTarget","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"isNavigationFinished":[{"kind":"MethodSignature","id":0,"name":"isNavigationFinished","parameters":[],"type":{"kind":"BooleanKeyword","id":0}}],"isTargetReachable":[{"kind":"MethodSignature","id":0,"name":"isTargetReachable","parameters":[],"type":{"kind":"BooleanKeyword","id":0}}],"isTargetReached":[{"kind":"MethodSignature","id":0,"name":"isTargetReached","parameters":[],"type":{"kind":"BooleanKeyword","id":0}}],"setTarget":[{"kind":"MethodSignature","id":0,"name":"setTarget","parameters":[{"kind":"Parameter","id":0,"name":"target","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}}],"onNavigationStarted":[{"kind":"MethodSignature","id":0,"name":"onNavigationStarted","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onNavigationNext":[{"kind":"MethodSignature","id":0,"name":"onNavigationNext","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onNavigationEnded":[{"kind":"MethodSignature","id":0,"name":"onNavigationEnded","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onTargetReached":[{"kind":"MethodSignature","id":0,"name":"onTargetReached","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"agent","text":"`agent()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"AgentCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"AgentCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"allowDiagonals":[{"kind":"PropertySignature","id":0,"name":"allowDiagonals","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}]}},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"agent","text":"`agent()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"NavigationMapComp":[{"kind":"InterfaceDeclaration","id":0,"name":"NavigationMapComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"navigate":[{"kind":"MethodSignature","id":0,"name":"navigate","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"target","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"navigationOpt","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"UndefinedKeyword","id":0}]}}],"graph":[{"kind":"PropertySignature","id":0,"name":"graph","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Graph"},{"kind":"UndefinedKeyword","id":0}]}}]}}],"NavigationMapCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"NavigationMapCompOpt","members":{"graph":[{"kind":"PropertySignature","id":0,"name":"graph","type":{"kind":"TypeReference","id":0,"typeName":"Graph"},"questionToken":true}]}}],"NavigationComp":[{"kind":"InterfaceDeclaration","id":0,"name":"NavigationComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"navigateTo":[{"kind":"MethodSignature","id":0,"name":"navigateTo","parameters":[{"kind":"Parameter","id":0,"name":"target","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"UndefinedKeyword","id":0}]}}],"graph":[{"kind":"PropertySignature","id":0,"name":"graph","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Graph"},{"kind":"UndefinedKeyword","id":0}]}}]}}],"NavigationCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"NavigationCompOpt","members":{"graph":[{"kind":"PropertySignature","id":0,"name":"graph","type":{"kind":"TypeReference","id":0,"typeName":"Graph"},"questionToken":true}],"navigationOpt":[{"kind":"PropertySignature","id":0,"name":"navigationOpt","type":{"kind":"AnyKeyword","id":0},"questionToken":true}]}}],"PatrolComp":[{"kind":"InterfaceDeclaration","id":0,"name":"PatrolComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"waypoints":[{"kind":"PropertySignature","id":0,"name":"waypoints","type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"UndefinedKeyword","id":0}]}}],"patrolSpeed":[{"kind":"PropertySignature","id":0,"name":"patrolSpeed","type":{"kind":"NumberKeyword","id":0}}],"nextLocation":[{"kind":"PropertySignature","id":0,"name":"nextLocation","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"UndefinedKeyword","id":0}]}}],"onPatrolFinished":[{"kind":"MethodSignature","id":0,"name":"onPatrolFinished","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"objects","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Attaches an event handler which is called when using \"stop\" and the end of the path is reached.","tags":{"param":["The event handler called when the patrol finishes."]}}}]}}],"PatrolEndBehavior":[{"kind":"TypeAliasDeclaration","id":0,"name":"PatrolEndBehavior","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"loop","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ping-pong","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"stop","hasExtendedUnicodeEscape":false}}]}}],"PatrolCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"PatrolCompOpt","members":{"waypoints":[{"kind":"PropertySignature","id":0,"name":"waypoints","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"questionToken":true}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"endBehavior":[{"kind":"PropertySignature","id":0,"name":"endBehavior","type":{"kind":"TypeReference","id":0,"typeName":"PatrolEndBehavior"},"questionToken":true}]}}],"FixedComp":[{"kind":"InterfaceDeclaration","id":0,"name":"FixedComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"fixed":[{"kind":"PropertySignature","id":0,"name":"fixed","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the obj is unaffected by camera","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"fixed","text":"`fixed()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"PosComp":[{"kind":"InterfaceDeclaration","id":0,"name":"PosComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Object's current world position.","tags":{}}}],"move":[{"kind":"MethodSignature","id":0,"name":"move","parameters":[{"kind":"Parameter","id":0,"name":"xVel","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"yVel","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Move how many pixels per second. If object is 'solid', it won't move into other 'solid' objects.","tags":{}}},{"kind":"MethodSignature","id":0,"name":"move","parameters":[{"kind":"Parameter","id":0,"name":"vel","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}}],"moveBy":[{"kind":"MethodSignature","id":0,"name":"moveBy","parameters":[{"kind":"Parameter","id":0,"name":"dx","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"dy","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Move how many pixels, without multiplying dt, but still checking for 'solid'.","tags":{}}},{"kind":"MethodSignature","id":0,"name":"moveBy","parameters":[{"kind":"Parameter","id":0,"name":"d","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}}],"moveTo":[{"kind":"MethodSignature","id":0,"name":"moveTo","parameters":[{"kind":"Parameter","id":0,"name":"dest","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"speed","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Move to a spot with a speed (pixels per second), teleports if speed is not given.","tags":{}}},{"kind":"MethodSignature","id":0,"name":"moveTo","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"speed","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"screenPos":[{"kind":"MethodSignature","id":0,"name":"screenPos","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get the position of the object on the screen.","tags":{}}}],"worldPos":[{"kind":"MethodSignature","id":0,"name":"worldPos","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get the position of the object relative to the root.","tags":{}}}],"toScreen":[{"kind":"MethodSignature","id":0,"name":"toScreen","parameters":[{"kind":"Parameter","id":0,"name":"this","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"PosComp"},{"kind":"TypeReference","id":0,"typeName":"FixedComp"}]}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a local point (relative to this) to a screen point (relative to the camera)","tags":{}}}],"toWorld":[{"kind":"MethodSignature","id":0,"name":"toWorld","parameters":[{"kind":"Parameter","id":0,"name":"this","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a local point (relative to this) to a world point (relative to the root)","tags":{"since":["v3001.0"]}}}],"fromScreen":[{"kind":"MethodSignature","id":0,"name":"fromScreen","parameters":[{"kind":"Parameter","id":0,"name":"this","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"PosComp"},{"kind":"TypeReference","id":0,"typeName":"FixedComp"}]}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a screen point (relative to the camera) to a local point (relative to this)","tags":{"since":["v3001.0"]}}}],"fromWorld":[{"kind":"MethodSignature","id":0,"name":"fromWorld","parameters":[{"kind":"Parameter","id":0,"name":"this","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a world point (relative to the root) to a local point (relative to this)","tags":{"since":["v3001.0"]}}}],"toOther":[{"kind":"MethodSignature","id":0,"name":"toOther","parameters":[{"kind":"Parameter","id":0,"name":"this","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a point relative to this to a point relative to other","tags":{"since":["v3001.0"]}}}],"fromOther":[{"kind":"MethodSignature","id":0,"name":"fromOther","parameters":[{"kind":"Parameter","id":0,"name":"this","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a point relative to other to a point relative to this","tags":{"since":["v3001.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"pos","text":"`pos()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"SentryComp":[{"kind":"InterfaceDeclaration","id":0,"name":"SentryComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"direction":[{"kind":"PropertySignature","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true}],"directionAngle":[{"kind":"PropertySignature","id":0,"name":"directionAngle","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"fieldOfView":[{"kind":"PropertySignature","id":0,"name":"fieldOfView","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"spotted":[{"kind":"PropertySignature","id":0,"name":"spotted","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"AnyKeyword","id":0}]}}}],"onObjectsSpotted":[{"kind":"MethodSignature","id":0,"name":"onObjectsSpotted","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"objects","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Attaches an event handler which is called when objects of interest are spotted.","tags":{"param":["The event handler called when objects are spotted."]}}}],"isWithinFieldOfView":[{"kind":"MethodSignature","id":0,"name":"isWithinFieldOfView","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}},{"kind":"Parameter","id":0,"name":"direction","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"fieldOfView","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Returns true if the object is within the field of view.","tags":{"param":["The object to test.","The direction to look at.","The field of view in degrees."]}}}],"hasLineOfSight":[{"kind":"MethodSignature","id":0,"name":"hasLineOfSight","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"PosComp"}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Returns true if there is a line of sight to the object.","tags":{"param":["The object to test."]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"sentry","text":"`sentry()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"SentryCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"SentryCompOpt","members":{"direction":[{"kind":"PropertySignature","id":0,"name":"direction","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"fieldOfView":[{"kind":"PropertySignature","id":0,"name":"fieldOfView","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"lineOfSight":[{"kind":"PropertySignature","id":0,"name":"lineOfSight","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"raycastExclude":[{"kind":"PropertySignature","id":0,"name":"raycastExclude","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},"questionToken":true}],"checkFrequency":[{"kind":"PropertySignature","id":0,"name":"checkFrequency","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"sentry","text":"`sentry()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"SentryCandidatesCb":[{"kind":"TypeAliasDeclaration","id":0,"name":"SentryCandidatesCb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"AnyKeyword","id":0}]}}}}],"SentryCandidates":[{"kind":"TypeAliasDeclaration","id":0,"name":"SentryCandidates","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"SentryCandidatesCb"},{"kind":"TypeReference","id":0,"typeName":"QueryOpt"}]}}],"TileComp":[{"kind":"InterfaceDeclaration","id":0,"name":"TileComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"tilePos":[{"kind":"PropertySignature","id":0,"name":"tilePos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The tile position inside the level.","tags":{}}}],"isObstacle":[{"kind":"PropertySignature","id":0,"name":"isObstacle","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the tile is an obstacle in pathfinding.","tags":{}}}],"cost":[{"kind":"PropertySignature","id":0,"name":"cost","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"How much a tile is cost to traverse in pathfinding (default 0).","tags":{}}}],"edges":[{"kind":"PropertySignature","id":0,"name":"edges","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Edge"}},"jsDoc":{"doc":"If the tile has hard edges that cannot pass in pathfinding.","tags":{}}}],"tilePosOffset":[{"kind":"PropertySignature","id":0,"name":"tilePosOffset","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Position offset when setting `tilePos`.","tags":{}}}],"edgeMask":[{"kind":"PropertySignature","id":0,"name":"edgeMask","type":{"kind":"TypeReference","id":0,"typeName":"EdgeMask"}}],"getLevel":[{"kind":"MethodSignature","id":0,"name":"getLevel","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"LevelComp"}]}}],"moveLeft":[{"kind":"MethodSignature","id":0,"name":"moveLeft","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"moveRight":[{"kind":"MethodSignature","id":0,"name":"moveRight","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"moveUp":[{"kind":"MethodSignature","id":0,"name":"moveUp","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"moveDown":[{"kind":"MethodSignature","id":0,"name":"moveDown","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"tile","text":"`tile()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"TileCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"TileCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"isObstacle":[{"kind":"PropertySignature","id":0,"name":"isObstacle","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If the tile is an obstacle in pathfinding.","tags":{}}}],"cost":[{"kind":"PropertySignature","id":0,"name":"cost","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"How much a tile is cost to traverse in pathfinding (default 0).","tags":{}}}],"edges":[{"kind":"PropertySignature","id":0,"name":"edges","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Edge"}},"questionToken":true,"jsDoc":{"doc":"If the tile has hard edges that cannot pass in pathfinding.","tags":{}}}],"offset":[{"kind":"PropertySignature","id":0,"name":"offset","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true,"jsDoc":{"doc":"Position offset when setting `tilePos`.","tags":{}}}]}},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"tile","text":"`tile()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"TimeDirection":[{"kind":"TypeAliasDeclaration","id":0,"name":"TimeDirection","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"forward","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"reverse","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ping-pong","hasExtendedUnicodeEscape":false}}]}}],"Interpolation":[{"kind":"TypeAliasDeclaration","id":0,"name":"Interpolation","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"none","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"linear","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"slerp","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"spline","hasExtendedUnicodeEscape":false}}]}}],"AnimateOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"AnimateOpt","members":{"duration":[{"kind":"PropertySignature","id":0,"name":"duration","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Duration of the animation in seconds","tags":{}}}],"loops":[{"kind":"PropertySignature","id":0,"name":"loops","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Loops, Default is undefined aka infinite","tags":{}}}],"direction":[{"kind":"PropertySignature","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"TimeDirection"},"questionToken":true,"jsDoc":{"doc":"Behavior when reaching the end of the animation. Default is forward.","tags":{}}}],"easing":[{"kind":"PropertySignature","id":0,"name":"easing","type":{"kind":"TypeReference","id":0,"typeName":"EaseFunc"},"questionToken":true,"jsDoc":{"doc":"Easing function. Default is linear time.","tags":{}}}],"interpolation":[{"kind":"PropertySignature","id":0,"name":"interpolation","type":{"kind":"TypeReference","id":0,"typeName":"Interpolation"},"questionToken":true,"jsDoc":{"doc":"Interpolation function. Default is linear interpolation.","tags":{}}}],"timing":[{"kind":"PropertySignature","id":0,"name":"timing","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Timestamps in percent for the given keys, if omitted, keys are equally spaced.","tags":{}}}],"easings":[{"kind":"PropertySignature","id":0,"name":"easings","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"EaseFunc"}},"questionToken":true,"jsDoc":{"doc":"Easings for the given keys, if omitted, easing is used.","tags":{}}}]}}],"AnimateCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"AnimateCompOpt","members":{"followMotion":[{"kind":"PropertySignature","id":0,"name":"followMotion","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Changes the angle so it follows the motion, requires the rotate component","tags":{}}}],"relative":[{"kind":"PropertySignature","id":0,"name":"relative","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The animation is added to the base values of pos, angle, scale and opacity instead of replacing them","tags":{}}}]}}],"BaseValues":[{"kind":"InterfaceDeclaration","id":0,"name":"BaseValues","members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0}}]}}],"AnimateComp":[{"kind":"InterfaceDeclaration","id":0,"name":"AnimateComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"animate":[{"kind":"MethodSignature","id":0,"name":"animate","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","constraint":{"kind":"TypeReference","id":0,"typeName":"LerpValue"}}],"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"keys","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}}},{"kind":"Parameter","id":0,"name":"opts","type":{"kind":"TypeReference","id":0,"typeName":"AnimateOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Animates a property on this object.","tags":{"param":["Name of the property to animate.","Keys determining the value at a certain point in time.","Options."]}}}],"unanimate":[{"kind":"MethodSignature","id":0,"name":"unanimate","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Removes the animation from the given property.","tags":{"param":["Name of the property to remove the animation from."]}}}],"unanimateAll":[{"kind":"MethodSignature","id":0,"name":"unanimateAll","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Removes the animations from all properties","tags":{}}}],"onAnimateFinished":[{"kind":"MethodSignature","id":0,"name":"onAnimateFinished","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Attaches an event handler which is called when all the animation channels have finished.","tags":{"param":["The event handler called when the animation finishes."]}}}],"onAnimateChannelFinished":[{"kind":"MethodSignature","id":0,"name":"onAnimateChannelFinished","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Attaches an event handler which is called when an animation channels has finished.","tags":{"param":["The event handler called when an animation channel finishes."]}}}],"base":[{"kind":"PropertySignature","id":0,"name":"base","type":{"kind":"TypeReference","id":0,"typeName":"BaseValues"},"jsDoc":{"doc":"Base values for relative animation","tags":{}}}],"serializeAnimationChannels":[{"kind":"MethodSignature","id":0,"name":"serializeAnimationChannels","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"AnimationChannel"}]},"jsDoc":{"doc":"Serializes the animation of this object to plain Javascript types","tags":{}}}],"serializeAnimationOptions":[{"kind":"MethodSignature","id":0,"name":"serializeAnimationOptions","parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"followMotion":[{"kind":"PropertySignature","id":0,"name":"followMotion","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"relative":[{"kind":"PropertySignature","id":0,"name":"relative","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}]}},"jsDoc":{"doc":"Serializes the options of this object to plain Javascript types","tags":{}}}]}}],"AnimationChannelKeys":[{"kind":"TypeAliasDeclaration","id":0,"name":"AnimationChannelKeys","type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},{"kind":"ArrayType","id":0,"elementType":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}}]}}],"AnimationOptions":[{"kind":"TypeAliasDeclaration","id":0,"name":"AnimationOptions","type":{"kind":"TypeLiteral","id":0,"members":{"duration":[{"kind":"PropertySignature","id":0,"name":"duration","type":{"kind":"NumberKeyword","id":0}}],"loops":[{"kind":"PropertySignature","id":0,"name":"loops","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"direction":[{"kind":"PropertySignature","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"TimeDirection"},"questionToken":true}],"easing":[{"kind":"PropertySignature","id":0,"name":"easing","type":{"kind":"StringKeyword","id":0},"questionToken":true}],"interpolation":[{"kind":"PropertySignature","id":0,"name":"interpolation","type":{"kind":"TypeReference","id":0,"typeName":"Interpolation"},"questionToken":true}],"timing":[{"kind":"PropertySignature","id":0,"name":"timing","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},"questionToken":true}],"easings":[{"kind":"PropertySignature","id":0,"name":"easings","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},"questionToken":true}]}}}],"AnimationChannel":[{"kind":"TypeAliasDeclaration","id":0,"name":"AnimationChannel","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeLiteral","id":0,"members":{"keys":[{"kind":"PropertySignature","id":0,"name":"keys","type":{"kind":"TypeReference","id":0,"typeName":"AnimationChannelKeys"}}]}},{"kind":"TypeReference","id":0,"typeName":"AnimationOptions"}]}}],"HealthComp":[{"kind":"InterfaceDeclaration","id":0,"name":"HealthComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"hurt":[{"kind":"MethodSignature","id":0,"name":"hurt","parameters":[{"kind":"Parameter","id":0,"name":"n","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Decrease HP by n (defaults to 1).","tags":{}}}],"heal":[{"kind":"MethodSignature","id":0,"name":"heal","parameters":[{"kind":"Parameter","id":0,"name":"n","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Increase HP by n (defaults to 1).","tags":{}}}],"hp":[{"kind":"MethodSignature","id":0,"name":"hp","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Current health points.","tags":{}}}],"setHP":[{"kind":"MethodSignature","id":0,"name":"setHP","parameters":[{"kind":"Parameter","id":0,"name":"hp","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set current health points.","tags":{}}}],"maxHP":[{"kind":"MethodSignature","id":0,"name":"maxHP","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Max amount of HP.","tags":{}}}],"setMaxHP":[{"kind":"MethodSignature","id":0,"name":"setMaxHP","parameters":[{"kind":"Parameter","id":0,"name":"hp","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set max amount of HP.","tags":{}}}],"onHurt":[{"kind":"MethodSignature","id":0,"name":"onHurt","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"amount","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when hurt() is called upon the object.","tags":{"since":["v2000.1"]}}}],"onHeal":[{"kind":"MethodSignature","id":0,"name":"onHeal","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"amount","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when heal() is called upon the object.","tags":{"since":["v2000.1"]}}}],"onDeath":[{"kind":"MethodSignature","id":0,"name":"onDeath","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when object's HP is equal or below 0.","tags":{"since":["v2000.1"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"health","text":"`health()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"LifespanCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"LifespanCompOpt","members":{"fade":[{"kind":"PropertySignature","id":0,"name":"fade","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Fade out duration (default 0 which is no fade out).","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"lifespan","text":"`lifespan()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"NamedComp":[{"kind":"InterfaceDeclaration","id":0,"name":"NamedComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"named","text":"`named()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"StateComp":[{"kind":"InterfaceDeclaration","id":0,"name":"StateComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"state":[{"kind":"PropertySignature","id":0,"name":"state","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"Current state.","tags":{}}}],"enterState":[{"kind":"PropertySignature","id":0,"name":"enterState","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"state","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}},"jsDoc":{"doc":"Enter a state, trigger onStateEnd for previous state and onStateEnter for the new State state.","tags":{}}}],"onStateTransition":[{"kind":"MethodSignature","id":0,"name":"onStateTransition","parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register event that runs once when a specific state transition happens. Accepts arguments passed from `enterState(name, ...args)`.","tags":{"since":["v2000.2"]}}}],"onStateEnter":[{"kind":"PropertySignature","id":0,"name":"onStateEnter","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"state","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}},"jsDoc":{"doc":"Register event that runs once when enters a specific state. Accepts arguments passed from `enterState(name, ...args)`.","tags":{}}}],"onStateEnd":[{"kind":"PropertySignature","id":0,"name":"onStateEnd","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"state","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}},"jsDoc":{"doc":"Register an event that runs once when leaves a specific state.","tags":{}}}],"onStateUpdate":[{"kind":"PropertySignature","id":0,"name":"onStateUpdate","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"state","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}},"jsDoc":{"doc":"Register an event that runs every frame when in a specific state.","tags":{}}}],"onStateDraw":[{"kind":"PropertySignature","id":0,"name":"onStateDraw","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"state","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}},"jsDoc":{"doc":"Register an event that runs every frame when in a specific state.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"state","text":"`state()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"StayComp":[{"kind":"InterfaceDeclaration","id":0,"name":"StayComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"stay":[{"kind":"PropertySignature","id":0,"name":"stay","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the obj should not be destroyed on scene switch.","tags":{}}}],"scenesToStay":[{"kind":"PropertySignature","id":0,"name":"scenesToStay","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Array of scenes that the obj will stay on.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"stay","text":"`stay()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"TextInputComp":[{"kind":"InterfaceDeclaration","id":0,"name":"TextInputComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"hasFocus":[{"kind":"PropertySignature","id":0,"name":"hasFocus","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Enable the text input array from being modified by user input.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"stay","text":"`stay()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"TimerComp":[{"kind":"InterfaceDeclaration","id":0,"name":"TimerComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"wait":[{"kind":"MethodSignature","id":0,"name":"wait","parameters":[{"kind":"Parameter","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","questionToken":true,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"TimerController"},"jsDoc":{"doc":"Run the callback after n seconds.","tags":{}}}],"loop":[{"kind":"MethodSignature","id":0,"name":"loop","parameters":[{"kind":"Parameter","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Run the callback every n seconds.","tags":{"since":["v3000.0"]}}}],"tween":[{"kind":"MethodSignature","id":0,"name":"tween","typeParameters":[{"kind":"TypeParameter","id":0,"name":"V","constraint":{"kind":"TypeReference","id":0,"typeName":"LerpValue"}}],"parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"TypeReference","id":0,"typeName":"V"}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"TypeReference","id":0,"typeName":"V"}},{"kind":"Parameter","id":0,"name":"duration","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"setValue","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"value","type":{"kind":"TypeReference","id":0,"typeName":"V"}}],"type":{"kind":"VoidKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"easeFunc","questionToken":true,"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"TweenController"},"jsDoc":{"doc":"Tweeeeen! Note that this doesn't specifically mean tweening on this object's property, this just registers the timer on this object, so the tween will cancel with the object gets destroyed, or paused when obj.paused is true.","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"timer","text":"`timer()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"AreaComp":[{"kind":"InterfaceDeclaration","id":0,"name":"AreaComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"area":[{"kind":"PropertySignature","id":0,"name":"area","type":{"kind":"TypeLiteral","id":0,"members":{"shape":[{"kind":"PropertySignature","id":0,"name":"shape","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Shape"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"If we use a custom shape over render shape.","tags":{}}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Area scale.","tags":{}}}],"offset":[{"kind":"PropertySignature","id":0,"name":"offset","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Area offset.","tags":{}}}],"cursor":[{"kind":"PropertySignature","id":0,"name":"cursor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Cursor"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Cursor on hover.","tags":{}}}]}},"jsDoc":{"doc":"Collider area info.","tags":{}}}],"collisionIgnore":[{"kind":"PropertySignature","id":0,"name":"collisionIgnore","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Tag"}},"jsDoc":{"doc":"If this object should ignore collisions against certain other objects.","tags":{"since":["v3000.0"]}}}],"isClicked":[{"kind":"MethodSignature","id":0,"name":"isClicked","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If was just clicked on last frame.","tags":{}}}],"isHovering":[{"kind":"MethodSignature","id":0,"name":"isHovering","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If is being hovered on.","tags":{}}}],"checkCollision":[{"kind":"MethodSignature","id":0,"name":"checkCollision","parameters":[{"kind":"Parameter","id":0,"name":"other","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"AreaComp"}]}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Collision"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Check collision with another game obj.","tags":{"since":["v3000.0"]}}}],"getCollisions":[{"kind":"MethodSignature","id":0,"name":"getCollisions","parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Collision"}},"jsDoc":{"doc":"Get all collisions currently happening.","tags":{"since":["v3000.0"]}}}],"isColliding":[{"kind":"MethodSignature","id":0,"name":"isColliding","parameters":[{"kind":"Parameter","id":0,"name":"o","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"AreaComp"}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If is currently colliding with another game obj.","tags":{}}}],"isOverlapping":[{"kind":"MethodSignature","id":0,"name":"isOverlapping","parameters":[{"kind":"Parameter","id":0,"name":"o","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"AreaComp"}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If is currently overlapping with another game obj (like isColliding, but will return false if the objects are just touching edges).","tags":{}}}],"onClick":[{"kind":"MethodSignature","id":0,"name":"onClick","parameters":[{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"btn","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event runs when clicked.","tags":{"since":["v2000.1"]}}}],"onHover":[{"kind":"MethodSignature","id":0,"name":"onHover","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event runs once when hovered.","tags":{"since":["v3000.0"]}}}],"onHoverUpdate":[{"kind":"MethodSignature","id":0,"name":"onHoverUpdate","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event runs every frame when hovered.","tags":{"since":["v3000.0"]}}}],"onHoverEnd":[{"kind":"MethodSignature","id":0,"name":"onHoverEnd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event runs once when unhovered.","tags":{"since":["v3000.0"]}}}],"onCollide":[{"kind":"MethodSignature","id":0,"name":"onCollide","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event runs once when collide with another game obj with certain tag.","tags":{"since":["v2001.0"]}}},{"kind":"MethodSignature","id":0,"name":"onCollide","parameters":[{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event runs once when collide with another game obj.","tags":{"since":["v2000.1"]}}}],"onCollideUpdate":[{"kind":"MethodSignature","id":0,"name":"onCollideUpdate","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event runs every frame when collide with another game obj with certain tag.","tags":{"since":["v3000.0"]}}},{"kind":"MethodSignature","id":0,"name":"onCollideUpdate","parameters":[{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event runs every frame when collide with another game obj.","tags":{"since":["v3000.0"]}}}],"onCollideEnd":[{"kind":"MethodSignature","id":0,"name":"onCollideEnd","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event runs once when stopped colliding with another game obj with certain tag.","tags":{"since":["v3000.0"]}}},{"kind":"MethodSignature","id":0,"name":"onCollideEnd","parameters":[{"kind":"Parameter","id":0,"name":"f","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event runs once when stopped colliding with another game obj.","tags":{"since":["v3000.0"]}}}],"hasPoint":[{"kind":"MethodSignature","id":0,"name":"hasPoint","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If has a certain point inside collider.","tags":{}}}],"resolveCollision":[{"kind":"MethodSignature","id":0,"name":"resolveCollision","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Push out from another solid game obj if currently overlapping.","tags":{}}}],"localArea":[{"kind":"MethodSignature","id":0,"name":"localArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Shape"},"jsDoc":{"doc":"Get the geometry data for the collider in local coordinate space.","tags":{"since":["v3000.0"]}}}],"worldArea":[{"kind":"MethodSignature","id":0,"name":"worldArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Polygon"},"jsDoc":{"doc":"Get the geometry data for the collider in world coordinate space.","tags":{}}}],"screenArea":[{"kind":"MethodSignature","id":0,"name":"screenArea","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Polygon"},"jsDoc":{"doc":"Get the geometry data for the collider in screen coordinate space.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"area","text":"`area()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"AreaCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"AreaCompOpt","members":{"shape":[{"kind":"PropertySignature","id":0,"name":"shape","type":{"kind":"TypeReference","id":0,"typeName":"Shape"},"questionToken":true,"jsDoc":{"doc":"The shape of the area (currently only Rect and Polygon is supported).","tags":{"example":["```js\nadd([\n sprite(\"butterfly\"),\n pos(100, 200),\n // a triangle shape!\n area({ shape: new Polygon([vec2(0), vec2(100), vec2(-100, 100)]) }),\n])\n```"]}}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"Area scale.","tags":{}}}],"offset":[{"kind":"PropertySignature","id":0,"name":"offset","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true,"jsDoc":{"doc":"Area offset.","tags":{}}}],"cursor":[{"kind":"PropertySignature","id":0,"name":"cursor","type":{"kind":"TypeReference","id":0,"typeName":"Cursor"},"questionToken":true,"jsDoc":{"doc":"Cursor on hover.","tags":{}}}],"collisionIgnore":[{"kind":"PropertySignature","id":0,"name":"collisionIgnore","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Tag"}},"questionToken":true,"jsDoc":{"doc":"If this object should ignore collisions against certain other objects.","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"area","text":"`area()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"BodyComp":[{"kind":"InterfaceDeclaration","id":0,"name":"BodyComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"vel":[{"kind":"PropertySignature","id":0,"name":"vel","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Object current velocity.","tags":{"since":["v3001.0"]}}}],"drag":[{"kind":"PropertySignature","id":0,"name":"drag","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"How much velocity decays (velocity *= (1 - drag) every frame).","tags":{"since":["v3001.0"]}}}],"isStatic":[{"kind":"PropertySignature","id":0,"name":"isStatic","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If object is static, won't move, and all non static objects won't move past it.","tags":{}}}],"jumpForce":[{"kind":"PropertySignature","id":0,"name":"jumpForce","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Initial speed in pixels per second for jump().","tags":{}}}],"gravityScale":[{"kind":"PropertySignature","id":0,"name":"gravityScale","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Gravity multiplier.","tags":{}}}],"mass":[{"kind":"PropertySignature","id":0,"name":"mass","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Mass of the body, decides how much a non-static body should move when resolves with another non-static body. (default 1).","tags":{"since":["v3000.0"]}}}],"stickToPlatform":[{"kind":"PropertySignature","id":0,"name":"stickToPlatform","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If object should move with moving platform (default true).","tags":{"since":["v3000.0"]}}}],"curPlatform":[{"kind":"MethodSignature","id":0,"name":"curPlatform","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObj"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Current platform landing on.","tags":{}}}],"isGrounded":[{"kind":"MethodSignature","id":0,"name":"isGrounded","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If currently landing on a platform.","tags":{"since":["v2000.1"]}}}],"isFalling":[{"kind":"MethodSignature","id":0,"name":"isFalling","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If currently falling.","tags":{"since":["v2000.1"]}}}],"isJumping":[{"kind":"MethodSignature","id":0,"name":"isJumping","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If currently rising.","tags":{"since":["v3000.0"]}}}],"applyImpulse":[{"kind":"MethodSignature","id":0,"name":"applyImpulse","parameters":[{"kind":"Parameter","id":0,"name":"impulse","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Applies an impulse","tags":{"param":["The impulse vector, applied directly"]}}}],"addForce":[{"kind":"MethodSignature","id":0,"name":"addForce","parameters":[{"kind":"Parameter","id":0,"name":"force","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Applies a force","tags":{"param":["The force vector, applied after scaled by the inverse mass"]}}}],"jump":[{"kind":"MethodSignature","id":0,"name":"jump","parameters":[{"kind":"Parameter","id":0,"name":"force","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Upward thrust.","tags":{}}}],"onPhysicsResolve":[{"kind":"MethodSignature","id":0,"name":"onPhysicsResolve","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"col","type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when a collision is resolved.","tags":{"since":["v3000.0"]}}}],"onBeforePhysicsResolve":[{"kind":"MethodSignature","id":0,"name":"onBeforePhysicsResolve","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"col","type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs before a collision would be resolved.","tags":{"since":["v3000.0"]}}}],"onGround":[{"kind":"MethodSignature","id":0,"name":"onGround","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the object is grounded.","tags":{"since":["v2000.1"]}}}],"onFall":[{"kind":"MethodSignature","id":0,"name":"onFall","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the object starts falling.","tags":{"since":["v2000.1"]}}}],"onFallOff":[{"kind":"MethodSignature","id":0,"name":"onFallOff","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the object falls off platform.","tags":{"since":["v3000.0"]}}}],"onHeadbutt":[{"kind":"MethodSignature","id":0,"name":"onHeadbutt","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the object bumps into something on the head.","tags":{"since":["v2000.1"]}}}],"onLand":[{"kind":"MethodSignature","id":0,"name":"onLand","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when an object lands on this object.","tags":{"since":["v3001.0"]}}}],"onHeadbutted":[{"kind":"MethodSignature","id":0,"name":"onHeadbutted","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the object is bumped by another object head.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"body","text":"`body()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"BodyCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"BodyCompOpt","members":{"drag":[{"kind":"PropertySignature","id":0,"name":"drag","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"How much velocity decays (velocity *= (1 - drag) every frame).","tags":{"since":["v3001.0"]}}}],"jumpForce":[{"kind":"PropertySignature","id":0,"name":"jumpForce","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Initial speed in pixels per second for jump().","tags":{}}}],"maxVelocity":[{"kind":"PropertySignature","id":0,"name":"maxVelocity","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Maximum velocity when falling.","tags":{}}}],"gravityScale":[{"kind":"PropertySignature","id":0,"name":"gravityScale","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Gravity multiplier.","tags":{}}}],"isStatic":[{"kind":"PropertySignature","id":0,"name":"isStatic","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If object is static, won't move, and all non static objects won't move past it.","tags":{"since":["v3000.0"]}}}],"stickToPlatform":[{"kind":"PropertySignature","id":0,"name":"stickToPlatform","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If object should move with moving platform (default true).","tags":{"since":["v3000.0"]}}}],"mass":[{"kind":"PropertySignature","id":0,"name":"mass","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Mass of the body, decides how much a non-static body should move when resolves with another non-static body. (default 1).","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for the "},{"kind":"JSDocLink","id":0,"name":"body","text":"`body()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"DoubleJumpComp":[{"kind":"InterfaceDeclaration","id":0,"name":"DoubleJumpComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"numJumps":[{"kind":"PropertySignature","id":0,"name":"numJumps","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Number of jumps allowed.","tags":{}}}],"doubleJump":[{"kind":"MethodSignature","id":0,"name":"doubleJump","parameters":[{"kind":"Parameter","id":0,"name":"force","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Performs double jump (the initial jump only happens if player is grounded).","tags":{}}}],"onDoubleJump":[{"kind":"MethodSignature","id":0,"name":"onDoubleJump","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the object performs the second jump when double jumping.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"doubleJump","text":"`doubleJump()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"SurfaceEffectorCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"SurfaceEffectorCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0}}],"speedVariation":[{"kind":"PropertySignature","id":0,"name":"speedVariation","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"forceScale":[{"kind":"PropertySignature","id":0,"name":"forceScale","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]}}}],"SurfaceEffectorComp":[{"kind":"InterfaceDeclaration","id":0,"name":"SurfaceEffectorComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0}}],"speedVariation":[{"kind":"PropertySignature","id":0,"name":"speedVariation","type":{"kind":"NumberKeyword","id":0}}],"forceScale":[{"kind":"PropertySignature","id":0,"name":"forceScale","type":{"kind":"NumberKeyword","id":0}}]}}],"AreaEffectorCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"AreaEffectorCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"useGlobalAngle":[{"kind":"PropertySignature","id":0,"name":"useGlobalAngle","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"forceAngle":[{"kind":"PropertySignature","id":0,"name":"forceAngle","type":{"kind":"NumberKeyword","id":0}}],"forceMagnitude":[{"kind":"PropertySignature","id":0,"name":"forceMagnitude","type":{"kind":"NumberKeyword","id":0}}],"forceVariation":[{"kind":"PropertySignature","id":0,"name":"forceVariation","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"linearDrag":[{"kind":"PropertySignature","id":0,"name":"linearDrag","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]}}}],"AreaEffectorComp":[{"kind":"InterfaceDeclaration","id":0,"name":"AreaEffectorComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"useGlobalAngle":[{"kind":"PropertySignature","id":0,"name":"useGlobalAngle","type":{"kind":"BooleanKeyword","id":0}}],"forceAngle":[{"kind":"PropertySignature","id":0,"name":"forceAngle","type":{"kind":"NumberKeyword","id":0}}],"forceMagnitude":[{"kind":"PropertySignature","id":0,"name":"forceMagnitude","type":{"kind":"NumberKeyword","id":0}}],"forceVariation":[{"kind":"PropertySignature","id":0,"name":"forceVariation","type":{"kind":"NumberKeyword","id":0}}],"linearDrag":[{"kind":"PropertySignature","id":0,"name":"linearDrag","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]}}],"ForceMode":[{"kind":"TypeAliasDeclaration","id":0,"name":"ForceMode","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"constant","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"inverseLinear","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"inverseSquared","hasExtendedUnicodeEscape":false}}]}}],"PointEffectorCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"PointEffectorCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"forceMagnitude":[{"kind":"PropertySignature","id":0,"name":"forceMagnitude","type":{"kind":"NumberKeyword","id":0}}],"forceVariation":[{"kind":"PropertySignature","id":0,"name":"forceVariation","type":{"kind":"NumberKeyword","id":0}}],"distanceScale":[{"kind":"PropertySignature","id":0,"name":"distanceScale","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"forceMode":[{"kind":"PropertySignature","id":0,"name":"forceMode","type":{"kind":"TypeReference","id":0,"typeName":"ForceMode"},"questionToken":true}],"linearDrag":[{"kind":"PropertySignature","id":0,"name":"linearDrag","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]}}}],"PointEffectorComp":[{"kind":"InterfaceDeclaration","id":0,"name":"PointEffectorComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"forceMagnitude":[{"kind":"PropertySignature","id":0,"name":"forceMagnitude","type":{"kind":"NumberKeyword","id":0}}],"forceVariation":[{"kind":"PropertySignature","id":0,"name":"forceVariation","type":{"kind":"NumberKeyword","id":0}}],"distanceScale":[{"kind":"PropertySignature","id":0,"name":"distanceScale","type":{"kind":"NumberKeyword","id":0}}],"forceMode":[{"kind":"PropertySignature","id":0,"name":"forceMode","type":{"kind":"TypeReference","id":0,"typeName":"ForceMode"}}],"linearDrag":[{"kind":"PropertySignature","id":0,"name":"linearDrag","type":{"kind":"NumberKeyword","id":0}}]}}],"ConstantForceCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"ConstantForceCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"force":[{"kind":"PropertySignature","id":0,"name":"force","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true}]}}}],"ConstantForceComp":[{"kind":"InterfaceDeclaration","id":0,"name":"ConstantForceComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"force":[{"kind":"PropertySignature","id":0,"name":"force","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true}]}}],"BuoyancyEffectorCompOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"BuoyancyEffectorCompOpt","type":{"kind":"TypeLiteral","id":0,"members":{"surfaceLevel":[{"kind":"PropertySignature","id":0,"name":"surfaceLevel","type":{"kind":"NumberKeyword","id":0}}],"density":[{"kind":"PropertySignature","id":0,"name":"density","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"linearDrag":[{"kind":"PropertySignature","id":0,"name":"linearDrag","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"angularDrag":[{"kind":"PropertySignature","id":0,"name":"angularDrag","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"flowAngle":[{"kind":"PropertySignature","id":0,"name":"flowAngle","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"flowMagnitude":[{"kind":"PropertySignature","id":0,"name":"flowMagnitude","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"flowVariation":[{"kind":"PropertySignature","id":0,"name":"flowVariation","type":{"kind":"NumberKeyword","id":0},"questionToken":true}]}}}],"BuoyancyEffectorComp":[{"kind":"InterfaceDeclaration","id":0,"name":"BuoyancyEffectorComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"surfaceLevel":[{"kind":"PropertySignature","id":0,"name":"surfaceLevel","type":{"kind":"NumberKeyword","id":0}}],"density":[{"kind":"PropertySignature","id":0,"name":"density","type":{"kind":"NumberKeyword","id":0}}],"linearDrag":[{"kind":"PropertySignature","id":0,"name":"linearDrag","type":{"kind":"NumberKeyword","id":0}}],"angularDrag":[{"kind":"PropertySignature","id":0,"name":"angularDrag","type":{"kind":"NumberKeyword","id":0}}],"flowAngle":[{"kind":"PropertySignature","id":0,"name":"flowAngle","type":{"kind":"NumberKeyword","id":0}}],"flowMagnitude":[{"kind":"PropertySignature","id":0,"name":"flowMagnitude","type":{"kind":"NumberKeyword","id":0}}],"flowVariation":[{"kind":"PropertySignature","id":0,"name":"flowVariation","type":{"kind":"NumberKeyword","id":0}}],"applyBuoyancy":[{"kind":"MethodSignature","id":0,"name":"applyBuoyancy","parameters":[{"kind":"Parameter","id":0,"name":"body","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"BodyComp"}]}},{"kind":"Parameter","id":0,"name":"submergedArea","type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}],"type":{"kind":"VoidKeyword","id":0}}],"applyDrag":[{"kind":"MethodSignature","id":0,"name":"applyDrag","parameters":[{"kind":"Parameter","id":0,"name":"body","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"BodyComp"}]}},{"kind":"Parameter","id":0,"name":"submergedArea","type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}],"type":{"kind":"VoidKeyword","id":0}}]}}],"AnchorComp":[{"kind":"InterfaceDeclaration","id":0,"name":"AnchorComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"jsDoc":{"doc":"Anchor point for render.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"anchor","text":"`anchor()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"FollowComp":[{"kind":"InterfaceDeclaration","id":0,"name":"FollowComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"follow":[{"kind":"PropertySignature","id":0,"name":"follow","type":{"kind":"TypeLiteral","id":0,"members":{"obj":[{"kind":"PropertySignature","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"offset":[{"kind":"PropertySignature","id":0,"name":"offset","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"follow","text":"`follow()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"LayerComp":[{"kind":"InterfaceDeclaration","id":0,"name":"LayerComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"layerIndex":[{"kind":"GetAccessor","id":0,"name":"layerIndex","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get the index of the current layer the object is assigned to.","tags":{"returns":["The index of the layer the object is assigned to, or `null` if the layer does not exist."]}}}],"layer":[{"kind":"GetAccessor","id":0,"name":"layer","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get the name of the current layer the object is assigned to.","tags":{"returns":["The name of the layer the object is assigned to."]}}},{"kind":"SetAccessor","id":0,"name":"layer","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"jsDoc":{"doc":"Set the name of the layer the object should be assigned to.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"layer","text":"`layer()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"OffScreenComp":[{"kind":"InterfaceDeclaration","id":0,"name":"OffScreenComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"isOffScreen":[{"kind":"MethodSignature","id":0,"name":"isOffScreen","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If object is currently out of view.","tags":{}}}],"onExitScreen":[{"kind":"MethodSignature","id":0,"name":"onExitScreen","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when object goes out of view.","tags":{}}}],"onEnterScreen":[{"kind":"MethodSignature","id":0,"name":"onEnterScreen","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when object enters view.","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"offscreen","text":"`offscreen()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"OffScreenCompOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"OffScreenCompOpt","members":{"hide":[{"kind":"PropertySignature","id":0,"name":"hide","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If hide object when out of view.","tags":{}}}],"pause":[{"kind":"PropertySignature","id":0,"name":"pause","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If pause object when out of view.","tags":{}}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If destroy object when out of view.","tags":{}}}],"distance":[{"kind":"PropertySignature","id":0,"name":"distance","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The distance when out of view is triggered (default 200).","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"Options for "},{"kind":"JSDocLink","id":0,"name":"offscreen","text":"`offscreen()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"RotateComp":[{"kind":"InterfaceDeclaration","id":0,"name":"RotateComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Angle in degrees.","tags":{}}}],"rotateBy":[{"kind":"MethodSignature","id":0,"name":"rotateBy","parameters":[{"kind":"Parameter","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Rotate in degrees.","tags":{}}}],"rotateTo":[{"kind":"MethodSignature","id":0,"name":"rotateTo","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Rotate to a degree (like directly assign to .angle)","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"rotate","text":"`rotate()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"ScaleComp":[{"kind":"InterfaceDeclaration","id":0,"name":"ScaleComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The current scale of the object","tags":{"returns":[[{"kind":"JSDocText","id":0,"text":"The current scale of the object as a "},{"kind":"JSDocLink","id":0,"name":"Vec2","text":"`Vec2`"}]]}}}],"scaleTo":[{"kind":"MethodSignature","id":0,"name":"scaleTo","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set the scale of the object to a number","tags":{}}},{"kind":"MethodSignature","id":0,"name":"scaleTo","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set the scale of the object to a Vec2","tags":{}}},{"kind":"MethodSignature","id":0,"name":"scaleTo","parameters":[{"kind":"Parameter","id":0,"name":"sx","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"sy","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set the scale of the object to a number for x and y","tags":{}}}],"scaleBy":[{"kind":"MethodSignature","id":0,"name":"scaleBy","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Scale the object by a number","tags":{}}},{"kind":"MethodSignature","id":0,"name":"scaleBy","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Scale the object by a Vec2","tags":{}}},{"kind":"MethodSignature","id":0,"name":"scaleBy","parameters":[{"kind":"Parameter","id":0,"name":"sx","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"sy","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Scale the object by a number for x and y","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"scale","text":"`scale()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"ZComp":[{"kind":"InterfaceDeclaration","id":0,"name":"ZComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"z":[{"kind":"PropertySignature","id":0,"name":"z","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Defines the z-index of this game obj","tags":{}}}]},"jsDoc":{"doc":[{"kind":"JSDocText","id":0,"text":"The "},{"kind":"JSDocLink","id":0,"name":"z","text":"`z()`"},{"kind":"JSDocText","id":0,"text":" component."}],"tags":{"group":["Component Types"]}}}],"GameObjEventNames":[{"kind":"TypeAliasDeclaration","id":0,"name":"GameObjEventNames","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"update","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"draw","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"add","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"destroy","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"collide","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"collideUpdate","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"collideEnd","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"hurt","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"heal","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"death","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"beforePhysicsResolve","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"physicsResolve","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ground","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"fall","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"fallOff","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"headbutt","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"doubleJump","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"exitView","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"enterView","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"animStart","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"animEnd","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"navigationNext","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"navigationEnded","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"navigationStarted","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"targetReached","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"patrolFinished","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"objectSpotted","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"animateChannelFinished","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"animateFinished","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"spatialMapChanged","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"navigationMapInvalid","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"navigationMapChanged","hasExtendedUnicodeEscape":false}}]}}],"GameObjEventMap":[{"kind":"TypeAliasDeclaration","id":0,"name":"GameObjEventMap","type":{"kind":"TypeLiteral","id":0,"members":{}},"jsDoc":{"doc":"Game Object events.","tags":{"group":["Events"]}}}],"TupleWithoutFirst":[{"kind":"TypeAliasDeclaration","id":0,"name":"TupleWithoutFirst","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","constraint":{"kind":"ArrayType","id":0,"elementType":{"kind":"AnyKeyword","id":0}}}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"TupleType","id":0,"elements":[{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}},{"kind":"RestType","id":0,"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"E"}}}]},"trueType":{"kind":"TypeReference","id":0,"typeName":"E"},"falseType":{"kind":"NeverKeyword","id":0}}}],"SceneName":[{"kind":"TypeAliasDeclaration","id":0,"name":"SceneName","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"The name of a scene.","tags":{}}}],"SceneDef":[{"kind":"TypeAliasDeclaration","id":0,"name":"SceneDef","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"Game":[{"kind":"TypeAliasDeclaration","id":0,"name":"Game","type":{"kind":"TypeReference","id":0,"typeName":"ReturnType","typeArguments":[{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"initGame"}}]}}],"BoomOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"BoomOpt","members":{"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Animation speed.","tags":{}}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Scale.","tags":{}}}],"comps":[{"kind":"PropertySignature","id":0,"name":"comps","type":{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"AnyKeyword","id":0}]},"questionToken":true,"jsDoc":{"doc":"Additional components.","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"tags":{"group":["Options"]}}}],"LevelOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"LevelOpt","members":{"tileWidth":[{"kind":"PropertySignature","id":0,"name":"tileWidth","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width of each block.","tags":{}}}],"tileHeight":[{"kind":"PropertySignature","id":0,"name":"tileHeight","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height of each block.","tags":{}}}],"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true,"jsDoc":{"doc":"Position of the first block.","tags":{}}}],"tiles":[{"kind":"PropertySignature","id":0,"name":"tiles","type":{"kind":"TypeLiteral","id":0,"members":{}},"jsDoc":{"doc":"Definition of each tile.","tags":{}}}],"wildcardTile":[{"kind":"PropertySignature","id":0,"name":"wildcardTile","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"sym","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"AnyKeyword","id":0}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}},{"kind":"UndefinedKeyword","id":0}]}},"questionToken":true,"jsDoc":{"doc":"Called when encountered a symbol not defined in \"tiles\".","tags":{}}}]},"jsDoc":{"tags":{"group":["Options"]}}}],"KAPLAYCtx":[{"kind":"InterfaceDeclaration","id":0,"name":"KAPLAYCtx","typeParameters":[{"kind":"TypeParameter","id":0,"name":"TButtonDef","constraint":{"kind":"TypeReference","id":0,"typeName":"ButtonsDef"},"default":{"kind":"TypeLiteral","id":0,"members":{}}},{"kind":"TypeParameter","id":0,"name":"TButton","constraint":{"kind":"StringKeyword","id":0},"default":{"kind":"StringKeyword","id":0}}],"members":{"add":[{"kind":"MethodSignature","id":0,"name":"add","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"comps","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"ConstructorType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"go","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"R"},"falseType":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"go","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"R"},"falseType":{"kind":"TypeReference","id":0,"typeName":"T"}}}]},"jsDoc":{"doc":"Assemble a game object from a list of components, and add it to the game","tags":{"returns":["The added game object that contains all properties and methods each component offers."],"example":["```js\nconst player = add([\n // List of components, each offers a set of functionalities\n sprite(\"mark\"),\n pos(100, 200),\n area(),\n body(),\n health(8),\n // Plain strings are tags, a quicker way to let us define behaviors for a group\n \"player\",\n \"friendly\",\n // Components are just plain objects, you can pass an object literal as a component.\n {\n dir: LEFT,\n dead: false,\n speed: 240,\n },\n])\n\n// .jump is provided by body()\nplayer.jump()\n\n// .moveTo is provided by pos()\nplayer.moveTo(300, 200)\n\n// .onUpdate() is on every game object, it registers an event that runs every frame\nplayer.onUpdate(() => {\n // .move() is provided by pos()\n player.move(player.dir.scale(player.speed))\n})\n\n// .onCollide is provided by area()\nplayer.onCollide(\"tree\", () => {\n destroy(player)\n})\n```"],"group":["Game Obj"]}}}],"make":[{"kind":"MethodSignature","id":0,"name":"make","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"comps","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"ConstructorType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"go","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"R"},"falseType":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"go","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"R"},"falseType":{"kind":"TypeReference","id":0,"typeName":"T"}}}]},"jsDoc":{"doc":"Create a game object like add(), but not adding to the scene.","tags":{"since":["v3000.1"],"example":["```js\nconst label = make([\n text(\"oh hi\"),\n])\n\nadd([\n rect(label.width, label.height),\n color(0, 0, 255),\n children(label),\n])\n```"],"group":["Game Obj"]}}}],"readd":[{"kind":"MethodSignature","id":0,"name":"readd","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove and re-add the game obj, without triggering add / destroy events.","tags":{"example":["```js\n// Common way to use this is to have one sprite overlap another sprite, and use readd() to have the bottom sprite on top of the other.\n\n// Create two sprites.\nconst greenBean = add([\n sprite(\"bean\"),\n pos(200,140),\n color(255, 255, 255),\n area(),\n]);\n\n// This bean will overlap the green bean.\nconst purpleBean = add([\n sprite(\"bean\"),\n pos(230,140),\n color(255, 0, 255),\n area(),\n]);\n\n// Example 1: simply call readd() on the target you want on top.\nreadd(greenBean);\n\n// Example 2: using onClick() or other functions with readd().\n// If you comment out the first example, and use this readd() with a function like onClick(), you\ncan keep switching which sprite is above the other ( click on edge of face ).\n\npurpleBean.onClick(() => {\n readd(greenBean)\n});\n\ngreenBean.onClick(() => {\n readd(purpleBean)\n});\n```"],"group":["Game Obj"]}}}],"get":[{"kind":"MethodSignature","id":0,"name":"get","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Tag"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Tag"}}]}},{"kind":"Parameter","id":0,"name":"opts","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"GetOpt"}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},"jsDoc":{"doc":"Get a list of all game objs with certain tag.","tags":{"example":["```js\n// get a list of all game objs with tag \"bomb\"\nconst allBombs = get(\"bomb\")\n\n// To get all objects use \"*\"\nconst allObjs = get(\"*\")\n\n// Recursively get all children and descendents\nconst allObjs = get(\"*\", { recursive: true })\n```"],"group":["Game Obj"]}}}],"query":[{"kind":"MethodSignature","id":0,"name":"query","parameters":[{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"TypeReference","id":0,"typeName":"QueryOpt"}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},"jsDoc":{"doc":"Get a list of game objects in an advanced way.","tags":{"example":["```js\nconst bean = k.add([\"friend\", \"bean\"]);\nconst bean2 = k.add([\"friend\", \"bean\"]);\nconst bag = k.add([\"friend\", \"bag\"]);\n\n// get bean\nquery({\n include: \"bean\",\n}) // will return [bean, bean2];\n\n// get all friends excluding bean\nquery({\n include: \"friend\",\n exclude: \"bean\",\n}); // will return [bag]\n\n```"],"group":["Game Obj"]}}}],"destroy":[{"kind":"MethodSignature","id":0,"name":"destroy","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove the game obj.","tags":{"example":["```js\n// every time bean collides with anything with tag \"fruit\", remove it\nbean.onCollide(\"fruit\", (fruit) => {\n destroy(fruit)\n})\n```"],"group":["Game Obj"]}}}],"destroyAll":[{"kind":"MethodSignature","id":0,"name":"destroyAll","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove all game objs with certain tag.","tags":{"example":["```js\n// destroy all objects with tag \"bomb\" when you click one\nonClick(\"bomb\", () => {\n destroyAll(\"bomb\")\n})\n```"],"group":["Game Obj"]}}}],"pos":[{"kind":"MethodSignature","id":0,"name":"pos","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"PosComp"},"jsDoc":{"doc":"Set the position of a Game Object.","tags":{"example":["```js\n// This game object will draw a \"bean\" sprite at (100, 200)\nadd([\n pos(100, 200),\n sprite(\"bean\"),\n])\n```"],"group":["Components"]}}},{"kind":"MethodSignature","id":0,"name":"pos","parameters":[{"kind":"Parameter","id":0,"name":"xy","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"PosComp"}},{"kind":"MethodSignature","id":0,"name":"pos","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"PosComp"}},{"kind":"MethodSignature","id":0,"name":"pos","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"PosComp"}}],"scale":[{"kind":"MethodSignature","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"ScaleComp"},"jsDoc":{"doc":"Set the scale of a Game Object.","tags":{"example":["```js\n// scale uniformly with one value\nadd([\n sprite(\"bean\"),\n\t scale(3),\n])\n// scale with x & y values. In this case, scales more horizontally.\nadd([\n sprite(\"bean\"),\n\t scale(3, 1),\n])\n // scale with vec2(x,y).\nbean.scale = vec2(2,4)\n\n```"],"group":["Components"]}}},{"kind":"MethodSignature","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"xy","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"ScaleComp"}},{"kind":"MethodSignature","id":0,"name":"scale","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"ScaleComp"}},{"kind":"MethodSignature","id":0,"name":"scale","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"ScaleComp"}}],"rotate":[{"kind":"MethodSignature","id":0,"name":"rotate","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"RotateComp"},"jsDoc":{"doc":"Rotates a Game Object (in degrees).","tags":{"group":["Components"]}}}],"color":[{"kind":"MethodSignature","id":0,"name":"color","parameters":[{"kind":"Parameter","id":0,"name":"r","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"g","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"ColorComp"},"jsDoc":{"doc":"Sets the color of a Game Object (rgb 0-255).","tags":{"example":["```js\n// blue frog\nadd([\n sprite(\"bean\"),\n color(0, 0, 255)\n])\n```"],"group":["Components"]}}},{"kind":"MethodSignature","id":0,"name":"color","parameters":[{"kind":"Parameter","id":0,"name":"c","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"type":{"kind":"TypeReference","id":0,"typeName":"ColorComp"}},{"kind":"MethodSignature","id":0,"name":"color","parameters":[{"kind":"Parameter","id":0,"name":"rgb","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0},{"kind":"NumberKeyword","id":0}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"ColorComp"}},{"kind":"MethodSignature","id":0,"name":"color","parameters":[{"kind":"Parameter","id":0,"name":"c","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"ColorComp"}},{"kind":"MethodSignature","id":0,"name":"color","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"ColorComp"}}],"opacity":[{"kind":"MethodSignature","id":0,"name":"opacity","parameters":[{"kind":"Parameter","id":0,"name":"o","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"OpacityComp"},"jsDoc":{"doc":"Sets the opacity of a Game Object (0.0 - 1.0).","tags":{"group":["Components"]}}}],"sprite":[{"kind":"MethodSignature","id":0,"name":"sprite","parameters":[{"kind":"Parameter","id":0,"name":"spr","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SpriteData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}]}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"SpriteCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"SpriteComp"},"jsDoc":{"doc":"Attach and render a sprite to a Game Object.","tags":{"example":["```js\n// minimal setup\nadd([\n sprite(\"bean\"),\n])\n\n// with options\nconst bean = add([\n sprite(\"bean\", {\n // start with animation \"idle\"\n anim: \"idle\",\n }),\n])\n\n// play / stop an anim\nbean.play(\"jump\")\nbean.stop()\n\n// manually setting a frame\nbean.frame = 3\n```"],"group":["Components"]}}}],"text":[{"kind":"MethodSignature","id":0,"name":"text","parameters":[{"kind":"Parameter","id":0,"name":"txt","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"TextCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"TextComp"},"jsDoc":{"doc":"Attach and render a text to a Game Object.","tags":{"example":["```js\n// a simple score counter\nconst score = add([\n text(\"Score: 0\"),\n pos(24, 24),\n { value: 0 },\n])\n\nplayer.onCollide(\"coin\", () => {\n score.value += 1\n score.text = \"Score:\" + score.value\n})\n\n// with options\nadd([\n pos(24, 24),\n text(\"ohhi\", {\n size: 48, // 48 pixels tall\n width: 320, // it'll wrap to next line when width exceeds this value\n font: \"sans-serif\", // specify any font you loaded or browser built-in\n }),\n])\n```"],"group":["Components"]}}}],"polygon":[{"kind":"MethodSignature","id":0,"name":"polygon","parameters":[{"kind":"Parameter","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"PolygonCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"PolygonComp"},"jsDoc":{"doc":"Attach and render a polygon to a Game Object.","tags":{"since":["v3001.0"],"example":["```js\n// Make a square the hard way\nadd([\n pos(80, 120),\n polygon([vec2(0,0), vec2(50,0), vec2(50,50), vec2(0,50)]),\n outline(4),\n area(),\n])\n```"],"group":["Components"]}}}],"rect":[{"kind":"MethodSignature","id":0,"name":"rect","parameters":[{"kind":"Parameter","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"RectCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RectComp"},"jsDoc":{"doc":"Attach and render a rectangle to a Game Object.","tags":{"example":["```js\nconst obstacle = add([\n pos(80, 120),\n rect(20, 40),\n outline(4),\n area(),\n])\n```"],"group":["Components"]}}}],"circle":[{"kind":"MethodSignature","id":0,"name":"circle","parameters":[{"kind":"Parameter","id":0,"name":"radius","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"CircleComp"},"jsDoc":{"doc":"Attach and render a circle to a Game Object.","tags":{"example":["```js\nadd([\n pos(80, 120),\n circle(16),\n])\n```"],"group":["Components"]}}}],"uvquad":[{"kind":"MethodSignature","id":0,"name":"uvquad","parameters":[{"kind":"Parameter","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"UVQuadComp"},"jsDoc":{"doc":"Attach and render a UV quad to a Game Object.","tags":{"example":["```js\nadd([\n uvquad(width(), height()),\n shader(\"spiral\"),\n])\n```"],"group":["Components"]}}}],"area":[{"kind":"MethodSignature","id":0,"name":"area","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"AreaComp"},"jsDoc":{"doc":"Attach a collider area from shape and enables collision detection in a Game Object.","tags":{"example":["```js\n// Automatically generate area information from the shape of render\nconst player = add([\n sprite(\"bean\"),\n area(),\n])\n\n// Die if player collides with another game obj with tag \"tree\"\nplayer.onCollide(\"tree\", () => {\n destroy(player)\n go(\"lose\")\n})\n\n// Check for collision manually every frame instead of registering an event\nplayer.onUpdate(() => {\n if (player.isColliding(bomb)) {\n score += 1\n }\n})\n```"],"group":["Components"]}}},{"kind":"MethodSignature","id":0,"name":"area","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"AreaCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"AreaComp"}}],"anchor":[{"kind":"MethodSignature","id":0,"name":"anchor","parameters":[{"kind":"Parameter","id":0,"name":"o","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"AnchorComp"},"jsDoc":{"doc":"Anchor point for render (default \"topleft\").","tags":{"example":["```js\n// set anchor to \"center\" so it'll rotate from center\nadd([\n rect(40, 10),\n rotate(45),\n anchor(\"center\"),\n])\n```"],"group":["Components"]}}}],"z":[{"kind":"MethodSignature","id":0,"name":"z","parameters":[{"kind":"Parameter","id":0,"name":"z","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"ZComp"},"jsDoc":{"doc":"Determines the draw order for objects on the same layer. Object will be drawn on top if z value is bigger.","tags":{"group":["Components"]}}}],"layer":[{"kind":"MethodSignature","id":0,"name":"layer","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"LayerComp"},"jsDoc":{"doc":"Determines the layer for objects. Object will be drawn on top if the layer index is higher.","tags":{"group":["Components"]}}}],"outline":[{"kind":"MethodSignature","id":0,"name":"outline","parameters":[{"kind":"Parameter","id":0,"name":"width","questionToken":true,"type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"color","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"type":{"kind":"TypeReference","id":0,"typeName":"OutlineComp"},"jsDoc":{"doc":"Give obj an outline.","tags":{"group":["Components"]}}}],"particles":[{"kind":"MethodSignature","id":0,"name":"particles","parameters":[{"kind":"Parameter","id":0,"name":"popt","type":{"kind":"TypeReference","id":0,"typeName":"ParticlesOpt"}},{"kind":"Parameter","id":0,"name":"eopt","type":{"kind":"TypeReference","id":0,"typeName":"EmitterOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"ParticlesComp"}}],"body":[{"kind":"MethodSignature","id":0,"name":"body","parameters":[{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"BodyCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"BodyComp"},"jsDoc":{"doc":"Physical body that responds to gravity. Requires \"area\" and \"pos\" comp. This also makes the object \"solid\".","tags":{"example":["```js\n// bean jumpy\nconst bean = add([\n sprite(\"bean\"),\n // body() requires \"pos\" and \"area\" component\n pos(),\n area(),\n body(),\n])\n\n// when bean is grounded, press space to jump\n// check out #BodyComp for more methods\nonKeyPress(\"space\", () => {\n if (bean.isGrounded()) {\n bean.jump()\n }\n})\n\n// run something when bean falls and hits a ground\nbean.onGround(() => {\n debug.log(\"oh no!\")\n})\n```"],"group":["Components"]}}}],"surfaceEffector":[{"kind":"MethodSignature","id":0,"name":"surfaceEffector","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"SurfaceEffectorCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"SurfaceEffectorComp"},"jsDoc":{"doc":"Applies a force on a colliding object in order to make it move along the collision tangent vector.\nGood for conveyor belts.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"areaEffector":[{"kind":"MethodSignature","id":0,"name":"areaEffector","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"AreaEffectorCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"AreaEffectorComp"},"jsDoc":{"doc":"Applies a force on a colliding object.\nGood to apply anti-gravity, wind or water flow.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"pointEffector":[{"kind":"MethodSignature","id":0,"name":"pointEffector","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"PointEffectorCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"PointEffectorComp"},"jsDoc":{"doc":"Applies a force on a colliding object directed towards this object's origin.\nGood to apply magnetic attractiong or repulsion.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"buoyancyEffector":[{"kind":"MethodSignature","id":0,"name":"buoyancyEffector","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"BuoyancyEffectorCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"BuoyancyEffectorComp"},"jsDoc":{"doc":"Applies an upwards force (force against gravity) to colliding objects depending on the fluid density and submerged area.\nGood to apply constant thrust.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"constantForce":[{"kind":"MethodSignature","id":0,"name":"constantForce","parameters":[{"kind":"Parameter","id":0,"name":"opts","type":{"kind":"TypeReference","id":0,"typeName":"ConstantForceCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"ConstantForceComp"},"jsDoc":{"doc":"Applies a constant force to the object.\nGood to apply constant thrust.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"doubleJump":[{"kind":"MethodSignature","id":0,"name":"doubleJump","parameters":[{"kind":"Parameter","id":0,"name":"numJumps","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"DoubleJumpComp"},"jsDoc":{"doc":"Enables double jump. Requires \"body\" component.","tags":{"since":["v3000.0"],"group":["Components"]}}}],"move":[{"kind":"MethodSignature","id":0,"name":"move","parameters":[{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}},{"kind":"Parameter","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"EmptyComp"},"jsDoc":{"doc":"Move towards a direction infinitely, and destroys when it leaves game view. Requires \"pos\" component.","tags":{"example":["```js\n// enemy throwing feces at player\nconst projectile = add([\n sprite(\"feces\"),\n pos(enemy.pos),\n area(),\n move(player.pos.angle(enemy.pos), 1200),\n offscreen({ destroy: true }),\n])\n```"],"group":["Components"]}}}],"offscreen":[{"kind":"MethodSignature","id":0,"name":"offscreen","parameters":[{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"OffScreenCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"OffScreenComp"},"jsDoc":{"doc":"Control the behavior of object when it goes out of view.","tags":{"since":["v2000.2"],"example":["```js\nadd([\n pos(player.pos),\n sprite(\"bullet\"),\n offscreen({ destroy: true }),\n \"projectile\",\n])\n```"],"group":["Components"]}}}],"follow":[{"kind":"MethodSignature","id":0,"name":"follow","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObj"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"offset","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"FollowComp"},"jsDoc":{"doc":"Follow another game obj's position.","tags":{"group":["Components"]}}}],"shader":[{"kind":"MethodSignature","id":0,"name":"shader","parameters":[{"kind":"Parameter","id":0,"name":"id","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"uniform","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Uniform"},{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"ShaderComp"},"jsDoc":{"doc":"Custom shader.","tags":{"group":["Components"]}}}],"textInput":[{"kind":"MethodSignature","id":0,"name":"textInput","parameters":[{"kind":"Parameter","id":0,"name":"hasFocus","questionToken":true,"type":{"kind":"BooleanKeyword","id":0}},{"kind":"Parameter","id":0,"name":"maxInputLength","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"TextInputComp"},"jsDoc":{"doc":"Get input from the user and store it in the nodes text property, displaying it with the text component and allowing other functions to access it.","tags":{"example":["```js\nconst obj = add([\n text(\"\"),\n textInput(),\n])\n\nobj.hasFocus = false\ndebug.log(obj.text) // oh no i cant see my new text since it was disabled\n```"],"group":["Components"]}}}],"timer":[{"kind":"MethodSignature","id":0,"name":"timer","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"TimerComp"},"jsDoc":{"doc":"Enable timer related functions like wait(), loop(), tween() on the game object.","tags":{"example":["```js\nconst obj = add([\n timer(),\n])\n\nobj.wait(2, () => { ... })\nobj.loop(0.5, () => { ... })\nobj.tween(obj.pos, mousePos(), 0.5, (p) => obj.pos = p, easings.easeOutElastic)\n```"],"group":["Components"]}}}],"fixed":[{"kind":"MethodSignature","id":0,"name":"fixed","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"FixedComp"},"jsDoc":{"doc":"Make object unaffected by camera or parent object transforms, and render at last.","tags":{"example":["```js\n// this will be be fixed on top left and not affected by camera\nconst score = add([\n text(0),\n pos(12, 12),\n fixed(),\n])\n```"],"group":["Components"]}}}],"stay":[{"kind":"MethodSignature","id":0,"name":"stay","parameters":[{"kind":"Parameter","id":0,"name":"scenesToStay","questionToken":true,"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"StayComp"},"jsDoc":{"doc":"Don't get destroyed on scene switch.","tags":{"example":["```js\nplayer.onCollide(\"bomb\", () => {\n // spawn an explosion and switch scene, but don't destroy the explosion game obj on scene switch\n add([\n sprite(\"explosion\", { anim: \"burst\", }),\n stay(),\n lifespan(1),\n ])\n go(\"lose\", score)\n})\n```"],"group":["Components"]}}}],"health":[{"kind":"MethodSignature","id":0,"name":"health","parameters":[{"kind":"Parameter","id":0,"name":"hp","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"maxHP","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"HealthComp"},"jsDoc":{"doc":"Handles health related logic and events.","tags":{"example":["```js\nconst player = add([\n health(3),\n])\n\nplayer.onCollide(\"bad\", (bad) => {\n player.hurt(1)\n bad.hurt(1)\n})\n\nplayer.onCollide(\"apple\", () => {\n player.heal(1)\n})\n\nplayer.on(\"hurt\", () => {\n play(\"ouch\")\n})\n\n// triggers when hp reaches 0\nplayer.on(\"death\", () => {\n destroy(player)\n go(\"lose\")\n})\n```"],"group":["Components"]}}}],"lifespan":[{"kind":"MethodSignature","id":0,"name":"lifespan","parameters":[{"kind":"Parameter","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LifespanCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"EmptyComp"},"jsDoc":{"doc":"Destroy the game obj after certain amount of time","tags":{"example":["```js\n// spawn an explosion, destroy after 1 seconds, start fading away after 0.5 second\nadd([\n sprite(\"explosion\", { anim: \"burst\", }),\n lifespan(1, { fade: 0.5 }),\n])\n```"],"group":["Components"]}}}],"named":[{"kind":"MethodSignature","id":0,"name":"named","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"NamedComp"},"jsDoc":{"doc":"Names an object.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"state":[{"kind":"MethodSignature","id":0,"name":"state","parameters":[{"kind":"Parameter","id":0,"name":"initialState","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"stateList","questionToken":true,"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"StateComp"},"jsDoc":{"doc":"Finite state machine.","tags":{"since":["v2000.1"],"example":["```js\nconst enemy = add([\n pos(80, 100),\n sprite(\"robot\"),\n state(\"idle\", [\"idle\", \"attack\", \"move\"]),\n])\n\n// this callback will run once when enters \"attack\" state\nenemy.onStateEnter(\"attack\", () => {\n // enter \"idle\" state when the attack animation ends\n enemy.play(\"attackAnim\", {\n // any additional arguments will be passed into the onStateEnter() callback\n onEnd: () => enemy.enterState(\"idle\", rand(1, 3)),\n })\n checkHit(enemy, player)\n})\n\n// this will run once when enters \"idle\" state\nenemy.onStateEnter(\"idle\", (time) => {\n enemy.play(\"idleAnim\")\n wait(time, () => enemy.enterState(\"move\"))\n})\n\n// this will run every frame when current state is \"move\"\nenemy.onStateUpdate(\"move\", () => {\n enemy.follow(player)\n if (enemy.pos.dist(player.pos) < 16) {\n enemy.enterState(\"attack\")\n }\n})\n```"],"group":["Components"]}}},{"kind":"MethodSignature","id":0,"name":"state","parameters":[{"kind":"Parameter","id":0,"name":"initialState","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"stateList","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"transitions","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}]}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"StateComp"},"jsDoc":{"doc":"state() with pre-defined transitions.","tags":{"since":["v2000.2"],"example":["```js\nconst enemy = add([\n pos(80, 100),\n sprite(\"robot\"),\n state(\"idle\", [\"idle\", \"attack\", \"move\"], {\n \"idle\": \"attack\",\n \"attack\": \"move\",\n \"move\": [ \"idle\", \"attack\" ],\n }),\n])\n\n// this callback will only run once when enter \"attack\" state from \"idle\"\nenemy.onStateTransition(\"idle\", \"attack\", () => {\n checkHit(enemy, player)\n})\n```"],"group":["Components"]}}}],"fadeIn":[{"kind":"MethodSignature","id":0,"name":"fadeIn","parameters":[{"kind":"Parameter","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Comp"},"jsDoc":{"doc":"Fade object in.\n\nUses opacity for finding what to fade into and to set opacity during fade animation.","tags":{"since":["v3000.0"],"group":["Components"],"deprecated":["since v3001.0"]}}}],"mask":[{"kind":"MethodSignature","id":0,"name":"mask","parameters":[{"kind":"Parameter","id":0,"name":"maskType","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Mask"}}],"type":{"kind":"TypeReference","id":0,"typeName":"MaskComp"},"jsDoc":{"doc":"Mask all children object render.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"drawon":[{"kind":"MethodSignature","id":0,"name":"drawon","parameters":[{"kind":"Parameter","id":0,"name":"canvas","type":{"kind":"TypeReference","id":0,"typeName":"FrameBuffer"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Comp"}}],"tile":[{"kind":"MethodSignature","id":0,"name":"tile","parameters":[{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"TypeReference","id":0,"typeName":"TileCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"TileComp"},"jsDoc":{"doc":"A tile on a tile map.","tags":{"since":["v3000.0"],"group":["Components"]}}}],"agent":[{"kind":"MethodSignature","id":0,"name":"agent","parameters":[{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"AgentCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"AgentComp"},"jsDoc":{"doc":"An agent which can finds it way on a tilemap.","tags":{"since":["v3000.0"],"group":["Components"]}}}],"animate":[{"kind":"MethodSignature","id":0,"name":"animate","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"AnimateComp"},"jsDoc":{"doc":"A component to animate properties.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"serializeAnimation":[{"kind":"MethodSignature","id":0,"name":"serializeAnimation","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Animation"},"jsDoc":{"doc":"Serializes the animation to plain objects","tags":{}}}],"sentry":[{"kind":"MethodSignature","id":0,"name":"sentry","parameters":[{"kind":"Parameter","id":0,"name":"candidates","type":{"kind":"TypeReference","id":0,"typeName":"SentryCandidates"}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"SentryCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"SentryComp"},"jsDoc":{"doc":"A sentry which reacts to objects coming into view.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"patrol":[{"kind":"MethodSignature","id":0,"name":"patrol","parameters":[{"kind":"Parameter","id":0,"name":"opts","type":{"kind":"TypeReference","id":0,"typeName":"PatrolCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"PatrolComp"},"jsDoc":{"doc":"A patrol which can follow waypoints to a goal.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"navigation":[{"kind":"MethodSignature","id":0,"name":"navigation","parameters":[{"kind":"Parameter","id":0,"name":"opts","type":{"kind":"TypeReference","id":0,"typeName":"NavigationCompOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"NavigationComp"},"jsDoc":{"doc":"A navigator which can calculate waypoints to a goal.","tags":{"since":["v3001.0"],"group":["Components"]}}}],"raycast":[{"kind":"MethodSignature","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"exclude","questionToken":true,"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"},"jsDoc":{"tags":{"group":["Math"]}}}],"on":[{"kind":"MethodSignature","id":0,"name":"on","typeParameters":[{"kind":"TypeParameter","id":0,"name":"Ev","constraint":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObjEventNames"},{"kind":"IntersectionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{}}]}]}}],"parameters":[{"kind":"Parameter","id":0,"name":"event","type":{"kind":"TypeReference","id":0,"typeName":"Ev"}},{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"TypeReference","id":0,"typeName":"TupleWithoutFirst","typeArguments":[{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"GameObjEventMap"},"indexType":{"kind":"TypeReference","id":0,"typeName":"Ev"}}]}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event on all game objs with certain tag.","tags":{"example":["```js\n// a custom event defined by body() comp\n// every time an obj with tag \"bomb\" hits the floor, destroy it and addKaboom()\non(\"ground\", \"bomb\", (bomb) => {\n destroy(bomb)\n addKaboom(bomb.pos)\n})\n\n// a custom event can be defined manually\n// by passing a name and a callback function\non(\"talk\", (message, posX, posY) => {\n add([\n text(message),\n pos(posX, posY - 100)\n ])\n})\nonKeyPress(\"space\", () => {\n // the trigger method on game objs can be used to trigger a custom event\n npc.trigger(\"talk\", \"Hello World!\", npc.pos.x, npc.pos.y)\n})\n\n```"],"group":["Events"]}}}],"onFixedUpdate":[{"kind":"MethodSignature","id":0,"name":"onFixedUpdate","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs at a fixed framerate.","tags":{"since":["v3000.1"]}}},{"kind":"MethodSignature","id":0,"name":"onFixedUpdate","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onUpdate":[{"kind":"MethodSignature","id":0,"name":"onUpdate","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame (~60 times per second) for all game objs with certain tag.","tags":{"since":["v2000.1"],"example":["```js\n// move every \"tree\" 120 pixels per second to the left, destroy it when it leaves screen\n// there'll be nothing to run if there's no \"tree\" obj in the scene\nonUpdate(\"tree\", (tree) => {\n tree.move(-120, 0)\n if (tree.pos.x < 0) {\n destroy(tree)\n }\n})\n```"],"group":["Events"]}}},{"kind":"MethodSignature","id":0,"name":"onUpdate","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame (~60 times per second).","tags":{"since":["v2000.1"],"example":["```js\n// This will run every frame\nonUpdate(() => {\n debug.log(\"ohhi\")\n})\n```"],"group":["Events"]}}}],"onDraw":[{"kind":"MethodSignature","id":0,"name":"onDraw","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame (~60 times per second) for all game objs with certain tag (this is the same as onUpdate but all draw events are run after update events, drawXXX() functions only work in this phase).","tags":{"since":["v2000.1"],"group":["Events"]}}},{"kind":"MethodSignature","id":0,"name":"onDraw","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame (~60 times per second) (this is the same as onUpdate but all draw events are run after update events, drawXXX() functions only work in this phase).","tags":{"since":["v2000.1"],"example":["```js\nonDraw(() => {\n drawLine({\n p1: vec2(0),\n p2: mousePos(),\n color: rgb(0, 0, 255),\n })\n})\n```"],"group":["Events"]}}}],"onAdd":[{"kind":"MethodSignature","id":0,"name":"onAdd","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"tags":{"group":["Events"]}}},{"kind":"MethodSignature","id":0,"name":"onAdd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"tags":{"group":["Events"]}}}],"onDestroy":[{"kind":"MethodSignature","id":0,"name":"onDestroy","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"tags":{"group":["Events"]}}},{"kind":"MethodSignature","id":0,"name":"onDestroy","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"tags":{"group":["Events"]}}}],"onLoad":[{"kind":"MethodSignature","id":0,"name":"onLoad","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event that runs when all assets finished loading.","tags":{"since":["v2000.1"],"example":["```js\nconst bean = add([\n sprite(\"bean\"),\n])\n\n// certain assets related data are only available when the game finishes loading\nonLoad(() => {\n debug.log(bean.width)\n})\n```"],"group":["Events"]}}}],"onLoading":[{"kind":"MethodSignature","id":0,"name":"onLoading","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"progress","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event that runs every frame when assets are initially loading. Can be used to draw a custom loading screen.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onError":[{"kind":"MethodSignature","id":0,"name":"onError","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"err","type":{"kind":"TypeReference","id":0,"typeName":"Error"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register a custom error handler. Can be used to draw a custom error screen.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onResize":[{"kind":"MethodSignature","id":0,"name":"onResize","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event that runs when the canvas resizes.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onCleanup":[{"kind":"MethodSignature","id":0,"name":"onCleanup","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Cleanup function to run when quit() is called.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onGamepadConnect":[{"kind":"MethodSignature","id":0,"name":"onGamepadConnect","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"gamepad","type":{"kind":"TypeReference","id":0,"typeName":"KGamePad"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event that runs when a gamepad is connected.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"onGamepadDisconnect":[{"kind":"MethodSignature","id":0,"name":"onGamepadDisconnect","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"gamepad","type":{"kind":"TypeReference","id":0,"typeName":"KGamePad"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event that runs when a gamepad is disconnected.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"onCollide":[{"kind":"MethodSignature","id":0,"name":"onCollide","parameters":[{"kind":"Parameter","id":0,"name":"t1","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"t2","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs once when 2 game objs with certain tags collides (required to have area() component).","tags":{"since":["v2000.1"],"example":["```js\nonCollide(\"sun\", \"earth\", () => {\n addExplosion()\n})\n```"],"group":["Events"]}}}],"onCollideUpdate":[{"kind":"MethodSignature","id":0,"name":"onCollideUpdate","parameters":[{"kind":"Parameter","id":0,"name":"t1","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"t2","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when 2 game objs with certain tags collides (required to have area() component).","tags":{"since":["v3000.0"],"example":["```js\nonCollideUpdate(\"sun\", \"earth\", () => {\n runWorldEndTimer()\n})\n```"],"group":["Events"]}}}],"onCollideEnd":[{"kind":"MethodSignature","id":0,"name":"onCollideEnd","parameters":[{"kind":"Parameter","id":0,"name":"t1","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"t2","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},{"kind":"Parameter","id":0,"name":"col","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Collision"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs once frame when 2 game objs with certain tags stops colliding (required to have area() component).","tags":{"since":["v3000.0"],"example":["```js\nonCollideEnd(\"bean\", \"earth\", () => {\n worldEnd()\n})\n```"],"group":["Events"]}}}],"onClick":[{"kind":"MethodSignature","id":0,"name":"onClick","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when game objs with certain tags are clicked (required to have the area() component).","tags":{"since":["v2000.1"],"example":["```js\n// click on any \"chest\" to open\nonClick(\"chest\", (chest) => chest.open())\n```"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onClick","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when users clicks.","tags":{"example":["```js\n// click on anywhere to go to \"game\" scene\nonClick(() => go(\"game\"))\n```"],"since":["v2000.1"]}}}],"onHover":[{"kind":"MethodSignature","id":0,"name":"onHover","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs once when game objs with certain tags are hovered (required to have area() component).","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onHoverUpdate":[{"kind":"MethodSignature","id":0,"name":"onHoverUpdate","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"onHover","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when game objs with certain tags are hovered (required to have area() component).","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onHoverEnd":[{"kind":"MethodSignature","id":0,"name":"onHoverEnd","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs once when game objs with certain tags are unhovered (required to have area() component).","tags":{"since":["v3000.0"],"group":["Events"]}}}],"onKeyDown":[{"kind":"MethodSignature","id":0,"name":"onKeyDown","parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when a key is held down.","tags":{"example":["```js\n// move left by SPEED pixels per frame every frame when left arrow key is being held down\nonKeyDown(\"left\", () => {\n bean.move(-SPEED, 0)\n})\n```"],"since":["v2000.1"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onKeyDown","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when any key is held down.","tags":{"since":["v2000.1"],"group":["Input"]}}}],"onKeyPress":[{"kind":"MethodSignature","id":0,"name":"onKeyPress","parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user presses certain keys.","tags":{"example":["```js\n// .jump() once when \"space\" is just being pressed\nonKeyPress(\"space\", () => {\n bean.jump()\n});\n\nonKeyPress([\"up\", \"space\"], () => {\n bean.jump()\n});\n```"],"since":["v2000.1"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onKeyPress","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user presses any key.","tags":{"example":["```js\n// Call restart() when player presses any key\nonKeyPress((key) => {\n debug.log(`key pressed ${key}`)\n restart()\n})\n```"],"since":["v3001.0"],"group":["Input"]}}}],"onKeyPressRepeat":[{"kind":"MethodSignature","id":0,"name":"onKeyPressRepeat","parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user presses certain kesy (also fires repeatedly when the keys are being held down).","tags":{"example":["```js\n// delete last character when \"backspace\" is being pressed and held\nonKeyPressRepeat(\"backspace\", () => {\n input.text = input.text.substring(0, input.text.length - 1)\n})\n```"],"since":["v3000.1"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onKeyPressRepeat","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onKeyRelease":[{"kind":"MethodSignature","id":0,"name":"onKeyRelease","parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user release certain keys.","tags":{"since":["v2000.1"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onKeyRelease","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"Key"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onCharInput":[{"kind":"MethodSignature","id":0,"name":"onCharInput","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"ch","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user inputs text.","tags":{"since":["v2000.1"],"example":["```js\n// type into input\nonCharInput((ch) => {\n input.text += ch\n})\n```"],"group":["Input"]}}}],"onMouseDown":[{"kind":"MethodSignature","id":0,"name":"onMouseDown","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when certain mouse buttons are being held down.","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onMouseDown","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onMousePress":[{"kind":"MethodSignature","id":0,"name":"onMousePress","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user clicks mouse.","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onMousePress","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onMouseRelease":[{"kind":"MethodSignature","id":0,"name":"onMouseRelease","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user releases mouse.","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onMouseRelease","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"m","type":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onMouseMove":[{"kind":"MethodSignature","id":0,"name":"onMouseMove","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"delta","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs whenever user move the mouse.","tags":{"since":["v2000.1"],"group":["Input"]}}}],"onTouchStart":[{"kind":"MethodSignature","id":0,"name":"onTouchStart","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"TypeReference","id":0,"typeName":"Touch"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when a touch starts.","tags":{"since":["v2000.1"],"group":["Input"]}}}],"onTouchMove":[{"kind":"MethodSignature","id":0,"name":"onTouchMove","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"TypeReference","id":0,"typeName":"Touch"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs whenever touch moves.","tags":{"since":["v2000.1"],"group":["Input"]}}}],"onTouchEnd":[{"kind":"MethodSignature","id":0,"name":"onTouchEnd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"TypeReference","id":0,"typeName":"Touch"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when a touch ends.","tags":{"since":["v2000.1"],"group":["Input"]}}}],"onScroll":[{"kind":"MethodSignature","id":0,"name":"onScroll","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"delta","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when mouse wheel scrolled.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"onHide":[{"kind":"MethodSignature","id":0,"name":"onHide","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when tab is hidden.","tags":{"since":["v3001.0"],"group":["Events"]}}}],"onShow":[{"kind":"MethodSignature","id":0,"name":"onShow","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when tab is shown.","tags":{"since":["v3001.0"],"group":["Events"]}}}],"onGamepadButtonDown":[{"kind":"MethodSignature","id":0,"name":"onGamepadButtonDown","parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when certain gamepad buttons are held down.","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onGamepadButtonDown","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame when any gamepad buttons are held down.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"onGamepadButtonPress":[{"kind":"MethodSignature","id":0,"name":"onGamepadButtonPress","parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user presses certain gamepad button.","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onGamepadButtonPress","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user presses any gamepad button.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"onGamepadButtonRelease":[{"kind":"MethodSignature","id":0,"name":"onGamepadButtonRelease","parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user releases certain gamepad button","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onGamepadButtonRelease","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user releases any gamepad button.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"onGamepadStick":[{"kind":"MethodSignature","id":0,"name":"onGamepadStick","parameters":[{"kind":"Parameter","id":0,"name":"stick","type":{"kind":"TypeReference","id":0,"typeName":"GamepadStick"}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"value","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the gamepad axis exists.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"onButtonPress":[{"kind":"MethodSignature","id":0,"name":"onButtonPress","parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"TButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"TButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user press a defined button\n(like \"jump\") on any input (keyboard, gamepad).","tags":{"since":["v3001.0"],"group":["Input"]}}}],"onButtonRelease":[{"kind":"MethodSignature","id":0,"name":"onButtonRelease","parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"TButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"TButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user release a defined button\n(like \"jump\") on any input (keyboard, gamepad).","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onButtonRelease","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"TButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onButtonDown":[{"kind":"MethodSignature","id":0,"name":"onButtonDown","parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"TButton"}}]}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"TButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when user press a defined button\n(like \"jump\") on any input (keyboard, gamepad).","tags":{"since":["v3001.0"],"group":["Input"]}}},{"kind":"MethodSignature","id":0,"name":"onButtonDown","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"btn","type":{"kind":"TypeReference","id":0,"typeName":"TButton"}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onSceneLeave":[{"kind":"MethodSignature","id":0,"name":"onSceneLeave","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"newScene","questionToken":true,"type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when current scene ends.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"getSceneName":[{"kind":"MethodSignature","id":0,"name":"getSceneName","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Gets the name of the current scene. Returns null if no scene is active.","tags":{"since":["v3001.0"],"group":["Scene"]}}}],"loadRoot":[{"kind":"MethodSignature","id":0,"name":"loadRoot","parameters":[{"kind":"Parameter","id":0,"name":"path","questionToken":true,"type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"Sets the root for all subsequent resource urls.","tags":{"example":["```js\nloadRoot(\"https://myassets.com/\")\nloadSprite(\"bean\", \"sprites/bean.png\") // will resolve to \"https://myassets.com/sprites/bean.png\"\n```"],"group":["Assets"]}}}],"loadSprite":[{"kind":"MethodSignature","id":0,"name":"loadSprite","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"src","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"LoadSpriteSrc"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteSrc"}}]}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]},"jsDoc":{"doc":"Load a sprite into asset manager, with name and resource url and optional config.","tags":{"example":["```js\n// due to browser policies you'll need a static file server to load local files\nloadSprite(\"bean\", \"bean.png\")\nloadSprite(\"apple\", \"https://kaboomjs.com/sprites/apple.png\")\n\n// slice a spritesheet and add anims manually\nloadSprite(\"bean\", \"bean.png\", {\n sliceX: 4,\n sliceY: 1,\n anims: {\n run: {\n from: 0,\n to: 3,\n },\n jump: {\n from: 3,\n to: 3,\n },\n },\n})\n```"],"group":["Assets"]}}}],"loadSpriteAtlas":[{"kind":"MethodSignature","id":0,"name":"loadSpriteAtlas","parameters":[{"kind":"Parameter","id":0,"name":"src","type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteSrc"}},{"kind":"Parameter","id":0,"name":"data","type":{"kind":"TypeReference","id":0,"typeName":"SpriteAtlasData"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}]},"jsDoc":{"doc":"Load sprites from a sprite atlas.","tags":{"example":["```js\n// See #SpriteAtlasData type for format spec\nloadSpriteAtlas(\"sprites/dungeon.png\", {\n \"hero\": {\n x: 128,\n y: 68,\n width: 144,\n height: 28,\n sliceX: 9,\n anims: {\n idle: { from: 0, to: 3 },\n run: { from: 4, to: 7 },\n hit: 8,\n },\n },\n})\n\nconst player = add([\n sprite(\"hero\"),\n])\n\nplayer.play(\"run\")\n```"],"group":["Assets"]}}},{"kind":"MethodSignature","id":0,"name":"loadSpriteAtlas","parameters":[{"kind":"Parameter","id":0,"name":"src","type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteSrc"}},{"kind":"Parameter","id":0,"name":"url","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}]},"jsDoc":{"doc":"Load sprites from a sprite atlas with URL.","tags":{"example":["```js\n// Load from json file, see #SpriteAtlasData type for format spec\nloadSpriteAtlas(\"sprites/dungeon.png\", \"sprites/dungeon.json\")\n\nconst player = add([\n sprite(\"hero\"),\n])\n\nplayer.play(\"run\")\n```"],"group":["Assets"]}}}],"loadAseprite":[{"kind":"MethodSignature","id":0,"name":"loadAseprite","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"imgSrc","type":{"kind":"TypeReference","id":0,"typeName":"LoadSpriteSrc"}},{"kind":"Parameter","id":0,"name":"jsonSrc","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"AsepriteData"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]},"jsDoc":{"doc":"Load a sprite with aseprite spritesheet json (should use \"array\" in the export options).","tags":{"example":["```js\nloadAseprite(\"car\", \"sprites/car.png\", \"sprites/car.json\")\n```"],"group":["Assets"]}}}],"loadPedit":[{"kind":"MethodSignature","id":0,"name":"loadPedit","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"src","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]},"jsDoc":{"tags":{"group":["Assets"]}}}],"loadBean":[{"kind":"MethodSignature","id":0,"name":"loadBean","parameters":[{"kind":"Parameter","id":0,"name":"name","questionToken":true,"type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]},"jsDoc":{"doc":"Load default sprite \"bean\".","tags":{"example":["```js\nloadBean()\n\n// use it right away\nadd([\n sprite(\"bean\"),\n])\n```"],"group":["Assets"]}}}],"loadJSON":[{"kind":"MethodSignature","id":0,"name":"loadJSON","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"url","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"AnyKeyword","id":0}]},"jsDoc":{"doc":"Load custom JSON data from url.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"loadSound":[{"kind":"MethodSignature","id":0,"name":"loadSound","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"src","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"ArrayBuffer"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]},"jsDoc":{"doc":"Load a sound into asset manager, with name and resource url.","tags":{"example":["```js\nloadSound(\"shoot\", \"/sounds/horse.ogg\")\nloadSound(\"shoot\", \"/sounds/squeeze.mp3\")\nloadSound(\"shoot\", \"/sounds/shoot.wav\")\n```"],"group":["Assets"]}}}],"loadMusic":[{"kind":"MethodSignature","id":0,"name":"loadMusic","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"url","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Like loadSound(), but the audio is streamed and won't block loading. Use this for big audio files like background music.","tags":{"example":["```js\nloadMusic(\"shoot\", \"/music/bossfight.mp3\")\n```"],"group":["Assets"]}}}],"loadFont":[{"kind":"MethodSignature","id":0,"name":"loadFont","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"src","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"BinaryData"}]}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LoadFontOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"FontData"}]},"jsDoc":{"doc":"Load a font (any format supported by the browser, e.g. ttf, otf, woff).","tags":{"since":["v3000.0"],"example":["```js\n// load a font from a .ttf file\nloadFont(\"frogblock\", \"fonts/frogblock.ttf\")\n```"],"group":["Assets"]}}}],"loadBitmapFont":[{"kind":"MethodSignature","id":0,"name":"loadBitmapFont","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"src","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"gridWidth","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"gridHeight","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"LoadBitmapFontOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"BitmapFontData"}]},"jsDoc":{"doc":"Load a bitmap font into asset manager, with name and resource url and infomation on the layout of the bitmap.","tags":{"since":["v3000.0"],"example":["```js\n// load a bitmap font called \"04b03\", with bitmap \"fonts/04b03.png\"\n// each character on bitmap has a size of (6, 8), and contains default ASCII_CHARS\nloadBitmapFont(\"04b03\", \"fonts/04b03.png\", 6, 8)\n\n// load a font with custom characters\nloadBitmapFont(\"myfont\", \"myfont.png\", 6, 8, { chars: \"☺☻♥♦♣♠\" })\n```"],"group":["Assets"]}}}],"loadShader":[{"kind":"MethodSignature","id":0,"name":"loadShader","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"vert","questionToken":true,"type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"frag","questionToken":true,"type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"ShaderData"}]},"jsDoc":{"doc":"Load a shader with vertex and fragment code.","tags":{"example":["```js\n// default shaders and custom shader format\nloadShader(\"outline\",\n`vec4 vert(vec2 pos, vec2 uv, vec4 color) {\n // predefined functions to get the default value by KAPLAY\n return def_vert();\n}`,\n`vec4 frag(vec2 pos, vec2 uv, vec4 color, sampler2D tex) {\n // turn everything blue-ish\n return def_frag() * vec4(0, 0, 1, 1);\n}`, false)\n```"],"group":["Assets"]}}}],"loadShaderURL":[{"kind":"MethodSignature","id":0,"name":"loadShaderURL","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"Parameter","id":0,"name":"vert","questionToken":true,"type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"frag","questionToken":true,"type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"ShaderData"}]},"jsDoc":{"doc":"Load a shader with vertex and fragment code file url.","tags":{"since":["v3000.0"],"example":["```js\n// load only a fragment shader from URL\nloadShader(\"outline\", null, \"/shaders/outline.glsl\", true)\n```"],"group":["Assets"]}}}],"load":[{"kind":"MethodSignature","id":0,"name":"load","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"l","type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},"jsDoc":{"doc":"Add a new loader to wait for before starting the game.","tags":{"example":["```js\nload(new Promise((resolve, reject) => {\n // anything you want to do that stalls the game in loading state\n resolve(\"ok\")\n}))\n```"],"group":["Assets"]}}}],"loadProgress":[{"kind":"MethodSignature","id":0,"name":"loadProgress","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the global asset loading progress (0.0 - 1.0).","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"getSprite":[{"kind":"MethodSignature","id":0,"name":"getSprite","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get SpriteData from name.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"getSound":[{"kind":"MethodSignature","id":0,"name":"getSound","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get SoundData from name.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"getFont":[{"kind":"MethodSignature","id":0,"name":"getFont","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"FontData"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get FontData from name.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"getBitmapFont":[{"kind":"MethodSignature","id":0,"name":"getBitmapFont","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"BitmapFontData"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get BitmapFontData from name.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"getShader":[{"kind":"MethodSignature","id":0,"name":"getShader","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"ShaderData"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get ShaderData from name.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"getAsset":[{"kind":"MethodSignature","id":0,"name":"getAsset","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"AnyKeyword","id":0}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get custom data from name.","tags":{"since":["v3000.0"],"group":["Assets"]}}}],"Asset":[{"kind":"PropertySignature","id":0,"name":"Asset","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Asset"}},"jsDoc":{"doc":"The asset data.","tags":{"group":["Assets"]}}}],"SpriteData":[{"kind":"PropertySignature","id":0,"name":"SpriteData","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"SpriteData"}},"jsDoc":{"doc":"The sprite data.","tags":{"group":["Assets"]}}}],"SoundData":[{"kind":"PropertySignature","id":0,"name":"SoundData","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"SoundData"}},"jsDoc":{"tags":{"group":["Assets"]}}}],"width":[{"kind":"MethodSignature","id":0,"name":"width","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the width of game.","tags":{"group":["Info"]}}}],"getTreeRoot":[{"kind":"MethodSignature","id":0,"name":"getTreeRoot","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj"},"jsDoc":{"doc":"Get the root of all objects.","tags":{"group":["Info"]}}}],"height":[{"kind":"MethodSignature","id":0,"name":"height","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the height of game.","tags":{"group":["Info"]}}}],"center":[{"kind":"MethodSignature","id":0,"name":"center","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the center point of view.","tags":{"example":["```js\n// add bean to the center of the screen\nadd([\n sprite(\"bean\"),\n pos(center()),\n // ...\n])\n```"],"group":["Info"]}}}],"dt":[{"kind":"MethodSignature","id":0,"name":"dt","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the delta time since last frame.","tags":{"example":["```js\n// rotate bean 100 deg per second\nbean.onUpdate(() => {\n bean.angle += 100 * dt()\n})\n```"],"group":["Info"]}}}],"fixedDt":[{"kind":"MethodSignature","id":0,"name":"fixedDt","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the fixed delta time since last frame.","tags":{"group":["Info"]}}}],"restDt":[{"kind":"MethodSignature","id":0,"name":"restDt","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the rest delta time since last frame.","tags":{"group":["Info"]}}}],"time":[{"kind":"MethodSignature","id":0,"name":"time","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get the total time since beginning.","tags":{"since":["v3001"],"group":["Info"]}}}],"isFocused":[{"kind":"MethodSignature","id":0,"name":"isFocused","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the game canvas is currently focused.","tags":{"since":["v2000.1"],"group":["Info"]}}}],"isTouchscreen":[{"kind":"MethodSignature","id":0,"name":"isTouchscreen","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Is currently on a touch screen device.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"mousePos":[{"kind":"MethodSignature","id":0,"name":"mousePos","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get current mouse position (without camera transform).","tags":{"group":["Input"]}}}],"mouseDeltaPos":[{"kind":"MethodSignature","id":0,"name":"mouseDeltaPos","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"How much mouse moved last frame.","tags":{"group":["Input"]}}}],"isKeyDown":[{"kind":"MethodSignature","id":0,"name":"isKeyDown","parameters":[{"kind":"Parameter","id":0,"name":"k","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain keys are currently down.","tags":{"example":["```js\n// equivalent to the calling bean.move() in an onKeyDown(\"left\")\nonUpdate(() => {\n if (isKeyDown(\"left\")) {\n bean.move(-SPEED, 0)\n }\n})\n```"],"since":["v3001.0"],"group":["Input"]}}}],"isKeyPressed":[{"kind":"MethodSignature","id":0,"name":"isKeyPressed","parameters":[{"kind":"Parameter","id":0,"name":"k","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain keys are just pressed last frame.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isKeyPressedRepeat":[{"kind":"MethodSignature","id":0,"name":"isKeyPressedRepeat","parameters":[{"kind":"Parameter","id":0,"name":"k","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain keys are just pressed last frame (also fires repeatedly when the keys are being held down).","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isKeyReleased":[{"kind":"MethodSignature","id":0,"name":"isKeyReleased","parameters":[{"kind":"Parameter","id":0,"name":"k","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain keys are just released last frame.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isMouseDown":[{"kind":"MethodSignature","id":0,"name":"isMouseDown","parameters":[{"kind":"Parameter","id":0,"name":"button","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If mouse buttons are currently down.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isMousePressed":[{"kind":"MethodSignature","id":0,"name":"isMousePressed","parameters":[{"kind":"Parameter","id":0,"name":"button","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If mouse buttons are just clicked last frame.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isMouseReleased":[{"kind":"MethodSignature","id":0,"name":"isMouseReleased","parameters":[{"kind":"Parameter","id":0,"name":"button","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If mouse buttons are just released last frame.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isMouseMoved":[{"kind":"MethodSignature","id":0,"name":"isMouseMoved","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If mouse moved last frame.","tags":{"since":["v2000.1"],"group":["Input"]}}}],"isGamepadButtonPressed":[{"kind":"MethodSignature","id":0,"name":"isGamepadButtonPressed","parameters":[{"kind":"Parameter","id":0,"name":"btn","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain gamepad buttons are just pressed last frame","tags":{"since":["v3000.0"],"group":["Input"]}}}],"isGamepadButtonDown":[{"kind":"MethodSignature","id":0,"name":"isGamepadButtonDown","parameters":[{"kind":"Parameter","id":0,"name":"btn","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain gamepad buttons are currently held down.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"isGamepadButtonReleased":[{"kind":"MethodSignature","id":0,"name":"isGamepadButtonReleased","parameters":[{"kind":"Parameter","id":0,"name":"btn","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain gamepad buttons are just released last frame.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"isButtonPressed":[{"kind":"MethodSignature","id":0,"name":"isButtonPressed","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"TButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain binded buttons are just pressed last frame on any input (keyboard, gamepad).","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isButtonDown":[{"kind":"MethodSignature","id":0,"name":"isButtonDown","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"TButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain binded buttons are currently held down on any input (keyboard, gamepad).","tags":{"since":["v3001.0"],"group":["Input"]}}}],"isButtonReleased":[{"kind":"MethodSignature","id":0,"name":"isButtonReleased","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"TButton"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain binded buttons are just released last frame on any input (keyboard, gamepad).","tags":{"since":["v3001.0"],"group":["Input"]}}}],"getButton":[{"kind":"MethodSignature","id":0,"name":"getButton","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"TButtonDef"}}}],"type":{"kind":"TypeReference","id":0,"typeName":"ButtonBinding"},"jsDoc":{"doc":"Get a input binding from a button name.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"setButton":[{"kind":"MethodSignature","id":0,"name":"setButton","parameters":[{"kind":"Parameter","id":0,"name":"button","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"def","type":{"kind":"TypeReference","id":0,"typeName":"ButtonBinding"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set a input binding for a button name.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"getGamepadStick":[{"kind":"MethodSignature","id":0,"name":"getGamepadStick","parameters":[{"kind":"Parameter","id":0,"name":"stick","type":{"kind":"TypeReference","id":0,"typeName":"GamepadStick"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get stick axis values from a gamepad.","tags":{"since":["v3001.0"],"group":["Input"]}}}],"getLastInputDeviceType":[{"kind":"MethodSignature","id":0,"name":"getLastInputDeviceType","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"ButtonBindingDevice"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get the latest input device type that triggered the input event.","tags":{"returns":["The last input device type, or null if no input event has been triggered."],"since":["v3001.0"]}}}],"charInputted":[{"kind":"MethodSignature","id":0,"name":"charInputted","parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},"jsDoc":{"doc":"List of characters inputted since last frame.","tags":{"since":["v3000.0"],"group":["Input"]}}}],"shake":[{"kind":"MethodSignature","id":0,"name":"shake","parameters":[{"kind":"Parameter","id":0,"name":"intensity","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Camera shake.","tags":{"example":["```js\n// shake intensively when bean collides with a \"bomb\"\nbean.onCollide(\"bomb\", () => {\n shake(120)\n})\n```"],"group":["Info"]}}}],"camPos":[{"kind":"MethodSignature","id":0,"name":"camPos","parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get / set camera position.","tags":{"example":["```js\n// camera follows player\nplayer.onUpdate(() => {\n camPos(player.pos)\n})\n```"],"group":["Info"]}}},{"kind":"MethodSignature","id":0,"name":"camPos","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"MethodSignature","id":0,"name":"camPos","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"camScale":[{"kind":"MethodSignature","id":0,"name":"camScale","parameters":[{"kind":"Parameter","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get / set camera scale.","tags":{"group":["Info"]}}},{"kind":"MethodSignature","id":0,"name":"camScale","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"MethodSignature","id":0,"name":"camScale","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"camRot":[{"kind":"MethodSignature","id":0,"name":"camRot","parameters":[{"kind":"Parameter","id":0,"name":"angle","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get / set camera rotation.","tags":{"group":["Info"]}}}],"camFlash":[{"kind":"MethodSignature","id":0,"name":"camFlash","parameters":[{"kind":"Parameter","id":0,"name":"flashColor","type":{"kind":"TypeReference","id":0,"typeName":"Color"}},{"kind":"Parameter","id":0,"name":"fadeOutTime","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"TimerController"},"jsDoc":{"doc":"Flash the camera.","tags":{"group":["Info"]}}}],"camTransform":[{"kind":"MethodSignature","id":0,"name":"camTransform","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"},"jsDoc":{"doc":"Get camera transform.","tags":{"group":["Info"]}}}],"toScreen":[{"kind":"MethodSignature","id":0,"name":"toScreen","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a point from world position (relative to the root) to screen position (relative to the screen).","tags":{"since":["v3001.0"],"group":["Info"]}}}],"toWorld":[{"kind":"MethodSignature","id":0,"name":"toWorld","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Transform a point from screen position (relative to the screen) to world position (relative to the root).","tags":{"group":["Info"]}}}],"setGravity":[{"kind":"MethodSignature","id":0,"name":"setGravity","parameters":[{"kind":"Parameter","id":0,"name":"g","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set gravity.","tags":{"group":["Info"]}}}],"getGravity":[{"kind":"MethodSignature","id":0,"name":"getGravity","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get gravity.","tags":{"group":["Info"]}}}],"setGravityDirection":[{"kind":"MethodSignature","id":0,"name":"setGravityDirection","parameters":[{"kind":"Parameter","id":0,"name":"d","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set gravity direction.","tags":{}}}],"getGravityDirection":[{"kind":"MethodSignature","id":0,"name":"getGravityDirection","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get gravity direction.","tags":{}}}],"setBackground":[{"kind":"MethodSignature","id":0,"name":"setBackground","parameters":[{"kind":"Parameter","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set background color.","tags":{"group":["Info"]}}},{"kind":"MethodSignature","id":0,"name":"setBackground","parameters":[{"kind":"Parameter","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"}},{"kind":"Parameter","id":0,"name":"alpha","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}},{"kind":"MethodSignature","id":0,"name":"setBackground","parameters":[{"kind":"Parameter","id":0,"name":"r","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"g","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}},{"kind":"MethodSignature","id":0,"name":"setBackground","parameters":[{"kind":"Parameter","id":0,"name":"r","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"g","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"alpha","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}],"getBackground":[{"kind":"MethodSignature","id":0,"name":"getBackground","parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get background color.","tags":{"group":["Info"]}}}],"getGamepads":[{"kind":"MethodSignature","id":0,"name":"getGamepads","parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamePad"}},"jsDoc":{"doc":"Get connected gamepads.","tags":{"since":["v3000.0"],"group":["Info"]}}}],"setCursor":[{"kind":"MethodSignature","id":0,"name":"setCursor","parameters":[{"kind":"Parameter","id":0,"name":"style","type":{"kind":"TypeReference","id":0,"typeName":"Cursor"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set cursor style (check Cursor type for possible values). Cursor will be reset to \"default\" every frame so use this in an per-frame action.","tags":{"since":["v3000.0"],"example":["```js\nbutton.onHover((c) => {\n setCursor(\"pointer\")\n})\n```"],"group":["Info"]}}}],"getCursor":[{"kind":"MethodSignature","id":0,"name":"getCursor","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Cursor"},"jsDoc":{"doc":"Get current cursor style.","tags":{"since":["v3000.0"],"group":["Info"]}}}],"setCursorLocked":[{"kind":"MethodSignature","id":0,"name":"setCursorLocked","parameters":[{"kind":"Parameter","id":0,"name":"locked","type":{"kind":"BooleanKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Lock / unlock cursor. Note that you cannot lock cursor within 1 second after user unlocking the cursor with the default unlock gesture (typically the esc key) due to browser policy.","tags":{"since":["v3000.0"],"group":["Info"]}}}],"isCursorLocked":[{"kind":"MethodSignature","id":0,"name":"isCursorLocked","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Get if cursor is currently locked.","tags":{"since":["v3000.0"],"group":["Info"]}}}],"setFullscreen":[{"kind":"MethodSignature","id":0,"name":"setFullscreen","parameters":[{"kind":"Parameter","id":0,"name":"f","questionToken":true,"type":{"kind":"BooleanKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Enter / exit fullscreen mode. (note: mouse position is not working in fullscreen mode at the moment)","tags":{"example":["```js\n// toggle fullscreen mode on \"f\"\nonKeyPress(\"f\", (c) => {\n setFullscreen(!isFullscreen())\n})\n```"],"group":["Info"]}}}],"isFullscreen":[{"kind":"MethodSignature","id":0,"name":"isFullscreen","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If currently in fullscreen mode.","tags":{"group":["Info"]}}}],"wait":[{"kind":"MethodSignature","id":0,"name":"wait","parameters":[{"kind":"Parameter","id":0,"name":"n","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","questionToken":true,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"TimerController"},"jsDoc":{"doc":"Run the callback after n seconds.","tags":{"example":["```js\n// 3 seconds until explosion! Runnn!\nwait(3, () => {\n explode()\n})\n\n// wait() returns a PromiseLike that can be used with await\nawait wait(1)\n```"],"group":["Timer"]}}}],"loop":[{"kind":"MethodSignature","id":0,"name":"loop","parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Run the callback every n seconds.","tags":{"example":["```js\n// spawn a butterfly at random position every 1 second\nloop(1, () => {\n add([\n sprite(\"butterfly\"),\n pos(rand(vec2(width(), height()))),\n area(),\n \"friend\",\n ])\n})\n```"],"group":["Timer"]}}}],"play":[{"kind":"MethodSignature","id":0,"name":"play","parameters":[{"kind":"Parameter","id":0,"name":"src","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"SoundData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]},{"kind":"TypeReference","id":0,"typeName":"MusicData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"MusicData"}]}]}},{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"AudioPlayOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"AudioPlay"},"jsDoc":{"doc":"Play a piece of audio.","tags":{"returns":["A control handle."],"example":["```js\n// play a one off sound\nplay(\"wooosh\")\n\n// play a looping soundtrack (check out AudioPlayOpt for more options)\nconst music = play(\"OverworldlyFoe\", {\n volume: 0.8,\n loop: true\n})\n\n// using the handle to control (check out AudioPlay for more controls / info)\nmusic.paused = true\nmusic.speed = 1.2\n```"],"group":["Audio"]}}}],"burp":[{"kind":"MethodSignature","id":0,"name":"burp","parameters":[{"kind":"Parameter","id":0,"name":"options","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"AudioPlayOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"AudioPlay"},"jsDoc":{"doc":"Yep. Plays a burp sound.","tags":{"group":["Audio"]}}}],"volume":[{"kind":"MethodSignature","id":0,"name":"volume","parameters":[{"kind":"Parameter","id":0,"name":"v","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Sets global volume.","tags":{"example":["```js\n// makes everything quieter\nvolume(0.5)\n```"],"group":["Audio"]}}}],"audioCtx":[{"kind":"PropertySignature","id":0,"name":"audioCtx","type":{"kind":"TypeReference","id":0,"typeName":"AudioContext"},"jsDoc":{"doc":"Get the underlying browser AudioContext.","tags":{"group":["Audio"]}}}],"rand":[{"kind":"MethodSignature","id":0,"name":"rand","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get a random number between 0 - 1.","tags":{"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"rand","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","default":{"kind":"TypeReference","id":0,"typeName":"RNGValue"}}],"parameters":[{"kind":"Parameter","id":0,"name":"n","type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"TypeReference","id":0,"typeName":"T"},"jsDoc":{"doc":"Get a random value between 0 and the given value.","tags":{"example":["```js\n// a random number between 0 - 8\nrand(8)\n\n// a random point on screen\nrand(vec2(width(), height()))\n\n// a random color\nrand(rgb(255, 255, 255))\n```"],"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"rand","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","default":{"kind":"TypeReference","id":0,"typeName":"RNGValue"}}],"parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"TypeReference","id":0,"typeName":"T"}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"TypeReference","id":0,"typeName":"T"},"jsDoc":{"doc":"Get a random value between the given bound.","tags":{"example":["```js\nrand(50, 100)\nrand(vec2(20), vec2(100))\n\n// spawn something on the right side of the screen but with random y value within screen height\nadd([\n pos(width(), rand(0, height())),\n])\n```"],"group":["Math"]}}}],"randi":[{"kind":"MethodSignature","id":0,"name":"randi","parameters":[{"kind":"Parameter","id":0,"name":"n","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"rand() but floored to integer.","tags":{"example":["```js\nrandi(10) // returns 0 to 9\n```"],"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"randi","parameters":[{"kind":"Parameter","id":0,"name":"a","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"rand() but floored to integer.","tags":{"example":["```js\nrandi(0, 3) // returns 0, 1, or 2\n```"],"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"randi","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"rand() but floored to integer.","tags":{"example":["```js\nrandi() // returns either 0 or 1\n```"],"group":["Math"]}}}],"randSeed":[{"kind":"MethodSignature","id":0,"name":"randSeed","parameters":[{"kind":"Parameter","id":0,"name":"seed","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get / set the random number generator seed.","tags":{"example":["```js\nrandSeed(Date.now())\n```"],"group":["Math"]}}}],"vec2":[{"kind":"MethodSignature","id":0,"name":"vec2","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Create a 2d vector.","tags":{"example":["```js\n// { x: 0, y: 0 }\nvec2()\n\n// { x: 10, y: 10 }\nvec2(10)\n\n// { x: 100, y: 80 }\nvec2(100, 80)\n\n// move to 150 degrees direction with by length 10\nplayer.pos = pos.add(Vec2.fromAngle(150).scale(10))\n```"],"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"vec2","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"MethodSignature","id":0,"name":"vec2","parameters":[{"kind":"Parameter","id":0,"name":"xy","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"MethodSignature","id":0,"name":"vec2","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"rgb":[{"kind":"MethodSignature","id":0,"name":"rgb","parameters":[{"kind":"Parameter","id":0,"name":"r","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"g","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"b","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Create a color from RGB values (0 - 255).","tags":{"example":["```js\n// update the color of the sky to light blue\nsky.color = rgb(0, 128, 255)\n```"],"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"rgb","parameters":[{"kind":"Parameter","id":0,"name":"hex","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Create a color from hex string.","tags":{"since":["v3001.0"],"example":["```js\nsky.color = rgb(\"#ef6360\")"],"group":["Math"]}}},{"kind":"MethodSignature","id":0,"name":"rgb","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Same as rgb(255, 255, 255).","tags":{"group":["Math"]}}}],"hsl2rgb":[{"kind":"MethodSignature","id":0,"name":"hsl2rgb","parameters":[{"kind":"Parameter","id":0,"name":"hue","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"saturation","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"lightness","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Convert HSL color (all values in 0.0 - 1.0 range) to RGB color.","tags":{"since":["v2000.1"],"example":["```js\n// animate rainbow color\nonUpdate(\"rainbow\", (obj) => {\n obj.color = hsl2rgb(wave(0, 1, time()), 0.6, 0.6)\n})\n```"],"group":["Math"]}}}],"quad":[{"kind":"MethodSignature","id":0,"name":"quad","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Quad"},"jsDoc":{"doc":"Rectangle area (0.0 - 1.0).","tags":{"group":["Math"]}}}],"choose":[{"kind":"MethodSignature","id":0,"name":"choose","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"lst","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}}}],"type":{"kind":"TypeReference","id":0,"typeName":"T"},"jsDoc":{"doc":"Choose a random item from a list.","tags":{"example":["```js\n// decide the best fruit randomly\nconst bestFruit = choose([\"apple\", \"banana\", \"pear\", \"watermelon\"])\n```"],"group":["Math"]}}}],"chooseMultiple":[{"kind":"MethodSignature","id":0,"name":"chooseMultiple","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"lst","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}}},{"kind":"Parameter","id":0,"name":"count","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}},"jsDoc":{"doc":"Choose multiple random items from a list.","tags":{"since":["v3001.0"],"group":["Math"]}}}],"shuffle":[{"kind":"MethodSignature","id":0,"name":"shuffle","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"lst","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"T"}},"jsDoc":{"doc":"Shuffle an array.","tags":{"since":["v3001.0"],"group":["Math"]}}}],"chance":[{"kind":"MethodSignature","id":0,"name":"chance","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"rand(1) <= p","tags":{"example":["```js\n// every frame all objs with tag \"unlucky\" have 50% chance die\nonUpdate(\"unlucky\", (o) => {\n if (chance(0.5)) {\n destroy(o)\n }\n})\n```"],"group":["Math"]}}}],"lerp":[{"kind":"MethodSignature","id":0,"name":"lerp","typeParameters":[{"kind":"TypeParameter","id":0,"name":"V","constraint":{"kind":"TypeReference","id":0,"typeName":"LerpValue"}}],"parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"TypeReference","id":0,"typeName":"V"}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"TypeReference","id":0,"typeName":"V"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"V"},"jsDoc":{"doc":"Linear interpolation.","tags":{"group":["Math"]}}}],"tween":[{"kind":"MethodSignature","id":0,"name":"tween","typeParameters":[{"kind":"TypeParameter","id":0,"name":"V","constraint":{"kind":"TypeReference","id":0,"typeName":"LerpValue"}}],"parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"TypeReference","id":0,"typeName":"V"}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"TypeReference","id":0,"typeName":"V"}},{"kind":"Parameter","id":0,"name":"duration","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"setValue","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"value","type":{"kind":"TypeReference","id":0,"typeName":"V"}}],"type":{"kind":"VoidKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"easeFunc","questionToken":true,"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"TweenController"},"jsDoc":{"doc":"Tweeeeeeeening!","tags":{"since":["v3000.0"],"example":["```js\n// tween bean to mouse position\ntween(bean.pos, mousePos(), 1, (p) => bean.pos = p, easings.easeOutBounce)\n\n// tween() returns a then-able that can be used with await\nawait tween(bean.opacity, 1, 0.5, (val) => bean.opacity = val, easings.easeOutQuad)\n```"],"group":["Math"]}}}],"easings":[{"kind":"PropertySignature","id":0,"name":"easings","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"EaseFuncs"},{"kind":"TypeReference","id":0,"typeName":"EaseFunc"}]},"jsDoc":{"doc":"A collection of easing functions for tweening.","tags":{"since":["v3000.0"],"group":["Math"]}}}],"easingSteps":[{"kind":"MethodSignature","id":0,"name":"easingSteps","parameters":[{"kind":"Parameter","id":0,"name":"steps","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"position","type":{"kind":"TypeReference","id":0,"typeName":"StepPosition"}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}},"jsDoc":{"doc":"Steps easing. Eases in discontinious steps.","tags":{"since":["v3001.0"],"group":["Math"]}}}],"easingLinear":[{"kind":"MethodSignature","id":0,"name":"easingLinear","parameters":[{"kind":"Parameter","id":0,"name":"keys","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}},"jsDoc":{"doc":"Linear easing with keyframes","tags":{"since":["v3001.0"],"group":["Math"]}}}],"easingCubicBezier":[{"kind":"MethodSignature","id":0,"name":"easingCubicBezier","parameters":[{"kind":"Parameter","id":0,"name":"p1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"p2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}},"jsDoc":{"doc":"Bezier easing. Both control points need x to be within 0 and 1.","tags":{"since":["v3001.0"],"group":["Math"]}}}],"map":[{"kind":"MethodSignature","id":0,"name":"map","parameters":[{"kind":"Parameter","id":0,"name":"v","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"l1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"l2","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h2","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Map a value from one range to another range.","tags":{"group":["Math"]}}}],"mapc":[{"kind":"MethodSignature","id":0,"name":"mapc","parameters":[{"kind":"Parameter","id":0,"name":"v","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"l1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"l2","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h2","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Map a value from one range to another range, and clamp to the dest range.","tags":{"group":["Math"]}}}],"wave":[{"kind":"MethodSignature","id":0,"name":"wave","parameters":[{"kind":"Parameter","id":0,"name":"lo","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"hi","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"func","questionToken":true,"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Interpolate between 2 values (Optionally takes a custom periodic function, which default to Math.sin).","tags":{"example":["```js\n// bounce color between 2 values as time goes on\nonUpdate(\"colorful\", (c) => {\n c.color.r = wave(0, 255, time())\n c.color.g = wave(0, 255, time() + 1)\n c.color.b = wave(0, 255, time() + 2)\n})\n```"],"group":["Math"]}}}],"deg2rad":[{"kind":"MethodSignature","id":0,"name":"deg2rad","parameters":[{"kind":"Parameter","id":0,"name":"deg","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Convert degrees to radians.","tags":{"group":["Math"]}}}],"rad2deg":[{"kind":"MethodSignature","id":0,"name":"rad2deg","parameters":[{"kind":"Parameter","id":0,"name":"rad","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Convert radians to degrees.","tags":{"group":["Math"]}}}],"clamp":[{"kind":"MethodSignature","id":0,"name":"clamp","parameters":[{"kind":"Parameter","id":0,"name":"n","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"min","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"max","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Return a value clamped to an inclusive range of min and max.","tags":{"group":["Math"]}}}],"evaluateQuadratic":[{"kind":"MethodSignature","id":0,"name":"evaluateQuadratic","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the quadratic Bezier at the given t","tags":{"group":["Math"]}}}],"evaluateQuadraticFirstDerivative":[{"kind":"MethodSignature","id":0,"name":"evaluateQuadraticFirstDerivative","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the first derivative of a quadratic bezier at the given t","tags":{"since":["v3001.0"],"group":["Math"]}}}],"evaluateQuadraticSecondDerivative":[{"kind":"MethodSignature","id":0,"name":"evaluateQuadraticSecondDerivative","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the second derivative of a quadratic bezier at the given t","tags":{"since":["v3001.0"],"group":["Math"]}}}],"evaluateBezier":[{"kind":"MethodSignature","id":0,"name":"evaluateBezier","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the cubic Bezier at the given t","tags":{"since":["v3001.0"],"group":["Math"]}}}],"evaluateBezierFirstDerivative":[{"kind":"MethodSignature","id":0,"name":"evaluateBezierFirstDerivative","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the first derivative of a cubic Bezier at the given t","tags":{"group":["Math"]}}}],"evaluateBezierSecondDerivative":[{"kind":"MethodSignature","id":0,"name":"evaluateBezierSecondDerivative","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the second derivative of a cubic bezier at the given t","tags":{"since":["v3001.0"],"group":["Math"]}}}],"evaluateCatmullRom":[{"kind":"MethodSignature","id":0,"name":"evaluateCatmullRom","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the Catmull-Rom spline at the given t","tags":{"since":["v3001.0"],"group":["Math"]}}}],"evaluateCatmullRomFirstDerivative":[{"kind":"MethodSignature","id":0,"name":"evaluateCatmullRomFirstDerivative","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Evaluate the first derivative of a Catmull-Rom spline at the given t","tags":{"since":["v3001.0"],"group":["Math"]}}}],"curveLengthApproximation":[{"kind":"MethodSignature","id":0,"name":"curveLengthApproximation","parameters":[{"kind":"Parameter","id":0,"name":"curve","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}},{"kind":"Parameter","id":0,"name":"entries","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"detail","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"inverse","type":{"kind":"BooleanKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}},"jsDoc":{"doc":"Returns a function.\nentries is the amount of entries in the LUT.\ndetail is the sampling granularity of each segment recorded in the LUT.\nThis new function either returns the length for a given t, or t for a given length, depending on the inverse parameter.","tags":{"since":["v3001.0"],"group":["Math"]}}}],"normalizedCurve":[{"kind":"MethodSignature","id":0,"name":"normalizedCurve","parameters":[{"kind":"Parameter","id":0,"name":"curve","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"Returns a new curve which is normalized. This new curve has constant speed\ncurve is any curve in t (non-constant between 0 and 1)\nreturns a curve in s (constant between 0 and 1)","tags":{"since":["v3001.0"],"group":["Math"]}}}],"hermite":[{"kind":"MethodSignature","id":0,"name":"hermite","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"m1","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"m2","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}},"jsDoc":{"doc":"A second order function returning an evaluator for the given 1D Hermite curve","tags":{"param":["First point","First control point (tangent)","Second control point (tangent)","Second point"],"returns":["A function which gives the value on the 1D Hermite curve at t"]}}}],"cardinal":[{"kind":"MethodSignature","id":0,"name":"cardinal","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"m1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"m2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"tension","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"A second order function returning an evaluator for the given 2D Cardinal curve","tags":{"param":["Previous point","First point","Second point","Next point","The tension of the curve, [0..1] from round to tight."],"returns":["A function which gives the value on the 2D Cardinal curve at t"]}}}],"catmullRom":[{"kind":"MethodSignature","id":0,"name":"catmullRom","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"m1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"m2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"A second order function returning an evaluator for the given 2D Catmull-Rom curve","tags":{"param":["Previous point","First point","Second point","Next point"],"returns":["A function which gives the value on the 2D Catmull-Rom curve at t"]}}}],"bezier":[{"kind":"MethodSignature","id":0,"name":"bezier","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"A second order function returning an evaluator for the given 2D quadratic Bezier curve","tags":{"param":["First point","First control point","Second control point","Second point"],"returns":["A function which gives the value on the 2D quadratic Bezier curve at t"]}}}],"kochanekBartels":[{"kind":"MethodSignature","id":0,"name":"kochanekBartels","parameters":[{"kind":"Parameter","id":0,"name":"pt1","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt2","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt3","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"pt4","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"tension","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"continuity","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"bias","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"A second order function returning an evaluator for the given 2D Kochanek–Bartels curve","tags":{"param":["Previous point","First point","Second point","Next point","The tension of the curve, [-1..1] from round to tight.","The continuity of the curve, [-1..1] from box corners to inverted corners.","The bias of the curve, [-1..1] from pre-shoot to post-shoot."],"returns":["A function which gives the value on the 2D Kochanek–Bartels curve at t"]}}}],"testLinePoint":[{"kind":"MethodSignature","id":0,"name":"testLinePoint","parameters":[{"kind":"Parameter","id":0,"name":"l","type":{"kind":"TypeReference","id":0,"typeName":"Line"}},{"kind":"Parameter","id":0,"name":"pt","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if a line and a point intersect.","tags":{"group":["Math"]}}}],"testLineLine":[{"kind":"MethodSignature","id":0,"name":"testLineLine","parameters":[{"kind":"Parameter","id":0,"name":"l1","type":{"kind":"TypeReference","id":0,"typeName":"Line"}},{"kind":"Parameter","id":0,"name":"l2","type":{"kind":"TypeReference","id":0,"typeName":"Line"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Check if 2 lines intersects, if yes returns the intersection point.","tags":{"group":["Math"]}}}],"testLineCircle":[{"kind":"MethodSignature","id":0,"name":"testLineCircle","parameters":[{"kind":"Parameter","id":0,"name":"l","type":{"kind":"TypeReference","id":0,"typeName":"Line"}},{"kind":"Parameter","id":0,"name":"circle","type":{"kind":"TypeReference","id":0,"typeName":"Circle"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if a line and a circle intersect.","tags":{"group":["Math"]}}}],"testRectRect":[{"kind":"MethodSignature","id":0,"name":"testRectRect","parameters":[{"kind":"Parameter","id":0,"name":"r1","type":{"kind":"TypeReference","id":0,"typeName":"Rect"}},{"kind":"Parameter","id":0,"name":"r2","type":{"kind":"TypeReference","id":0,"typeName":"Rect"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if 2 rectangle overlaps.","tags":{"group":["Math"]}}}],"testRectLine":[{"kind":"MethodSignature","id":0,"name":"testRectLine","parameters":[{"kind":"Parameter","id":0,"name":"r","type":{"kind":"TypeReference","id":0,"typeName":"Rect"}},{"kind":"Parameter","id":0,"name":"l","type":{"kind":"TypeReference","id":0,"typeName":"Line"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if a line and a rectangle overlaps.","tags":{"group":["Math"]}}}],"testRectPoint":[{"kind":"MethodSignature","id":0,"name":"testRectPoint","parameters":[{"kind":"Parameter","id":0,"name":"r","type":{"kind":"TypeReference","id":0,"typeName":"Rect"}},{"kind":"Parameter","id":0,"name":"pt","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if a point is inside a rectangle.","tags":{"group":["Math"]}}}],"testCirclePolygon":[{"kind":"MethodSignature","id":0,"name":"testCirclePolygon","parameters":[{"kind":"Parameter","id":0,"name":"c","type":{"kind":"TypeReference","id":0,"typeName":"Circle"}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Polygon"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if a circle and polygon intersect linewise.","tags":{"group":["Math"]}}}],"isConvex":[{"kind":"MethodSignature","id":0,"name":"isConvex","parameters":[{"kind":"Parameter","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"tags":{"group":["Math"]}}}],"triangulate":[{"kind":"MethodSignature","id":0,"name":"triangulate","parameters":[{"kind":"Parameter","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}},"jsDoc":{"tags":{"group":["Math"]}}}],"NavMesh":[{"kind":"PropertySignature","id":0,"name":"NavMesh","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"NavMesh"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Point":[{"kind":"PropertySignature","id":0,"name":"Point","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Point"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Line":[{"kind":"PropertySignature","id":0,"name":"Line","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Line"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Rect":[{"kind":"PropertySignature","id":0,"name":"Rect","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Rect"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Circle":[{"kind":"PropertySignature","id":0,"name":"Circle","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Circle"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Ellipse":[{"kind":"PropertySignature","id":0,"name":"Ellipse","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Ellipse"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Polygon":[{"kind":"PropertySignature","id":0,"name":"Polygon","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Polygon"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Vec2":[{"kind":"PropertySignature","id":0,"name":"Vec2","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Vec2"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Color":[{"kind":"PropertySignature","id":0,"name":"Color","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Color"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Mat4":[{"kind":"PropertySignature","id":0,"name":"Mat4","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Mat4"}},"jsDoc":{"tags":{"group":["Math"]}}}],"Quad":[{"kind":"PropertySignature","id":0,"name":"Quad","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"Quad"}},"jsDoc":{"tags":{"group":["Math"]}}}],"RNG":[{"kind":"PropertySignature","id":0,"name":"RNG","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"RNG"}},"jsDoc":{"tags":{"group":["Math"]}}}],"scene":[{"kind":"MethodSignature","id":0,"name":"scene","parameters":[{"kind":"Parameter","id":0,"name":"id","type":{"kind":"TypeReference","id":0,"typeName":"SceneName"}},{"kind":"Parameter","id":0,"name":"def","type":{"kind":"TypeReference","id":0,"typeName":"SceneDef"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Define a scene.","tags":{"group":["Scene"]}}}],"go":[{"kind":"MethodSignature","id":0,"name":"go","parameters":[{"kind":"Parameter","id":0,"name":"id","type":{"kind":"TypeReference","id":0,"typeName":"SceneName"}},{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Go to a scene, passing all rest args to scene callback.","tags":{"group":["Scene"]}}}],"layers":[{"kind":"MethodSignature","id":0,"name":"layers","parameters":[{"kind":"Parameter","id":0,"name":"layernames","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"defaultLayer","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Define the layer names. Should be called before any objects are made.","tags":{"group":["Scene"]}}}],"addLevel":[{"kind":"MethodSignature","id":0,"name":"addLevel","parameters":[{"kind":"Parameter","id":0,"name":"map","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"LevelOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj"},"jsDoc":{"doc":"Construct a level based on symbols.","tags":{"group":["Level"],"example":["```js\naddLevel([\n \" $\",\n \" $\",\n \" $$ = $\",\n \" % ==== = $\",\n \" = \",\n \" ^^ = > = &\",\n \"===========================\",\n], {\n // define the size of tile block\n tileWidth: 32,\n tileHeight: 32,\n // define what each symbol means, by a function returning a component list (what will be passed to add())\n tiles: {\n \"=\": () => [\n sprite(\"floor\"),\n area(),\n body({ isStatic: true }),\n ],\n \"$\": () => [\n sprite(\"coin\"),\n area(),\n pos(0, -9),\n ],\n \"^\": () => [\n sprite(\"spike\"),\n area(),\n \"danger\",\n ],\n }\n})\n```"]}}}],"getData":[{"kind":"MethodSignature","id":0,"name":"getData","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"def","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"T"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get data from local storage, if not present can set to a default value.","tags":{"group":["Data"]}}}],"setData":[{"kind":"MethodSignature","id":0,"name":"setData","parameters":[{"kind":"Parameter","id":0,"name":"key","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"data","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Set data from local storage.","tags":{"group":["Data"]}}}],"drawSprite":[{"kind":"MethodSignature","id":0,"name":"drawSprite","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawSpriteOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a sprite.","tags":{"example":["```js\ndrawSprite({\n sprite: \"bean\",\n pos: vec2(100, 200),\n frame: 3,\n})\n```"],"group":["Draw"]}}}],"drawText":[{"kind":"MethodSignature","id":0,"name":"drawText","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawTextOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a piece of text.","tags":{"example":["```js\ndrawText({\n text: \"oh hi\",\n size: 48,\n font: \"sans-serif\",\n width: 120,\n pos: vec2(100, 200),\n color: rgb(0, 0, 255),\n})\n```"],"group":["Draw"]}}}],"drawRect":[{"kind":"MethodSignature","id":0,"name":"drawRect","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawRectOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a rectangle.","tags":{"example":["```js\ndrawRect({\n width: 120,\n height: 240,\n pos: vec2(20, 20),\n color: YELLOW,\n outline: { color: BLACK, width: 4 },\n})\n```"],"group":["Draw"]}}}],"drawLine":[{"kind":"MethodSignature","id":0,"name":"drawLine","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawLineOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a line.","tags":{"example":["```js\ndrawLine({\n p1: vec2(0),\n p2: mousePos(),\n width: 4,\n color: rgb(0, 0, 255),\n})\n```"],"group":["Draw"]}}}],"drawLines":[{"kind":"MethodSignature","id":0,"name":"drawLines","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawLinesOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw lines.","tags":{"example":["```js\ndrawLines({\n pts: [ vec2(0), vec2(0, height()), mousePos() ],\n width: 4,\n pos: vec2(100, 200),\n color: rgb(0, 0, 255),\n})\n```"],"group":["Draw"]}}}],"drawCurve":[{"kind":"MethodSignature","id":0,"name":"drawCurve","parameters":[{"kind":"Parameter","id":0,"name":"curve","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}},{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"TypeReference","id":0,"typeName":"DrawCurveOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a curve.","tags":{"example":["```js\ndrawCurve(t => evaluateBezier(a, b, c, d, t)\n{\n width: 2,\n color: rgb(0, 0, 255),\n})\n```"],"group":["Draw"]}}}],"drawBezier":[{"kind":"MethodSignature","id":0,"name":"drawBezier","parameters":[{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"TypeReference","id":0,"typeName":"DrawBezierOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a cubic Bezier curve.","tags":{"example":["```js\ndrawBezier({\n pt1: vec2(100, 100),\n pt2: vec2(200, 100),\n pt3: vec2(200, 200),\n pt4: vec2(100, 200),\n width: 2,\n color: GREEN\n})\n```"],"group":["Draw"]}}}],"drawTriangle":[{"kind":"MethodSignature","id":0,"name":"drawTriangle","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawTriangleOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a triangle.","tags":{"example":["```js\ndrawTriangle({\n p1: vec2(0),\n p2: vec2(0, height()),\n p3: mousePos(),\n pos: vec2(100, 200),\n color: rgb(0, 0, 255),\n})\n```"],"group":["Draw"]}}}],"drawCircle":[{"kind":"MethodSignature","id":0,"name":"drawCircle","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawCircleOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a circle.","tags":{"example":["```js\ndrawCircle({\n pos: vec2(100, 200),\n radius: 120,\n color: rgb(255, 255, 0),\n})\n```"],"group":["Draw"]}}}],"drawEllipse":[{"kind":"MethodSignature","id":0,"name":"drawEllipse","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawEllipseOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw an ellipse.","tags":{"example":["```js\ndrawEllipse({\n pos: vec2(100, 200),\n radiusX: 120,\n radiusY: 120,\n color: rgb(255, 255, 0),\n})\n```"],"group":["Draw"]}}}],"drawPolygon":[{"kind":"MethodSignature","id":0,"name":"drawPolygon","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawPolygonOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a convex polygon from a list of vertices.","tags":{"example":["```js\ndrawPolygon({\n pts: [\n vec2(-12),\n vec2(0, 16),\n vec2(12, 4),\n vec2(0, -2),\n vec2(-8),\n ],\n pos: vec2(100, 200),\n color: rgb(0, 0, 255),\n})\n```"],"group":["Draw"]}}}],"drawUVQuad":[{"kind":"MethodSignature","id":0,"name":"drawUVQuad","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawUVQuadOpt"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a rectangle with UV data.","tags":{"group":["Draw"]}}}],"drawFormattedText":[{"kind":"MethodSignature","id":0,"name":"drawFormattedText","parameters":[{"kind":"Parameter","id":0,"name":"text","type":{"kind":"TypeReference","id":0,"typeName":"FormattedText"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw a piece of formatted text from formatText().","tags":{"since":["v2000.2"],"example":["```js\n// text background\nconst txt = formatText({\n text: \"oh hi\",\n})\n\ndrawRect({\n width: txt.width,\n height: txt.height,\n})\n\ndrawFormattedText(txt)\n```"],"group":["Draw"]}}}],"drawMasked":[{"kind":"MethodSignature","id":0,"name":"drawMasked","parameters":[{"kind":"Parameter","id":0,"name":"content","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"mask","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Whatever drawn in content will only be drawn if it's also drawn in mask (mask will not be rendered).","tags":{"since":["v3000.0"],"group":["Draw"]}}}],"drawSubtracted":[{"kind":"MethodSignature","id":0,"name":"drawSubtracted","parameters":[{"kind":"Parameter","id":0,"name":"content","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}},{"kind":"Parameter","id":0,"name":"mask","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Subtract whatever drawn in content by whatever drawn in mask (mask will not be rendered).","tags":{"since":["v3000.0"],"group":["Draw"]}}}],"pushTransform":[{"kind":"MethodSignature","id":0,"name":"pushTransform","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Push current transform matrix to the transform stack.","tags":{"example":["```js\npushTransform()\n\n// these transforms will affect every render until popTransform()\npushTranslate(120, 200)\npushRotate(time() * 120)\npushScale(6)\n\ndrawSprite(\"bean\")\ndrawCircle(vec2(0), 120)\n\n// restore the transformation stack to when last pushed\npopTransform()\n```"],"group":["Draw"]}}}],"popTransform":[{"kind":"MethodSignature","id":0,"name":"popTransform","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Pop the topmost transform matrix from the transform stack.","tags":{"group":["Draw"]}}}],"pushTranslate":[{"kind":"MethodSignature","id":0,"name":"pushTranslate","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Translate all subsequent draws.","tags":{"example":["```js\npushTranslate(100, 100)\n\n// this will be drawn at (120, 120)\ndrawText({\n text: \"oh hi\",\n pos: vec2(20, 20),\n})\n```"],"group":["Draw"]}}},{"kind":"MethodSignature","id":0,"name":"pushTranslate","parameters":[{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"VoidKeyword","id":0}},{"kind":"MethodSignature","id":0,"name":"pushTranslate","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2Args"},{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]}]}}],"type":{"kind":"VoidKeyword","id":0}}],"pushScale":[{"kind":"MethodSignature","id":0,"name":"pushScale","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Scale all subsequent draws.","tags":{"group":["Draw"]}}},{"kind":"MethodSignature","id":0,"name":"pushScale","parameters":[{"kind":"Parameter","id":0,"name":"s","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"NumberKeyword","id":0}]}}],"type":{"kind":"VoidKeyword","id":0}},{"kind":"MethodSignature","id":0,"name":"pushScale","parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2Args"},{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]},{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0},{"kind":"UndefinedKeyword","id":0}]}]}}],"type":{"kind":"VoidKeyword","id":0}}],"pushRotate":[{"kind":"MethodSignature","id":0,"name":"pushRotate","parameters":[{"kind":"Parameter","id":0,"name":"angle","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Rotate all subsequent draws.","tags":{"group":["Draw"]}}}],"pushMatrix":[{"kind":"MethodSignature","id":0,"name":"pushMatrix","parameters":[{"kind":"Parameter","id":0,"name":"mat","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Apply a transform matrix, ignore all prior transforms.","tags":{"since":["v3000.0"],"group":["Draw"]}}}],"usePostEffect":[{"kind":"MethodSignature","id":0,"name":"usePostEffect","parameters":[{"kind":"Parameter","id":0,"name":"name","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"uniform","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Uniform"},{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}}]}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Apply a post process effect from a shader name.","tags":{"since":["v3000.0"],"example":["```js\nloadShader(\"invert\", null, `\nvec4 frag(vec2 pos, vec2 uv, vec4 color, sampler2D tex) {\n vec4 c = def_frag();\n return vec4(1.0 - c.r, 1.0 - c.g, 1.0 - c.b, c.a);\n}\n`)\n\nusePostEffect(\"invert\")\n```"],"group":["Draw"]}}}],"formatText":[{"kind":"MethodSignature","id":0,"name":"formatText","parameters":[{"kind":"Parameter","id":0,"name":"options","type":{"kind":"TypeReference","id":0,"typeName":"DrawTextOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"FormattedText"},"jsDoc":{"doc":"Format a piece of text without drawing (for getting dimensions, etc).","tags":{"since":["v2000.2"],"example":["```js\n// text background\nconst txt = formatText({\n text: \"oh hi\",\n})\n\ndrawRect({\n width: txt.width,\n height: txt.height,\n})\n\ndrawFormattedText(txt)\n```"],"group":["Draw"]}}}],"makeCanvas":[{"kind":"MethodSignature","id":0,"name":"makeCanvas","parameters":[{"kind":"Parameter","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Canvas"},"jsDoc":{"doc":"Create a canvas to draw stuff offscreen.","tags":{"since":["v3001.0"],"group":["Draw"]}}}],"debug":[{"kind":"PropertySignature","id":0,"name":"debug","type":{"kind":"TypeReference","id":0,"typeName":"Debug"},"jsDoc":{"doc":"The Debug interface for debugging stuff.","tags":{"example":["```js\n// pause the whole game\ndebug.paused = true\n\n// enter inspect mode\ndebug.inspect = true\n```"],"group":["Debug"]}}}],"plug":[{"kind":"MethodSignature","id":0,"name":"plug","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","constraint":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"AnyKeyword","id":0}]}}],"parameters":[{"kind":"Parameter","id":0,"name":"plugin","type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYPlugin","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}}],"type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},{"kind":"TypeReference","id":0,"typeName":"T"}]},"jsDoc":{"doc":"Import a plugin.","tags":{"group":["Plugins"]}}}],"screenshot":[{"kind":"MethodSignature","id":0,"name":"screenshot","parameters":[],"type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"Take a screenshot and get the dataurl of the image.","tags":{"returns":["The dataURL of the image."],"group":["Data"]}}}],"download":[{"kind":"MethodSignature","id":0,"name":"download","parameters":[{"kind":"Parameter","id":0,"name":"filename","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"dataurl","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Trigger a file download from a url.","tags":{"since":["v3000.0"],"group":["Data"]}}}],"downloadText":[{"kind":"MethodSignature","id":0,"name":"downloadText","parameters":[{"kind":"Parameter","id":0,"name":"filename","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"text","type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Trigger a text file download.","tags":{"since":["v3000.0"],"group":["Data"]}}}],"downloadJSON":[{"kind":"MethodSignature","id":0,"name":"downloadJSON","parameters":[{"kind":"Parameter","id":0,"name":"filename","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"data","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Trigger a json download from a .","tags":{"since":["v3000.0"],"group":["Data"]}}}],"downloadBlob":[{"kind":"MethodSignature","id":0,"name":"downloadBlob","parameters":[{"kind":"Parameter","id":0,"name":"filename","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"blob","type":{"kind":"TypeReference","id":0,"typeName":"Blob"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Trigger a file download from a blob.","tags":{"since":["v3000.0"],"group":["Data"]}}}],"record":[{"kind":"MethodSignature","id":0,"name":"record","parameters":[{"kind":"Parameter","id":0,"name":"frameRate","questionToken":true,"type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Recording"},"jsDoc":{"doc":"Start recording the canvas into a video. If framerate is not specified, a new frame will be captured each time the canvas changes.","tags":{"returns":["A control handle."],"since":["v2000.1"],"group":["Data"]}}}],"addKaboom":[{"kind":"MethodSignature","id":0,"name":"addKaboom","parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"opt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"BoomOpt"}}],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj"},"jsDoc":{"doc":"Add an explosion","tags":{"group":["Misc"]}}}],"ASCII_CHARS":[{"kind":"PropertySignature","id":0,"name":"ASCII_CHARS","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"All chars in ASCII.","tags":{"group":["Constants"]}}}],"LEFT":[{"kind":"PropertySignature","id":0,"name":"LEFT","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Left directional vector vec2(-1, 0).","tags":{"group":["Constants"]}}}],"RIGHT":[{"kind":"PropertySignature","id":0,"name":"RIGHT","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Right directional vector vec2(1, 0).","tags":{"group":["Constants"]}}}],"UP":[{"kind":"PropertySignature","id":0,"name":"UP","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Up directional vector vec2(0, -1).","tags":{"group":["Constants"]}}}],"DOWN":[{"kind":"PropertySignature","id":0,"name":"DOWN","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Down directional vector vec2(0, 1).","tags":{"group":["Constants"]}}}],"RED":[{"kind":"PropertySignature","id":0,"name":"RED","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Red color.","tags":{"group":["Constants"]}}}],"GREEN":[{"kind":"PropertySignature","id":0,"name":"GREEN","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Green color.","tags":{"group":["Constants"]}}}],"BLUE":[{"kind":"PropertySignature","id":0,"name":"BLUE","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Blue color.","tags":{"group":["Constants"]}}}],"YELLOW":[{"kind":"PropertySignature","id":0,"name":"YELLOW","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Yellow color.","tags":{"group":["Constants"]}}}],"MAGENTA":[{"kind":"PropertySignature","id":0,"name":"MAGENTA","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Cyan color.","tags":{"group":["Constants"]}}}],"CYAN":[{"kind":"PropertySignature","id":0,"name":"CYAN","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Cyan color.","tags":{"group":["Constants"]}}}],"WHITE":[{"kind":"PropertySignature","id":0,"name":"WHITE","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"White color.","tags":{"group":["Constants"]}}}],"BLACK":[{"kind":"PropertySignature","id":0,"name":"BLACK","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"jsDoc":{"doc":"Black color.","tags":{"group":["Constants"]}}}],"canvas":[{"kind":"PropertySignature","id":0,"name":"canvas","type":{"kind":"TypeReference","id":0,"typeName":"HTMLCanvasElement"},"jsDoc":{"doc":"The canvas DOM KAPLAY is currently using.","tags":{"group":["Info"]}}}],"quit":[{"kind":"PropertySignature","id":0,"name":"quit","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"jsDoc":{"doc":"End everything.","tags":{"group":["Start"]}}}],"KEvent":[{"kind":"PropertySignature","id":0,"name":"KEvent","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"KEvent"}},"jsDoc":{"doc":"EventHandler for one single event.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"KEventHandler":[{"kind":"PropertySignature","id":0,"name":"KEventHandler","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"KEventHandler"}},"jsDoc":{"doc":"EventHandler for multiple events.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"KEventController":[{"kind":"PropertySignature","id":0,"name":"KEventController","type":{"kind":"TypeQuery","id":0,"exprName":{"kind":"Identifier","id":0,"escapedText":"KEventController"}},"jsDoc":{"doc":"The object that can pause or cancel an event.","tags":{"since":["v3000.0"],"group":["Events"]}}}],"VERSION":[{"kind":"PropertySignature","id":0,"name":"VERSION","type":{"kind":"StringKeyword","id":0},"jsDoc":{"doc":"Current KAPLAY library version.","tags":{"since":["v3000.0"],"group":["Info"]}}}]},"jsDoc":{"doc":"Context handle that contains every kaboom function.","tags":{"group":["Start"]}}}],"Tag":[{"kind":"TypeAliasDeclaration","id":0,"name":"Tag","type":{"kind":"StringKeyword","id":0}}],"UnionToIntersection":[{"kind":"TypeAliasDeclaration","id":0,"name":"UnionToIntersection","typeParameters":[{"kind":"TypeParameter","id":0,"name":"U"}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"ParenthesizedType","id":0,"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"U"},"extendsType":{"kind":"AnyKeyword","id":0},"trueType":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"U"}}],"type":{"kind":"VoidKeyword","id":0}},"falseType":{"kind":"NeverKeyword","id":0}}},"extendsType":{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"I"}}}],"type":{"kind":"VoidKeyword","id":0}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"I"},"falseType":{"kind":"NeverKeyword","id":0}}}],"Defined":[{"kind":"TypeAliasDeclaration","id":0,"name":"Defined","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"AnyKeyword","id":0},"trueType":{"kind":"TypeReference","id":0,"typeName":"Pick","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"MappedType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"K","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"T"}}},"questionToken":true,"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"T"},"indexType":{"kind":"TypeReference","id":0,"typeName":"K"}},"extendsType":{"kind":"UndefinedKeyword","id":0},"trueType":{"kind":"NeverKeyword","id":0},"falseType":{"kind":"TypeReference","id":0,"typeName":"K"}},"members":{}},"indexType":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"T"}}}]},"falseType":{"kind":"NeverKeyword","id":0}}}],"Expand":[{"kind":"TypeAliasDeclaration","id":0,"name":"Expand","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"U"}},"trueType":{"kind":"MappedType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"K","constraint":{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"U"}}},"type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"U"},"indexType":{"kind":"TypeReference","id":0,"typeName":"K"}},"members":{}},"falseType":{"kind":"NeverKeyword","id":0}}}],"MergeObj":[{"kind":"TypeAliasDeclaration","id":0,"name":"MergeObj","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"TypeReference","id":0,"typeName":"Expand","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"UnionToIntersection","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Defined","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}]}]}}],"MergeComps":[{"kind":"TypeAliasDeclaration","id":0,"name":"MergeComps","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"TypeReference","id":0,"typeName":"Omit","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"MergeObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"Comp"}}]},"jsDoc":{"doc":"A type to merge the components of a game object, omiting the default component properties.","tags":{"group":["Component Types"]}}}],"MergePlugins":[{"kind":"TypeAliasDeclaration","id":0,"name":"MergePlugins","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","constraint":{"kind":"TypeReference","id":0,"typeName":"PluginList","typeArguments":[{"kind":"AnyKeyword","id":0}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"MergeObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"ReturnType","typeArguments":[{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"T"},"indexType":{"kind":"NumberKeyword","id":0}}]}]}}],"CompList":[{"kind":"TypeAliasDeclaration","id":0,"name":"CompList","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"TypeReference","id":0,"typeName":"Tag"}]}]},"jsDoc":{"doc":"A component list.","tags":{"group":["Component Types"]}}}],"PluginList":[{"kind":"TypeAliasDeclaration","id":0,"name":"PluginList","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"TypeReference","id":0,"typeName":"Array","typeArguments":[{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"TypeReference","id":0,"typeName":"KAPLAYPlugin","typeArguments":[{"kind":"AnyKeyword","id":0}]}]}]}}],"Key":[{"kind":"TypeAliasDeclaration","id":0,"name":"Key","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f1","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f2","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f3","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f4","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f5","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f6","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f7","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f8","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f9","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f10","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f11","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f12","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"`","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"1","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"2","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"3","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"4","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"5","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"6","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"7","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"8","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"9","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"0","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"-","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"=","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"q","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"w","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"e","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"r","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"t","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"y","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"u","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"i","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"o","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"p","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"[","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"]","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"\\","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"a","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"s","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"d","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"f","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"g","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"h","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"j","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"k","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"l","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":";","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"'","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"z","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"x","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"c","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"v","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"b","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"n","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"m","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":",","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":".","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"/","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"escape","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"backspace","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"enter","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"tab","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"control","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"alt","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"meta","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"space","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":" ","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"right","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"up","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"down","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"shift","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"A key.","tags":{"group":["Input"]}}}],"MouseButton":[{"kind":"TypeAliasDeclaration","id":0,"name":"MouseButton","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"right","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"middle","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"back","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"forward","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"A mouse button.","tags":{"group":["Input"]}}}],"KGamepadButton":[{"kind":"TypeAliasDeclaration","id":0,"name":"KGamepadButton","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"north","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"east","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"south","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"west","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ltrigger","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"rtrigger","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"lshoulder","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"rshoulder","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"select","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"start","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"lstick","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"rstick","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"dpad-up","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"dpad-right","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"dpad-down","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"dpad-left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"home","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"capture","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"A gamepad button.","tags":{"group":["Input"]}}}],"GamepadStick":[{"kind":"TypeAliasDeclaration","id":0,"name":"GamepadStick","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"right","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"A gamepad stick.","tags":{"group":["Input"]}}}],"GamepadDef":[{"kind":"TypeAliasDeclaration","id":0,"name":"GamepadDef","type":{"kind":"TypeLiteral","id":0,"members":{"buttons":[{"kind":"PropertySignature","id":0,"name":"buttons","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}]}}],"sticks":[{"kind":"PropertySignature","id":0,"name":"sticks","type":{"kind":"TypeReference","id":0,"typeName":"Partial","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GamepadStick"},{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}]}}]}]}}]}},"jsDoc":{"doc":"A gamepad definition.","tags":{}}}],"KGamePad":[{"kind":"TypeAliasDeclaration","id":0,"name":"KGamePad","type":{"kind":"TypeLiteral","id":0,"members":{"index":[{"kind":"PropertySignature","id":0,"name":"index","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The order of the gamepad in the gamepad list.","tags":{}}}],"isPressed":[{"kind":"MethodSignature","id":0,"name":"isPressed","parameters":[{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain button is pressed.","tags":{}}}],"isDown":[{"kind":"MethodSignature","id":0,"name":"isDown","parameters":[{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain button is held down.","tags":{}}}],"isReleased":[{"kind":"MethodSignature","id":0,"name":"isReleased","parameters":[{"kind":"Parameter","id":0,"name":"b","type":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If certain button is released.","tags":{}}}],"getStick":[{"kind":"MethodSignature","id":0,"name":"getStick","parameters":[{"kind":"Parameter","id":0,"name":"stick","type":{"kind":"TypeReference","id":0,"typeName":"GamepadStick"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Get the value of a stick.","tags":{}}}]}},"jsDoc":{"doc":"A KAPLAY's gamepad","tags":{}}}],"GameObjInspect":[{"kind":"TypeAliasDeclaration","id":0,"name":"GameObjInspect","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Tag"},{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}]},"jsDoc":{"doc":"Inspect info for a game object.","tags":{}}}],"KAPLAYOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"KAPLAYOpt","typeParameters":[{"kind":"TypeParameter","id":0,"name":"TPlugin","constraint":{"kind":"TypeReference","id":0,"typeName":"PluginList","typeArguments":[{"kind":"AnyKeyword","id":0}]},"default":{"kind":"AnyKeyword","id":0}},{"kind":"TypeParameter","id":0,"name":"TButtonDef","constraint":{"kind":"TypeReference","id":0,"typeName":"ButtonsDef"},"default":{"kind":"AnyKeyword","id":0}}],"members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Width of game.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Height of game.","tags":{}}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Pixel scale / size.","tags":{}}}],"stretch":[{"kind":"PropertySignature","id":0,"name":"stretch","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If stretch canvas to container when width and height is specified","tags":{}}}],"letterbox":[{"kind":"PropertySignature","id":0,"name":"letterbox","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"When stretching if keep aspect ratio and leave black bars on remaining spaces.","tags":{}}}],"debug":[{"kind":"PropertySignature","id":0,"name":"debug","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If register debug buttons (default true)","tags":{}}}],"debugKey":[{"kind":"PropertySignature","id":0,"name":"debugKey","type":{"kind":"TypeReference","id":0,"typeName":"Key"},"questionToken":true,"jsDoc":{"doc":"Key that toggles debug mode","tags":{}}}],"font":[{"kind":"PropertySignature","id":0,"name":"font","type":{"kind":"StringKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Default font (defaults to \"monospace\").","tags":{}}}],"pixelDensity":[{"kind":"PropertySignature","id":0,"name":"pixelDensity","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Device pixel scale (defaults to window.devicePixelRatio, high pixel density will hurt performance).","tags":{"since":["v3000.0"]}}}],"crisp":[{"kind":"PropertySignature","id":0,"name":"crisp","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Disable antialias and enable sharp pixel display.","tags":{}}}],"canvas":[{"kind":"PropertySignature","id":0,"name":"canvas","type":{"kind":"TypeReference","id":0,"typeName":"HTMLCanvasElement"},"questionToken":true,"jsDoc":{"doc":"The canvas DOM element to use. If empty will create one.","tags":{}}}],"root":[{"kind":"PropertySignature","id":0,"name":"root","type":{"kind":"TypeReference","id":0,"typeName":"HTMLElement"},"questionToken":true,"jsDoc":{"doc":"The container DOM element to insert the canvas if created. Defaults to document.body.","tags":{}}}],"background":[{"kind":"PropertySignature","id":0,"name":"background","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RGBValue"},{"kind":"TypeReference","id":0,"typeName":"RGBAValue"},{"kind":"StringKeyword","id":0}]},"questionToken":true,"jsDoc":{"doc":"Background color. E.g. [ 0, 0, 255 ] for solid blue background, or [ 0, 0, 0, 0 ] for transparent background. Accepts RGB value array or string hex codes.","tags":{}}}],"texFilter":[{"kind":"PropertySignature","id":0,"name":"texFilter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true,"jsDoc":{"doc":"Default texture filter.","tags":{}}}],"logMax":[{"kind":"PropertySignature","id":0,"name":"logMax","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"How many log messages can there be on one screen (default 8).","tags":{}}}],"logTime":[{"kind":"PropertySignature","id":0,"name":"logTime","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"How many seconds log messages stay on screen (default 4).","tags":{"since":["v3000.1"]}}}],"hashGridSize":[{"kind":"PropertySignature","id":0,"name":"hashGridSize","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Size of the spatial hash grid for collision detection (default 64).","tags":{"since":["v3000.0"]}}}],"touchToMouse":[{"kind":"PropertySignature","id":0,"name":"touchToMouse","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If translate touch events as mouse clicks (default true).","tags":{}}}],"loadingScreen":[{"kind":"PropertySignature","id":0,"name":"loadingScreen","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If KAPLAY should render a default loading screen when assets are not fully ready (default true).","tags":{"since":["v3000.0"]}}}],"backgroundAudio":[{"kind":"PropertySignature","id":0,"name":"backgroundAudio","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If pause audio when tab is not active (default false).","tags":{"since":["v3000.0"]}}}],"gamepads":[{"kind":"PropertySignature","id":0,"name":"gamepads","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"GamepadDef"}]},"questionToken":true,"jsDoc":{"doc":"Custom gamepad definitions (see gamepad.json for reference of the format).","tags":{"since":["v3000.0"]}}}],"buttons":[{"kind":"PropertySignature","id":0,"name":"buttons","type":{"kind":"TypeReference","id":0,"typeName":"TButtonDef"},"questionToken":true,"jsDoc":{"doc":"Defined buttons for input binding.","tags":{"since":["v30010"]}}}],"maxFPS":[{"kind":"PropertySignature","id":0,"name":"maxFPS","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Limit framerate to an amount per second.","tags":{"since":["v3000.0"]}}}],"focus":[{"kind":"PropertySignature","id":0,"name":"focus","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If focus on the canvas on start (default true).","tags":{"since":["v3001.0"]}}}],"global":[{"kind":"PropertySignature","id":0,"name":"global","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If import all KAPLAY functions to global (default true).","tags":{}}}],"plugins":[{"kind":"PropertySignature","id":0,"name":"plugins","type":{"kind":"TypeReference","id":0,"typeName":"TPlugin"},"questionToken":true,"jsDoc":{"doc":"List of plugins to import.","tags":{}}}],"burp":[{"kind":"PropertySignature","id":0,"name":"burp","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Enter burp mode.","tags":{}}}]},"jsDoc":{"doc":"KAPLAY configurations.","tags":{"group":["Start"]}}}],"KAPLAYPlugin":[{"kind":"TypeAliasDeclaration","id":0,"name":"KAPLAYPlugin","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"T"},{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"k","type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"}}],"type":{"kind":"TypeReference","id":0,"typeName":"T"}}}}]}},"jsDoc":{"doc":"A plugin for KAPLAY.","tags":{"example":["```js\n// a plugin that adds a new function to KAPLAY\nconst myPlugin = (k) => ({\n myFunc: () => {\n k.debug.log(\"hello from my plugin\")\n }\n})\n\n// use the plugin\nkaplay({\n plugins: [ myPlugin ]\n})\n\n// now you can use the new function\nmyFunc()\n```"],"group":["Plugins"]}}}],"GameObjRaw":[{"kind":"InterfaceDeclaration","id":0,"name":"GameObjRaw","members":{"add":[{"kind":"MethodSignature","id":0,"name":"add","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"comps","questionToken":true,"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"ConstructorType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"go","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"R"},"falseType":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"T"},"extendsType":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"go","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"InferType","id":0,"typeParameter":{"kind":"TypeParameter","id":0,"name":"R"}}},"trueType":{"kind":"TypeReference","id":0,"typeName":"R"},"falseType":{"kind":"TypeReference","id":0,"typeName":"T"}}}]},"jsDoc":{"doc":"Add a child.","tags":{"since":["v3000.0"]}}}],"readd":[{"kind":"MethodSignature","id":0,"name":"readd","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}}],"type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},"jsDoc":{"doc":"Remove and re-add the game obj, without triggering add / destroy events.","tags":{}}}],"remove":[{"kind":"MethodSignature","id":0,"name":"remove","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove a child.","tags":{"since":["v3000.0"]}}}],"removeAll":[{"kind":"MethodSignature","id":0,"name":"removeAll","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove all children with a certain tag.","tags":{"since":["v3000.0"]}}},{"kind":"MethodSignature","id":0,"name":"removeAll","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove all children.","tags":{"since":["v3000.0"]}}}],"get":[{"kind":"MethodSignature","id":0,"name":"get","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Tag"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Tag"}}]}},{"kind":"Parameter","id":0,"name":"opts","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"GetOpt"}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},"jsDoc":{"doc":"Get a list of all game objs with certain tag.","tags":{"since":["v3000.0"]}}}],"query":[{"kind":"MethodSignature","id":0,"name":"query","parameters":[{"kind":"Parameter","id":0,"name":"opt","type":{"kind":"TypeReference","id":0,"typeName":"QueryOpt"}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},"jsDoc":{"doc":"Get a list of all game objs with certain properties.","tags":{"since":["v3001.0"]}}}],"children":[{"kind":"PropertySignature","id":0,"name":"children","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},"jsDoc":{"doc":"Get all children game objects.","tags":{"since":["v3000.0"]}}}],"tags":[{"kind":"PropertySignature","id":0,"name":"tags","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},"jsDoc":{"doc":"Get the tags of a game object.","tags":{"since":["v3001.0"]}}}],"fixedUpdate":[{"kind":"MethodSignature","id":0,"name":"fixedUpdate","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Update this game object and all children game objects.","tags":{"since":["v3001.0"]}}}],"update":[{"kind":"MethodSignature","id":0,"name":"update","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Update this game object and all children game objects.","tags":{"since":["v3000.0"]}}}],"draw":[{"kind":"MethodSignature","id":0,"name":"draw","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Draw this game object and all children game objects.","tags":{"since":["v3000.0"]}}}],"drawInspect":[{"kind":"PropertySignature","id":0,"name":"drawInspect","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"jsDoc":{"doc":"Draw debug info in inspect mode","tags":{"since":["v3000.0"]}}}],"clearEvents":[{"kind":"PropertySignature","id":0,"name":"clearEvents","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"is":[{"kind":"MethodSignature","id":0,"name":"is","parameters":[{"kind":"Parameter","id":0,"name":"tag","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Tag"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Tag"}}]}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If there's certain tag(s) on the game obj.","tags":{}}}],"use":[{"kind":"MethodSignature","id":0,"name":"use","parameters":[{"kind":"Parameter","id":0,"name":"comp","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Comp"},{"kind":"TypeReference","id":0,"typeName":"Tag"}]}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Add a component or tag.","tags":{}}}],"unuse":[{"kind":"MethodSignature","id":0,"name":"unuse","parameters":[{"kind":"Parameter","id":0,"name":"comp","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove a tag or a component with its id.","tags":{}}}],"on":[{"kind":"MethodSignature","id":0,"name":"on","parameters":[{"kind":"Parameter","id":0,"name":"event","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event.","tags":{}}}],"trigger":[{"kind":"MethodSignature","id":0,"name":"trigger","parameters":[{"kind":"Parameter","id":0,"name":"event","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"dotDotDotToken":{"kind":"DotDotDotToken","id":0},"name":"args","type":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Trigger an event.","tags":{}}}],"destroy":[{"kind":"MethodSignature","id":0,"name":"destroy","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Remove the game obj from scene.","tags":{}}}],"c":[{"kind":"MethodSignature","id":0,"name":"c","parameters":[{"kind":"Parameter","id":0,"name":"id","type":{"kind":"TypeReference","id":0,"typeName":"Tag"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Comp"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Get state for a specific comp.","tags":{}}}],"inspect":[{"kind":"MethodSignature","id":0,"name":"inspect","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"GameObjInspect"},"jsDoc":{"doc":"Gather debug info of all comps.","tags":{}}}],"onAdd":[{"kind":"MethodSignature","id":0,"name":"onAdd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the game obj is added to the scene.","tags":{}}}],"onUpdate":[{"kind":"MethodSignature","id":0,"name":"onUpdate","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame as long as the game obj exists.","tags":{"since":["v2000.1"]}}}],"onDraw":[{"kind":"MethodSignature","id":0,"name":"onDraw","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs every frame as long as the game obj exists (this is the same as `onUpdate()`, but all draw events are run after all update events).","tags":{"since":["v2000.1"]}}}],"onDestroy":[{"kind":"MethodSignature","id":0,"name":"onDestroy","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"},"jsDoc":{"doc":"Register an event that runs when the game obj is destroyed.","tags":{"since":["v2000.1"]}}}],"exists":[{"kind":"MethodSignature","id":0,"name":"exists","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If game obj is attached to the scene graph.","tags":{}}}],"isAncestorOf":[{"kind":"MethodSignature","id":0,"name":"isAncestorOf","parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Check if is an ancestor (recursive parent) of another game object","tags":{"since":["v3000.0"]}}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"},"jsDoc":{"doc":"Calculated transform matrix of a game object.","tags":{"since":["v3000.0"]}}}],"hidden":[{"kind":"PropertySignature","id":0,"name":"hidden","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If draw the game obj (run \"draw\" event or not).","tags":{}}}],"paused":[{"kind":"PropertySignature","id":0,"name":"paused","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If update the game obj (run \"update\" event or not).","tags":{}}}],"id":[{"kind":"PropertySignature","id":0,"name":"id","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObjID"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"A unique number ID for each game object.","tags":{}}}],"canvas":[{"kind":"PropertySignature","id":0,"name":"canvas","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"FrameBuffer"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"The canvas to draw this game object on","tags":{"since":["v3001.0"]}}}],"onKeyDown":[{"kind":"PropertySignature","id":0,"name":"onKeyDown","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onKeyDown","hasExtendedUnicodeEscape":false}}}}],"onKeyPress":[{"kind":"PropertySignature","id":0,"name":"onKeyPress","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onKeyPress","hasExtendedUnicodeEscape":false}}}}],"onKeyPressRepeat":[{"kind":"PropertySignature","id":0,"name":"onKeyPressRepeat","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onKeyPressRepeat","hasExtendedUnicodeEscape":false}}}}],"onKeyRelease":[{"kind":"PropertySignature","id":0,"name":"onKeyRelease","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onKeyRelease","hasExtendedUnicodeEscape":false}}}}],"onCharInput":[{"kind":"PropertySignature","id":0,"name":"onCharInput","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onCharInput","hasExtendedUnicodeEscape":false}}}}],"onMouseDown":[{"kind":"PropertySignature","id":0,"name":"onMouseDown","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onMouseDown","hasExtendedUnicodeEscape":false}}}}],"onMousePress":[{"kind":"PropertySignature","id":0,"name":"onMousePress","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onMousePress","hasExtendedUnicodeEscape":false}}}}],"onMouseRelease":[{"kind":"PropertySignature","id":0,"name":"onMouseRelease","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onMouseRelease","hasExtendedUnicodeEscape":false}}}}],"onMouseMove":[{"kind":"PropertySignature","id":0,"name":"onMouseMove","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onMouseMove","hasExtendedUnicodeEscape":false}}}}],"onTouchStart":[{"kind":"PropertySignature","id":0,"name":"onTouchStart","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onTouchStart","hasExtendedUnicodeEscape":false}}}}],"onTouchMove":[{"kind":"PropertySignature","id":0,"name":"onTouchMove","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onTouchMove","hasExtendedUnicodeEscape":false}}}}],"onTouchEnd":[{"kind":"PropertySignature","id":0,"name":"onTouchEnd","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onTouchEnd","hasExtendedUnicodeEscape":false}}}}],"onScroll":[{"kind":"PropertySignature","id":0,"name":"onScroll","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onScroll","hasExtendedUnicodeEscape":false}}}}],"onGamepadButtonDown":[{"kind":"PropertySignature","id":0,"name":"onGamepadButtonDown","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onGamepadButtonDown","hasExtendedUnicodeEscape":false}}}}],"onGamepadButtonPress":[{"kind":"PropertySignature","id":0,"name":"onGamepadButtonPress","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onGamepadButtonPress","hasExtendedUnicodeEscape":false}}}}],"onGamepadButtonRelease":[{"kind":"PropertySignature","id":0,"name":"onGamepadButtonRelease","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onGamepadButtonRelease","hasExtendedUnicodeEscape":false}}}}],"onGamepadStick":[{"kind":"PropertySignature","id":0,"name":"onGamepadStick","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onGamepadStick","hasExtendedUnicodeEscape":false}}}}],"onButtonDown":[{"kind":"PropertySignature","id":0,"name":"onButtonDown","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onButtonDown","hasExtendedUnicodeEscape":false}}}}],"onButtonPress":[{"kind":"PropertySignature","id":0,"name":"onButtonPress","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onButtonPress","hasExtendedUnicodeEscape":false}}}}],"onButtonRelease":[{"kind":"PropertySignature","id":0,"name":"onButtonRelease","type":{"kind":"IndexedAccessType","id":0,"objectType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx"},"indexType":{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"onButtonRelease","hasExtendedUnicodeEscape":false}}}}]},"jsDoc":{"doc":"Base interface of all game objects.","tags":{"group":["Game Obj"]}}}],"GameObj":[{"kind":"TypeAliasDeclaration","id":0,"name":"GameObj","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T","default":{"kind":"AnyKeyword","id":0}}],"type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObjRaw"},{"kind":"TypeReference","id":0,"typeName":"MergeComps","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}]},"jsDoc":{"doc":"The basic unit of object in KAPLAY. The player, a butterfly, a tree, or even a piece of text.","tags":{"group":["Game Obj"]}}}],"GetOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"GetOpt","type":{"kind":"TypeLiteral","id":0,"members":{"recursive":[{"kind":"PropertySignature","id":0,"name":"recursive","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Recursively get all children and their descendents.","tags":{}}}],"liveUpdate":[{"kind":"PropertySignature","id":0,"name":"liveUpdate","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Live update the returned list every time object is added / removed.","tags":{}}}]}},"jsDoc":{"tags":{"group":["Options"]}}}],"QueryOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"QueryOpt","type":{"kind":"TypeLiteral","id":0,"members":{"include":[{"kind":"PropertySignature","id":0,"name":"include","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}]},"questionToken":true,"jsDoc":{"doc":"All objects which include all or any of these tags, depending on includeOp.","tags":{}}}],"includeOp":[{"kind":"PropertySignature","id":0,"name":"includeOp","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"and","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"or","hasExtendedUnicodeEscape":false}}]},"questionToken":true,"jsDoc":{"doc":"Selects the operator to use. Defaults to and.","tags":{}}}],"exclude":[{"kind":"PropertySignature","id":0,"name":"exclude","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}}]},"questionToken":true,"jsDoc":{"doc":"All objects which do not have all or any of these tags, depending on excludeOp.","tags":{}}}],"excludeOp":[{"kind":"PropertySignature","id":0,"name":"excludeOp","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"and","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"or","hasExtendedUnicodeEscape":false}}]},"questionToken":true,"jsDoc":{"doc":"Selects the operator to use. Defaults to and.","tags":{}}}],"distance":[{"kind":"PropertySignature","id":0,"name":"distance","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"All objects which are near or far to the position of this, depending on distanceOp.","tags":{}}}],"distanceOp":[{"kind":"PropertySignature","id":0,"name":"distanceOp","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"near","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"far","hasExtendedUnicodeEscape":false}}]},"questionToken":true,"jsDoc":{"doc":"Selects the operator to use. Defaults to near.","tags":{}}}],"visible":[{"kind":"PropertySignature","id":0,"name":"visible","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"All objects visible from this standpoint.","tags":{}}}],"hierarchy":[{"kind":"PropertySignature","id":0,"name":"hierarchy","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"children","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"siblings","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ancestors","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"descendants","hasExtendedUnicodeEscape":false}}]},"questionToken":true,"jsDoc":{"doc":"All objects in the given group. Defaults to children.","tags":{}}}]}},"jsDoc":{"tags":{"group":["Options"]}}}],"Recording":[{"kind":"InterfaceDeclaration","id":0,"name":"Recording","members":{"pause":[{"kind":"MethodSignature","id":0,"name":"pause","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Pause the recording.","tags":{}}}],"resume":[{"kind":"MethodSignature","id":0,"name":"resume","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Resume the recording.","tags":{}}}],"stop":[{"kind":"MethodSignature","id":0,"name":"stop","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Promise","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Blob"}]},"jsDoc":{"doc":"Stop the recording and get the video data as mp4 Blob.","tags":{"since":["v3000.0"]}}}],"download":[{"kind":"MethodSignature","id":0,"name":"download","parameters":[{"kind":"Parameter","id":0,"name":"filename","questionToken":true,"type":{"kind":"StringKeyword","id":0}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Stop the recording and downloads the file as mp4. Trying to resume later will lead to error.","tags":{}}}]},"jsDoc":{"doc":"Screen recording control handle.","tags":{"group":["Data"]}}}],"SpriteAnimPlayOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"SpriteAnimPlayOpt","members":{"loop":[{"kind":"PropertySignature","id":0,"name":"loop","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If this anim should be played in loop.","tags":{}}}],"pingpong":[{"kind":"PropertySignature","id":0,"name":"pingpong","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"When looping should it move back instead of go to start frame again.","tags":{}}}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"This anim's speed in frames per second.","tags":{}}}],"onEnd":[{"kind":"PropertySignature","id":0,"name":"onEnd","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Runs when this animation ends.","tags":{}}}]},"jsDoc":{"doc":"Sprite animation configuration when playing.","tags":{}}}],"MusicData":[{"kind":"TypeAliasDeclaration","id":0,"name":"MusicData","type":{"kind":"StringKeyword","id":0}}],"LoadFontOpt":[{"kind":"InterfaceDeclaration","id":0,"name":"LoadFontOpt","members":{"filter":[{"kind":"PropertySignature","id":0,"name":"filter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}],"outline":[{"kind":"PropertySignature","id":0,"name":"outline","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Outline"}]},"questionToken":true}],"size":[{"kind":"PropertySignature","id":0,"name":"size","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The size to load the font in (default 64).","tags":{"since":["v3001.0"]}}}]}}],"TextureOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"TextureOpt","type":{"kind":"TypeLiteral","id":0,"members":{"filter":[{"kind":"PropertySignature","id":0,"name":"filter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}],"wrap":[{"kind":"PropertySignature","id":0,"name":"wrap","type":{"kind":"TypeReference","id":0,"typeName":"TexWrap"},"questionToken":true}]}}}],"ImageSource":[{"kind":"TypeAliasDeclaration","id":0,"name":"ImageSource","type":{"kind":"TypeReference","id":0,"typeName":"Exclude","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TexImageSource"},{"kind":"TypeReference","id":0,"typeName":"VideoFrame"}]}}],"Canvas":[{"kind":"TypeAliasDeclaration","id":0,"name":"Canvas","type":{"kind":"TypeLiteral","id":0,"members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"toImageData":[{"kind":"MethodSignature","id":0,"name":"toImageData","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"ImageData"}}],"toDataURL":[{"kind":"MethodSignature","id":0,"name":"toDataURL","parameters":[],"type":{"kind":"StringKeyword","id":0}}],"clear":[{"kind":"MethodSignature","id":0,"name":"clear","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"draw":[{"kind":"MethodSignature","id":0,"name":"draw","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}],"free":[{"kind":"MethodSignature","id":0,"name":"free","parameters":[],"type":{"kind":"VoidKeyword","id":0}}]}}}],"Vertex":[{"kind":"InterfaceDeclaration","id":0,"name":"Vertex","members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"uv":[{"kind":"PropertySignature","id":0,"name":"uv","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"color":[{"kind":"PropertySignature","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"}}],"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0}}]}}],"TexFilter":[{"kind":"TypeAliasDeclaration","id":0,"name":"TexFilter","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"nearest","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"linear","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"Texture scaling filter. \"nearest\" is mainly for sharp pixelated scaling, \"linear\" means linear interpolation.","tags":{}}}],"TexWrap":[{"kind":"TypeAliasDeclaration","id":0,"name":"TexWrap","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"repeat","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"clampToEdge","hasExtendedUnicodeEscape":false}}]}}],"RenderProps":[{"kind":"InterfaceDeclaration","id":0,"name":"RenderProps","members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"NumberKeyword","id":0}]},"questionToken":true}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"color":[{"kind":"PropertySignature","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"questionToken":true}],"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"fixed":[{"kind":"PropertySignature","id":0,"name":"fixed","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"shader":[{"kind":"PropertySignature","id":0,"name":"shader","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"ShaderData"},{"kind":"TypeReference","id":0,"typeName":"Asset","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"ShaderData"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"questionToken":true}],"uniform":[{"kind":"PropertySignature","id":0,"name":"uniform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Uniform"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"questionToken":true}],"outline":[{"kind":"PropertySignature","id":0,"name":"outline","type":{"kind":"TypeReference","id":0,"typeName":"Outline"},"questionToken":true}]},"jsDoc":{"doc":"Common render properties.","tags":{}}}],"DrawTextureOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawTextureOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"tex":[{"kind":"PropertySignature","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"questionToken":true}],"tiled":[{"kind":"PropertySignature","id":0,"name":"tiled","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"flipX":[{"kind":"PropertySignature","id":0,"name":"flipX","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"flipY":[{"kind":"PropertySignature","id":0,"name":"flipY","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}],"quad":[{"kind":"PropertySignature","id":0,"name":"quad","type":{"kind":"TypeReference","id":0,"typeName":"Quad"},"questionToken":true}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true}]}}]}}],"DrawUVQuadOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawUVQuadOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Width of the UV quad.","tags":{}}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Height of the UV quad.","tags":{}}}],"flipX":[{"kind":"PropertySignature","id":0,"name":"flipX","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If flip the texture horizontally.","tags":{}}}],"flipY":[{"kind":"PropertySignature","id":0,"name":"flipY","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If flip the texture vertically.","tags":{}}}],"tex":[{"kind":"PropertySignature","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"},"questionToken":true,"jsDoc":{"doc":"The texture to sample for this quad.","tags":{}}}],"quad":[{"kind":"PropertySignature","id":0,"name":"quad","type":{"kind":"TypeReference","id":0,"typeName":"Quad"},"questionToken":true,"jsDoc":{"doc":"The texture sampling area.","tags":{}}}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"The anchor point, or the pivot point. Default to \"topleft\".","tags":{}}}]}}]}}],"DrawEllipseOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawEllipseOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"radiusX":[{"kind":"PropertySignature","id":0,"name":"radiusX","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The horizontal radius.","tags":{}}}],"radiusY":[{"kind":"PropertySignature","id":0,"name":"radiusY","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"The vertical radius.","tags":{}}}],"start":[{"kind":"PropertySignature","id":0,"name":"start","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Starting angle.","tags":{}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the shape with color (set this to false if you only want an outline).","tags":{}}}],"gradient":[{"kind":"PropertySignature","id":0,"name":"gradient","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"TypeReference","id":0,"typeName":"Color"}]},"questionToken":true,"jsDoc":{"doc":"Use gradient instead of solid color.","tags":{"since":["v3000.0"]}}}],"resolution":[{"kind":"PropertySignature","id":0,"name":"resolution","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Multiplier for circle vertices resolution (default 1)","tags":{}}}],"anchor":[{"kind":"PropertySignature","id":0,"name":"anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Anchor"},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]},"questionToken":true,"jsDoc":{"doc":"The anchor point, or the pivot point. Default to \"topleft\".","tags":{}}}]}}]},"jsDoc":{"doc":"How the ellipse should look like.","tags":{}}}],"DrawPolygonOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"DrawPolygonOpt","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"RenderProps"},{"kind":"TypeLiteral","id":0,"members":{"pts":[{"kind":"PropertySignature","id":0,"name":"pts","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"jsDoc":{"doc":"The points that make up the polygon","tags":{}}}],"fill":[{"kind":"PropertySignature","id":0,"name":"fill","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"If fill the shape with color (set this to false if you only want an outline).","tags":{}}}],"indices":[{"kind":"PropertySignature","id":0,"name":"indices","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Manual triangulation.","tags":{}}}],"offset":[{"kind":"PropertySignature","id":0,"name":"offset","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"questionToken":true,"jsDoc":{"doc":"The center point of transformation in relation to the position.","tags":{}}}],"radius":[{"kind":"PropertySignature","id":0,"name":"radius","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"ArrayType","id":0,"elementType":{"kind":"NumberKeyword","id":0}}]},"questionToken":true,"jsDoc":{"doc":"The radius of each corner.","tags":{}}}],"colors":[{"kind":"PropertySignature","id":0,"name":"colors","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Color"}},"questionToken":true,"jsDoc":{"doc":"The color of each vertex.","tags":{"since":["v3000.0"]}}}],"uv":[{"kind":"PropertySignature","id":0,"name":"uv","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},"questionToken":true,"jsDoc":{"doc":"The uv of each vertex.","tags":{"since":["v3001.0"]}}}],"tex":[{"kind":"PropertySignature","id":0,"name":"tex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"},"questionToken":true,"jsDoc":{"doc":"The texture if uv are supplied.","tags":{"since":["v3001.0"]}}}],"triangulate":[{"kind":"PropertySignature","id":0,"name":"triangulate","type":{"kind":"BooleanKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Triangulate concave polygons.","tags":{"since":["v3001.0"]}}}]}}]},"jsDoc":{"doc":"How the polygon should look like.","tags":{}}}],"Outline":[{"kind":"InterfaceDeclaration","id":0,"name":"Outline","members":{"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"The width, or thinkness of the line.","tags":{}}}],"color":[{"kind":"PropertySignature","id":0,"name":"color","type":{"kind":"TypeReference","id":0,"typeName":"Color"},"questionToken":true,"jsDoc":{"doc":"The color of the line.","tags":{}}}],"opacity":[{"kind":"PropertySignature","id":0,"name":"opacity","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Opacity (overrides fill opacity).","tags":{"since":["v3001.0"]}}}],"join":[{"kind":"PropertySignature","id":0,"name":"join","type":{"kind":"TypeReference","id":0,"typeName":"LineJoin"},"questionToken":true,"jsDoc":{"doc":"Line join.","tags":{"since":["v3000.0"]}}}],"miterLimit":[{"kind":"PropertySignature","id":0,"name":"miterLimit","type":{"kind":"NumberKeyword","id":0},"questionToken":true,"jsDoc":{"doc":"Miter limit. If the length of the miter divided by the line width exceeds this limit, the style is converted to a bevel.","tags":{"since":["v3001.0"]}}}],"cap":[{"kind":"PropertySignature","id":0,"name":"cap","type":{"kind":"TypeReference","id":0,"typeName":"LineCap"},"questionToken":true,"jsDoc":{"doc":"Line cap.","tags":{"since":["v3001.0"]}}}]}}],"Cursor":[{"kind":"TypeAliasDeclaration","id":0,"name":"Cursor","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"auto","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"default","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"none","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"context-menu","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"help","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"pointer","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"progress","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"wait","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"cell","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"crosshair","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"text","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"vertical-text","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"alias","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"copy","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"move","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"no-drop","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"not-allowed","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"grab","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"grabbing","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"all-scroll","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"col-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"row-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"n-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"e-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"s-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"w-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ne-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"nw-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"se-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"sw-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ew-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"ns-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"nesw-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"nwse-resize","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"zoom-int","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"zoom-out","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"tags":{"group":["Draw"]}}}],"Anchor":[{"kind":"TypeAliasDeclaration","id":0,"name":"Anchor","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"topleft","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"top","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"topright","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"center","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"right","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"botleft","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"bot","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"botright","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"tags":{"group":["Draw"]}}}],"LerpValue":[{"kind":"TypeAliasDeclaration","id":0,"name":"LerpValue","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Color"}]},"jsDoc":{"tags":{"group":["Math"]}}}],"RNGValue":[{"kind":"TypeAliasDeclaration","id":0,"name":"RNGValue","type":{"kind":"UnionType","id":0,"types":[{"kind":"NumberKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Color"}]},"jsDoc":{"tags":{"group":["Math"]}}}],"Comp":[{"kind":"InterfaceDeclaration","id":0,"name":"Comp","members":{"id":[{"kind":"PropertySignature","id":0,"name":"id","type":{"kind":"TypeReference","id":0,"typeName":"Tag"},"questionToken":true,"jsDoc":{"doc":"Component ID (if left out won't be treated as a comp).","tags":{}}}],"require":[{"kind":"PropertySignature","id":0,"name":"require","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Tag"}},"questionToken":true,"jsDoc":{"doc":"What other comps this comp depends on.","tags":{}}}],"add":[{"kind":"PropertySignature","id":0,"name":"add","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Event that runs when host game obj is added to scene.","tags":{}}}],"fixedUpdate":[{"kind":"PropertySignature","id":0,"name":"fixedUpdate","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Event that runs at a fixed frame rate.","tags":{}}}],"update":[{"kind":"PropertySignature","id":0,"name":"update","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Event that runs every frame.","tags":{}}}],"draw":[{"kind":"PropertySignature","id":0,"name":"draw","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Event that runs every frame after update.","tags":{}}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Event that runs when obj is removed from scene.","tags":{}}}],"inspect":[{"kind":"PropertySignature","id":0,"name":"inspect","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},"questionToken":true,"jsDoc":{"doc":"Debug info for inspect mode.","tags":{}}}],"drawInspect":[{"kind":"PropertySignature","id":0,"name":"drawInspect","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}},"questionToken":true,"jsDoc":{"doc":"Draw debug info in inspect mode","tags":{"since":["v3000.0"]}}}]},"jsDoc":{"tags":{"group":["Components"]}}}],"GameObjID":[{"kind":"TypeAliasDeclaration","id":0,"name":"GameObjID","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"tags":{"group":["Game Obj"]}}}],"EmptyComp":[{"kind":"TypeAliasDeclaration","id":0,"name":"EmptyComp","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeLiteral","id":0,"members":{"id":[{"kind":"PropertySignature","id":0,"name":"id","type":{"kind":"StringKeyword","id":0}}]}},{"kind":"TypeReference","id":0,"typeName":"Comp"}]},"jsDoc":{"doc":"A component without own properties.","tags":{"group":["Component Types"]}}}],"Collision":[{"kind":"InterfaceDeclaration","id":0,"name":"Collision","members":{"source":[{"kind":"PropertySignature","id":0,"name":"source","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"},"jsDoc":{"doc":"The first game object in the collision.","tags":{}}}],"target":[{"kind":"PropertySignature","id":0,"name":"target","type":{"kind":"TypeReference","id":0,"typeName":"GameObj"},"jsDoc":{"doc":"The second game object in the collision.","tags":{}}}],"normal":[{"kind":"PropertySignature","id":0,"name":"normal","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The contact normal.","tags":{}}}],"distance":[{"kind":"PropertySignature","id":0,"name":"distance","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The length of the displacement.","tags":{}}}],"displacement":[{"kind":"PropertySignature","id":0,"name":"displacement","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"The displacement source game object have to make to avoid the collision.","tags":{}}}],"resolved":[{"kind":"PropertySignature","id":0,"name":"resolved","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the collision is resolved.","tags":{}}}],"preventResolution":[{"kind":"MethodSignature","id":0,"name":"preventResolution","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Prevent collision resolution if not yet resolved.","tags":{"since":["v3000.0"]}}}],"hasOverlap":[{"kind":"MethodSignature","id":0,"name":"hasOverlap","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the 2 objects have any overlap, or they're just touching edges.","tags":{"since":["v3000.0"]}}}],"reverse":[{"kind":"MethodSignature","id":0,"name":"reverse","parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Collision"},"jsDoc":{"doc":"Get a new collision with reversed source and target relationship.","tags":{}}}],"isTop":[{"kind":"MethodSignature","id":0,"name":"isTop","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the collision happened (roughly) on the top side.","tags":{}}}],"isBottom":[{"kind":"MethodSignature","id":0,"name":"isBottom","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the collision happened (roughly) on the bottom side.","tags":{}}}],"isLeft":[{"kind":"MethodSignature","id":0,"name":"isLeft","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the collision happened (roughly) on the left side.","tags":{}}}],"isRight":[{"kind":"MethodSignature","id":0,"name":"isRight","parameters":[],"type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the collision happened (roughly) on the right side.","tags":{}}}]},"jsDoc":{"doc":"Collision resolution data.","tags":{"group":["Math"]}}}],"Shape":[{"kind":"TypeAliasDeclaration","id":0,"name":"Shape","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Rect"},{"kind":"TypeReference","id":0,"typeName":"Line"},{"kind":"TypeReference","id":0,"typeName":"Point"},{"kind":"TypeReference","id":0,"typeName":"Circle"},{"kind":"TypeReference","id":0,"typeName":"Ellipse"},{"kind":"TypeReference","id":0,"typeName":"Polygon"}]},"jsDoc":{"tags":{"group":["Draw"]}}}],"Debug":[{"kind":"InterfaceDeclaration","id":0,"name":"Debug","members":{"paused":[{"kind":"PropertySignature","id":0,"name":"paused","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Pause the whole game.","tags":{}}}],"inspect":[{"kind":"PropertySignature","id":0,"name":"inspect","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Draw bounding boxes of all objects with `area()` component, hover to inspect their states.","tags":{}}}],"timeScale":[{"kind":"PropertySignature","id":0,"name":"timeScale","type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Global time scale.","tags":{}}}],"showLog":[{"kind":"PropertySignature","id":0,"name":"showLog","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"Show the debug log or not.","tags":{}}}],"fps":[{"kind":"MethodSignature","id":0,"name":"fps","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Current frames per second.","tags":{}}}],"numFrames":[{"kind":"MethodSignature","id":0,"name":"numFrames","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Total number of frames elapsed.","tags":{"since":["v3000.0"]}}}],"drawCalls":[{"kind":"MethodSignature","id":0,"name":"drawCalls","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Number of draw calls made last frame.","tags":{}}}],"stepFrame":[{"kind":"MethodSignature","id":0,"name":"stepFrame","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Step to the next frame. Useful with pausing.","tags":{}}}],"clearLog":[{"kind":"MethodSignature","id":0,"name":"clearLog","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Clear the debug log.","tags":{}}}],"log":[{"kind":"MethodSignature","id":0,"name":"log","parameters":[{"kind":"Parameter","id":0,"name":"msg","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{}}]}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Log some text to on screen debug log.","tags":{}}}],"error":[{"kind":"MethodSignature","id":0,"name":"error","parameters":[{"kind":"Parameter","id":0,"name":"msg","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{}}]}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Log an error message to on screen debug log.","tags":{}}}],"curRecording":[{"kind":"PropertySignature","id":0,"name":"curRecording","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Recording"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"The recording handle if currently in recording mode.","tags":{"since":["v2000.1"]}}}],"numObjects":[{"kind":"MethodSignature","id":0,"name":"numObjects","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Get total number of objects.","tags":{"since":["v3001.0"]}}}]},"jsDoc":{"tags":{"group":["Debug"]}}}],"Mask":[{"kind":"TypeAliasDeclaration","id":0,"name":"Mask","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"intersect","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"subtract","hasExtendedUnicodeEscape":false}}]}}],"Edge":[{"kind":"TypeAliasDeclaration","id":0,"name":"Edge","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"left","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"right","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"top","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"bottom","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"EdgeMask":[{"kind":"EnumDeclaration","id":0,"name":"EdgeMask","members":{"None":[{"kind":"EnumMember","id":0,"name":"None","initializer":{"kind":"FirstLiteralToken","id":0,"text":"0","numericLiteralFlags":0}}],"Left":[{"kind":"EnumMember","id":0,"name":"Left","initializer":{"kind":"FirstLiteralToken","id":0,"text":"1","numericLiteralFlags":0}}],"Top":[{"kind":"EnumMember","id":0,"name":"Top","initializer":{"kind":"FirstLiteralToken","id":0,"text":"2","numericLiteralFlags":0}}],"LeftTop":[{"kind":"EnumMember","id":0,"name":"LeftTop","initializer":{"kind":"FirstLiteralToken","id":0,"text":"3","numericLiteralFlags":0}}],"Right":[{"kind":"EnumMember","id":0,"name":"Right","initializer":{"kind":"FirstLiteralToken","id":0,"text":"4","numericLiteralFlags":0}}],"Horizontal":[{"kind":"EnumMember","id":0,"name":"Horizontal","initializer":{"kind":"FirstLiteralToken","id":0,"text":"5","numericLiteralFlags":0}}],"RightTop":[{"kind":"EnumMember","id":0,"name":"RightTop","initializer":{"kind":"FirstLiteralToken","id":0,"text":"6","numericLiteralFlags":0}}],"HorizontalTop":[{"kind":"EnumMember","id":0,"name":"HorizontalTop","initializer":{"kind":"FirstLiteralToken","id":0,"text":"7","numericLiteralFlags":0}}],"Bottom":[{"kind":"EnumMember","id":0,"name":"Bottom","initializer":{"kind":"FirstLiteralToken","id":0,"text":"8","numericLiteralFlags":0}}],"LeftBottom":[{"kind":"EnumMember","id":0,"name":"LeftBottom","initializer":{"kind":"FirstLiteralToken","id":0,"text":"9","numericLiteralFlags":0}}],"Vertical":[{"kind":"EnumMember","id":0,"name":"Vertical","initializer":{"kind":"FirstLiteralToken","id":0,"text":"10","numericLiteralFlags":0}}],"LeftVertical":[{"kind":"EnumMember","id":0,"name":"LeftVertical","initializer":{"kind":"FirstLiteralToken","id":0,"text":"11","numericLiteralFlags":0}}],"RightBottom":[{"kind":"EnumMember","id":0,"name":"RightBottom","initializer":{"kind":"FirstLiteralToken","id":0,"text":"12","numericLiteralFlags":0}}],"HorizontalBottom":[{"kind":"EnumMember","id":0,"name":"HorizontalBottom","initializer":{"kind":"FirstLiteralToken","id":0,"text":"13","numericLiteralFlags":0}}],"RightVertical":[{"kind":"EnumMember","id":0,"name":"RightVertical","initializer":{"kind":"FirstLiteralToken","id":0,"text":"14","numericLiteralFlags":0}}],"All":[{"kind":"EnumMember","id":0,"name":"All","initializer":{"kind":"FirstLiteralToken","id":0,"text":"15","numericLiteralFlags":0}}]},"jsDoc":{"tags":{"group":["Math"]}}}],"LevelComp":[{"kind":"InterfaceDeclaration","id":0,"name":"LevelComp","heritageClauses":[{"kind":"HeritageClause","id":0,"token":96,"types":[{"kind":"ExpressionWithTypeArguments","id":0,"expression":{"kind":"Identifier","id":0,"escapedText":"Comp"}}]}],"members":{"tileWidth":[{"kind":"MethodSignature","id":0,"name":"tileWidth","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"tileHeight":[{"kind":"MethodSignature","id":0,"name":"tileHeight","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"numRows":[{"kind":"MethodSignature","id":0,"name":"numRows","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"numColumns":[{"kind":"MethodSignature","id":0,"name":"numColumns","parameters":[],"type":{"kind":"NumberKeyword","id":0}}],"spawn":[{"kind":"MethodSignature","id":0,"name":"spawn","parameters":[{"kind":"Parameter","id":0,"name":"sym","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObj"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Spawn a tile from a symbol defined previously.","tags":{}}},{"kind":"MethodSignature","id":0,"name":"spawn","parameters":[{"kind":"Parameter","id":0,"name":"sym","type":{"kind":"StringKeyword","id":0}},{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObj"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}},{"kind":"MethodSignature","id":0,"name":"spawn","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"obj","type":{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}},{"kind":"Parameter","id":0,"name":"p","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Spawn a tile from a component list.","tags":{"returns":["The spawned game object, or null if the obj hasn't components."]}}},{"kind":"MethodSignature","id":0,"name":"spawn","typeParameters":[{"kind":"TypeParameter","id":0,"name":"T"}],"parameters":[{"kind":"Parameter","id":0,"name":"sym","type":{"kind":"TypeReference","id":0,"typeName":"CompList","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]}},{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"T"}]},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"levelWidth":[{"kind":"MethodSignature","id":0,"name":"levelWidth","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Total width of level in pixels.","tags":{}}}],"levelHeight":[{"kind":"MethodSignature","id":0,"name":"levelHeight","parameters":[],"type":{"kind":"NumberKeyword","id":0},"jsDoc":{"doc":"Total height of level in pixels.","tags":{}}}],"getAt":[{"kind":"MethodSignature","id":0,"name":"getAt","parameters":[{"kind":"Parameter","id":0,"name":"tilePos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}},"jsDoc":{"doc":"Get all game objects that's currently inside a given tile.","tags":{}}}],"raycast":[{"kind":"MethodSignature","id":0,"name":"raycast","parameters":[{"kind":"Parameter","id":0,"name":"origin","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"direction","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"RaycastResult"},"jsDoc":{"doc":"Raycast all game objects on the given path.","tags":{}}}],"tile2Pos":[{"kind":"MethodSignature","id":0,"name":"tile2Pos","parameters":[{"kind":"Parameter","id":0,"name":"tilePos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Convert tile position to pixel position.","tags":{}}},{"kind":"MethodSignature","id":0,"name":"tile2Pos","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"pos2Tile":[{"kind":"MethodSignature","id":0,"name":"pos2Tile","parameters":[{"kind":"Parameter","id":0,"name":"pos","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"},"jsDoc":{"doc":"Convert pixel position to tile position.","tags":{}}},{"kind":"MethodSignature","id":0,"name":"pos2Tile","parameters":[{"kind":"Parameter","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}},{"kind":"Parameter","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"getTilePath":[{"kind":"MethodSignature","id":0,"name":"getTilePath","parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"opts","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"PathFindOpt"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Find the path to navigate from one tile to another tile.","tags":{"returns":["A list of traverse points in tile positions."]}}}],"getPath":[{"kind":"MethodSignature","id":0,"name":"getPath","parameters":[{"kind":"Parameter","id":0,"name":"from","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"to","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"Parameter","id":0,"name":"opts","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"PathFindOpt"}}],"type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Vec2"}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]},"jsDoc":{"doc":"Find the path to navigate from one tile to another tile.","tags":{"returns":["A list of traverse points in pixel positions."]}}}],"getSpatialMap":[{"kind":"MethodSignature","id":0,"name":"getSpatialMap","parameters":[],"type":{"kind":"ArrayType","id":0,"elementType":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"GameObj"}}}}],"onSpatialMapChanged":[{"kind":"MethodSignature","id":0,"name":"onSpatialMapChanged","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"onNavigationMapInvalid":[{"kind":"MethodSignature","id":0,"name":"onNavigationMapInvalid","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}],"invalidateNavigationMap":[{"kind":"MethodSignature","id":0,"name":"invalidateNavigationMap","parameters":[],"type":{"kind":"VoidKeyword","id":0}}],"onNavigationMapChanged":[{"kind":"MethodSignature","id":0,"name":"onNavigationMapChanged","parameters":[{"kind":"Parameter","id":0,"name":"cb","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"KEventController"}}]},"jsDoc":{"doc":"A level component.","tags":{"group":["Component Types"]}}}],"PathFindOpt":[{"kind":"TypeAliasDeclaration","id":0,"name":"PathFindOpt","type":{"kind":"TypeLiteral","id":0,"members":{"allowDiagonals":[{"kind":"PropertySignature","id":0,"name":"allowDiagonals","type":{"kind":"BooleanKeyword","id":0},"questionToken":true}]}},"jsDoc":{"tags":{"group":["Options"]}}}],"EaseFuncs":[{"kind":"TypeAliasDeclaration","id":0,"name":"EaseFuncs","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"linear","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInSine","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutSine","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutSine","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInQuad","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutQuad","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutQuad","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInCubic","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutCubic","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutCubic","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInQuart","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutQuart","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutQuart","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInQuint","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutQuint","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutQuint","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInExpo","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutExpo","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutExpo","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInCirc","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutCirc","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutCirc","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInBack","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutBack","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutBack","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInElastic","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutElastic","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutElastic","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInBounce","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeOutBounce","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"easeInOutBounce","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"The list of easing functions available.","tags":{"group":["Math"]}}}],"EaseFunc":[{"kind":"TypeAliasDeclaration","id":0,"name":"EaseFunc","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"t","type":{"kind":"NumberKeyword","id":0}}],"type":{"kind":"NumberKeyword","id":0}},"jsDoc":{"doc":"A function that takes a time value and returns a new time value.","tags":{"group":["Math"]}}}],"TimerController":[{"kind":"TypeAliasDeclaration","id":0,"name":"TimerController","type":{"kind":"TypeLiteral","id":0,"members":{"paused":[{"kind":"PropertySignature","id":0,"name":"paused","type":{"kind":"BooleanKeyword","id":0},"jsDoc":{"doc":"If the event handler is paused.","tags":{}}}],"cancel":[{"kind":"MethodSignature","id":0,"name":"cancel","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Cancel the event handler.","tags":{}}}],"onEnd":[{"kind":"MethodSignature","id":0,"name":"onEnd","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Register an event when finished.","tags":{}}}],"then":[{"kind":"MethodSignature","id":0,"name":"then","parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"type":{"kind":"TypeReference","id":0,"typeName":"TimerController"}}]}},"jsDoc":{"tags":{"group":["Timer"]}}}],"TweenController":[{"kind":"TypeAliasDeclaration","id":0,"name":"TweenController","type":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"TimerController"},{"kind":"TypeLiteral","id":0,"members":{"finish":[{"kind":"MethodSignature","id":0,"name":"finish","parameters":[],"type":{"kind":"VoidKeyword","id":0},"jsDoc":{"doc":"Finish the tween now and cancel.","tags":{}}}]}}]},"jsDoc":{"doc":"Event controller for tween.","tags":{"group":["Timer"]}}}],"SpriteCurAnim":[{"kind":"InterfaceDeclaration","id":0,"name":"SpriteCurAnim","members":{"timer":[{"kind":"PropertySignature","id":0,"name":"timer","type":{"kind":"NumberKeyword","id":0}}],"loop":[{"kind":"PropertySignature","id":0,"name":"loop","type":{"kind":"BooleanKeyword","id":0}}],"speed":[{"kind":"PropertySignature","id":0,"name":"speed","type":{"kind":"NumberKeyword","id":0}}],"pingpong":[{"kind":"PropertySignature","id":0,"name":"pingpong","type":{"kind":"BooleanKeyword","id":0}}],"onEnd":[{"kind":"PropertySignature","id":0,"name":"onEnd","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}]}}],"ButtonBinding":[{"kind":"TypeAliasDeclaration","id":0,"name":"ButtonBinding","type":{"kind":"TypeLiteral","id":0,"members":{"keyboard":[{"kind":"PropertySignature","id":0,"name":"keyboard","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Key"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Key"}}]},"questionToken":true}],"gamepad":[{"kind":"PropertySignature","id":0,"name":"gamepad","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"KGamepadButton"}}]},"questionToken":true}],"mouse":[{"kind":"PropertySignature","id":0,"name":"mouse","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"},{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"MouseButton"}}]},"questionToken":true}]}},"jsDoc":{"doc":"A button binding.","tags":{"group":["Button Bindings"]}}}],"ButtonsDef":[{"kind":"TypeAliasDeclaration","id":0,"name":"ButtonsDef","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"ButtonBinding"}]},"jsDoc":{"doc":"A buttons definition for an action (jump, walk-left, run).","tags":{"group":["Button Bindings"]}}}],"ButtonBindingDevice":[{"kind":"TypeAliasDeclaration","id":0,"name":"ButtonBindingDevice","type":{"kind":"UnionType","id":0,"types":[{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"keyboard","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"gamepad","hasExtendedUnicodeEscape":false}},{"kind":"LiteralType","id":0,"literal":{"kind":"StringLiteral","id":0,"text":"mouse","hasExtendedUnicodeEscape":false}}]},"jsDoc":{"doc":"A button binding device","tags":{"group":["Button Bindings"]}}}],"initAppGfx":[{"kind":"FunctionDeclaration","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initAppGfx","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"gopt","type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYOpt"}},{"kind":"Parameter","id":0,"name":"ggl","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"type":{"kind":"TypeLiteral","id":0,"members":{"lastDrawCalls":[{"kind":"PropertySignature","id":0,"name":"lastDrawCalls","type":{"kind":"NumberKeyword","id":0}}],"ggl":[{"kind":"PropertySignature","id":0,"name":"ggl","type":{"kind":"TypeLiteral","id":0,"members":{"gl":[{"kind":"PropertySignature","id":0,"name":"gl","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderingContext"}}],"opts":[{"kind":"PropertySignature","id":0,"name":"opts","type":{"kind":"TypeLiteral","id":0,"members":{"texFilter":[{"kind":"PropertySignature","id":0,"name":"texFilter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}]}}}],"onDestroy":[{"kind":"PropertySignature","id":0,"name":"onDestroy","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"UnknownKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushTexture2D":[{"kind":"PropertySignature","id":0,"name":"pushTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLTexture"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popTexture2D":[{"kind":"PropertySignature","id":0,"name":"popTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushFramebuffer":[{"kind":"PropertySignature","id":0,"name":"pushFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLFramebuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popFramebuffer":[{"kind":"PropertySignature","id":0,"name":"popFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"pushRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderbuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"popRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushViewport":[{"kind":"PropertySignature","id":0,"name":"pushViewport","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"w":[{"kind":"PropertySignature","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertySignature","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}]}}}],"type":{"kind":"VoidKeyword","id":0}}}],"popViewport":[{"kind":"PropertySignature","id":0,"name":"popViewport","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushProgram":[{"kind":"PropertySignature","id":0,"name":"pushProgram","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLProgram"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popProgram":[{"kind":"PropertySignature","id":0,"name":"popProgram","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"setVertexFormat":[{"kind":"PropertySignature","id":0,"name":"setVertexFormat","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"fmt","type":{"kind":"TypeReference","id":0,"typeName":"VertexFormat"}}],"type":{"kind":"VoidKeyword","id":0}}}]}}}],"defShader":[{"kind":"PropertySignature","id":0,"name":"defShader","type":{"kind":"TypeReference","id":0,"typeName":"Shader"}}],"defTex":[{"kind":"PropertySignature","id":0,"name":"defTex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"frameBuffer":[{"kind":"PropertySignature","id":0,"name":"frameBuffer","type":{"kind":"TypeReference","id":0,"typeName":"FrameBuffer"}}],"postShader":[{"kind":"PropertySignature","id":0,"name":"postShader","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"postShaderUniform":[{"kind":"PropertySignature","id":0,"name":"postShaderUniform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Uniform"},{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"renderer":[{"kind":"PropertySignature","id":0,"name":"renderer","type":{"kind":"TypeReference","id":0,"typeName":"BatchRenderer"}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"transformStack":[{"kind":"PropertySignature","id":0,"name":"transformStack","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}}],"bgTex":[{"kind":"PropertySignature","id":0,"name":"bgTex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"bgColor":[{"kind":"PropertySignature","id":0,"name":"bgColor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"bgAlpha":[{"kind":"PropertySignature","id":0,"name":"bgAlpha","type":{"kind":"NumberKeyword","id":0}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"viewport":[{"kind":"PropertySignature","id":0,"name":"viewport","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}]}}}],"fixed":[{"kind":"PropertySignature","id":0,"name":"fixed","type":{"kind":"BooleanKeyword","id":0}}]}}}}]},"name":"initAppGfx","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"gopt","type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYOpt"}},{"kind":"Parameter","id":0,"name":"ggl","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"type":{"kind":"TypeLiteral","id":0,"members":{"lastDrawCalls":[{"kind":"PropertySignature","id":0,"name":"lastDrawCalls","type":{"kind":"NumberKeyword","id":0}}],"ggl":[{"kind":"PropertySignature","id":0,"name":"ggl","type":{"kind":"TypeLiteral","id":0,"members":{"gl":[{"kind":"PropertySignature","id":0,"name":"gl","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderingContext"}}],"opts":[{"kind":"PropertySignature","id":0,"name":"opts","type":{"kind":"TypeLiteral","id":0,"members":{"texFilter":[{"kind":"PropertySignature","id":0,"name":"texFilter","type":{"kind":"TypeReference","id":0,"typeName":"TexFilter"},"questionToken":true}]}}}],"onDestroy":[{"kind":"PropertySignature","id":0,"name":"onDestroy","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"action","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"UnknownKeyword","id":0}}}],"type":{"kind":"VoidKeyword","id":0}}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushTexture2D":[{"kind":"PropertySignature","id":0,"name":"pushTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLTexture"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popTexture2D":[{"kind":"PropertySignature","id":0,"name":"popTexture2D","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"pushElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLBuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popElementArrayBuffer":[{"kind":"PropertySignature","id":0,"name":"popElementArrayBuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushFramebuffer":[{"kind":"PropertySignature","id":0,"name":"pushFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLFramebuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popFramebuffer":[{"kind":"PropertySignature","id":0,"name":"popFramebuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"pushRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLRenderbuffer"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popRenderbuffer":[{"kind":"PropertySignature","id":0,"name":"popRenderbuffer","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushViewport":[{"kind":"PropertySignature","id":0,"name":"pushViewport","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"w":[{"kind":"PropertySignature","id":0,"name":"w","type":{"kind":"NumberKeyword","id":0}}],"h":[{"kind":"PropertySignature","id":0,"name":"h","type":{"kind":"NumberKeyword","id":0}}]}}}],"type":{"kind":"VoidKeyword","id":0}}}],"popViewport":[{"kind":"PropertySignature","id":0,"name":"popViewport","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"pushProgram":[{"kind":"PropertySignature","id":0,"name":"pushProgram","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"item","type":{"kind":"TypeReference","id":0,"typeName":"WebGLProgram"}}],"type":{"kind":"VoidKeyword","id":0}}}],"popProgram":[{"kind":"PropertySignature","id":0,"name":"popProgram","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"VoidKeyword","id":0}}}],"setVertexFormat":[{"kind":"PropertySignature","id":0,"name":"setVertexFormat","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"fmt","type":{"kind":"TypeReference","id":0,"typeName":"VertexFormat"}}],"type":{"kind":"VoidKeyword","id":0}}}]}}}],"defShader":[{"kind":"PropertySignature","id":0,"name":"defShader","type":{"kind":"TypeReference","id":0,"typeName":"Shader"}}],"defTex":[{"kind":"PropertySignature","id":0,"name":"defTex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"frameBuffer":[{"kind":"PropertySignature","id":0,"name":"frameBuffer","type":{"kind":"TypeReference","id":0,"typeName":"FrameBuffer"}}],"postShader":[{"kind":"PropertySignature","id":0,"name":"postShader","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"postShaderUniform":[{"kind":"PropertySignature","id":0,"name":"postShaderUniform","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Uniform"},{"kind":"ParenthesizedType","id":0,"type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeReference","id":0,"typeName":"Uniform"}}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"renderer":[{"kind":"PropertySignature","id":0,"name":"renderer","type":{"kind":"TypeReference","id":0,"typeName":"BatchRenderer"}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}],"transformStack":[{"kind":"PropertySignature","id":0,"name":"transformStack","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}}],"bgTex":[{"kind":"PropertySignature","id":0,"name":"bgTex","type":{"kind":"TypeReference","id":0,"typeName":"Texture"}}],"bgColor":[{"kind":"PropertySignature","id":0,"name":"bgColor","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Color"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"bgAlpha":[{"kind":"PropertySignature","id":0,"name":"bgAlpha","type":{"kind":"NumberKeyword","id":0}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}],"viewport":[{"kind":"PropertySignature","id":0,"name":"viewport","type":{"kind":"TypeLiteral","id":0,"members":{"x":[{"kind":"PropertySignature","id":0,"name":"x","type":{"kind":"NumberKeyword","id":0}}],"y":[{"kind":"PropertySignature","id":0,"name":"y","type":{"kind":"NumberKeyword","id":0}}],"width":[{"kind":"PropertySignature","id":0,"name":"width","type":{"kind":"NumberKeyword","id":0}}],"height":[{"kind":"PropertySignature","id":0,"name":"height","type":{"kind":"NumberKeyword","id":0}}]}}}],"fixed":[{"kind":"PropertySignature","id":0,"name":"fixed","type":{"kind":"BooleanKeyword","id":0}}]}}}}],"initAssets":[{"kind":"FunctionDeclaration","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initAssets","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"ggl","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"type":{"kind":"TypeLiteral","id":0,"members":{"urlPrefix":[{"kind":"PropertySignature","id":0,"name":"urlPrefix","type":{"kind":"StringKeyword","id":0}}],"sprites":[{"kind":"PropertySignature","id":0,"name":"sprites","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}}],"fonts":[{"kind":"PropertySignature","id":0,"name":"fonts","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"FontData"}]}}],"bitmapFonts":[{"kind":"PropertySignature","id":0,"name":"bitmapFonts","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GfxFont"}]}}],"sounds":[{"kind":"PropertySignature","id":0,"name":"sounds","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]}}],"shaders":[{"kind":"PropertySignature","id":0,"name":"shaders","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Shader"}]}}],"custom":[{"kind":"PropertySignature","id":0,"name":"custom","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"AnyKeyword","id":0}]}}],"music":[{"kind":"PropertySignature","id":0,"name":"music","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"StringKeyword","id":0}]}}],"packer":[{"kind":"PropertySignature","id":0,"name":"packer","type":{"kind":"TypeReference","id":0,"typeName":"TexPacker"}}],"loaded":[{"kind":"PropertySignature","id":0,"name":"loaded","type":{"kind":"BooleanKeyword","id":0}}]}}}}]},"name":"initAssets","type":{"kind":"FunctionType","id":0,"parameters":[{"kind":"Parameter","id":0,"name":"ggl","type":{"kind":"TypeReference","id":0,"typeName":"GfxCtx"}}],"type":{"kind":"TypeLiteral","id":0,"members":{"urlPrefix":[{"kind":"PropertySignature","id":0,"name":"urlPrefix","type":{"kind":"StringKeyword","id":0}}],"sprites":[{"kind":"PropertySignature","id":0,"name":"sprites","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SpriteData"}]}}],"fonts":[{"kind":"PropertySignature","id":0,"name":"fonts","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"FontData"}]}}],"bitmapFonts":[{"kind":"PropertySignature","id":0,"name":"bitmapFonts","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GfxFont"}]}}],"sounds":[{"kind":"PropertySignature","id":0,"name":"sounds","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SoundData"}]}}],"shaders":[{"kind":"PropertySignature","id":0,"name":"shaders","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"Shader"}]}}],"custom":[{"kind":"PropertySignature","id":0,"name":"custom","type":{"kind":"TypeReference","id":0,"typeName":"AssetBucket","typeArguments":[{"kind":"AnyKeyword","id":0}]}}],"music":[{"kind":"PropertySignature","id":0,"name":"music","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"StringKeyword","id":0},{"kind":"StringKeyword","id":0}]}}],"packer":[{"kind":"PropertySignature","id":0,"name":"packer","type":{"kind":"TypeReference","id":0,"typeName":"TexPacker"}}],"loaded":[{"kind":"PropertySignature","id":0,"name":"loaded","type":{"kind":"BooleanKeyword","id":0}}]}}}}],"initAudio":[{"kind":"FunctionDeclaration","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initAudio","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"ctx":[{"kind":"PropertySignature","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"AudioContext"}}],"masterNode":[{"kind":"PropertySignature","id":0,"name":"masterNode","type":{"kind":"TypeReference","id":0,"typeName":"GainNode"}}],"burpSnd":[{"kind":"PropertySignature","id":0,"name":"burpSnd","type":{"kind":"TypeReference","id":0,"typeName":"SoundData"}}]}}}}]},"name":"initAudio","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"ctx":[{"kind":"PropertySignature","id":0,"name":"ctx","type":{"kind":"TypeReference","id":0,"typeName":"AudioContext"}}],"masterNode":[{"kind":"PropertySignature","id":0,"name":"masterNode","type":{"kind":"TypeReference","id":0,"typeName":"GainNode"}}],"burpSnd":[{"kind":"PropertySignature","id":0,"name":"burpSnd","type":{"kind":"TypeReference","id":0,"typeName":"SoundData"}}]}}}}],"initGame":[{"kind":"FunctionDeclaration","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"initGame","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"events":[{"kind":"PropertySignature","id":0,"name":"events","type":{"kind":"TypeReference","id":0,"typeName":"KEventHandler","typeArguments":[{"kind":"TypeLiteral","id":0,"members":{"mouseMove":[{"kind":"PropertySignature","id":0,"name":"mouseMove","type":{"kind":"TupleType","id":0,"elements":[]}}],"mouseDown":[{"kind":"PropertySignature","id":0,"name":"mouseDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"mousePress":[{"kind":"PropertySignature","id":0,"name":"mousePress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"mouseRelease":[{"kind":"PropertySignature","id":0,"name":"mouseRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"charInput":[{"kind":"PropertySignature","id":0,"name":"charInput","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"keyPress":[{"kind":"PropertySignature","id":0,"name":"keyPress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyDown":[{"kind":"PropertySignature","id":0,"name":"keyDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyPressRepeat":[{"kind":"PropertySignature","id":0,"name":"keyPressRepeat","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyRelease":[{"kind":"PropertySignature","id":0,"name":"keyRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"touchStart":[{"kind":"PropertySignature","id":0,"name":"touchStart","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"touchMove":[{"kind":"PropertySignature","id":0,"name":"touchMove","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"touchEnd":[{"kind":"PropertySignature","id":0,"name":"touchEnd","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"gamepadButtonDown":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadButtonPress":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonPress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadButtonRelease":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadStick":[{"kind":"PropertySignature","id":0,"name":"gamepadStick","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"gamepadConnect":[{"kind":"PropertySignature","id":0,"name":"gamepadConnect","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Gamepad"}]}}],"gamepadDisconnect":[{"kind":"PropertySignature","id":0,"name":"gamepadDisconnect","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Gamepad"}]}}],"scroll":[{"kind":"PropertySignature","id":0,"name":"scroll","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"add":[{"kind":"PropertySignature","id":0,"name":"add","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"GameObj"}]}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"GameObj"}]}}],"load":[{"kind":"PropertySignature","id":0,"name":"load","type":{"kind":"TupleType","id":0,"elements":[]}}],"loading":[{"kind":"PropertySignature","id":0,"name":"loading","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0}]}}],"error":[{"kind":"PropertySignature","id":0,"name":"error","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Error"}]}}],"input":[{"kind":"PropertySignature","id":0,"name":"input","type":{"kind":"TupleType","id":0,"elements":[]}}],"frameEnd":[{"kind":"PropertySignature","id":0,"name":"frameEnd","type":{"kind":"TupleType","id":0,"elements":[]}}],"resize":[{"kind":"PropertySignature","id":0,"name":"resize","type":{"kind":"TupleType","id":0,"elements":[]}}],"sceneLeave":[{"kind":"PropertySignature","id":0,"name":"sceneLeave","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}]}}]}}],"objEvents":[{"kind":"PropertySignature","id":0,"name":"objEvents","type":{"kind":"TypeReference","id":0,"typeName":"KEventHandler","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GameObjEventMap"}]}}],"root":[{"kind":"PropertySignature","id":0,"name":"root","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TimerComp"}]}}],"gravity":[{"kind":"PropertySignature","id":0,"name":"gravity","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"scenes":[{"kind":"PropertySignature","id":0,"name":"scenes","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SceneName"},{"kind":"TypeReference","id":0,"typeName":"SceneDef"}]}}],"currentScene":[{"kind":"PropertySignature","id":0,"name":"currentScene","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"SceneName"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"layers":[{"kind":"PropertySignature","id":0,"name":"layers","type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"defaultLayerIndex":[{"kind":"PropertySignature","id":0,"name":"defaultLayerIndex","type":{"kind":"NumberKeyword","id":0}}],"logs":[{"kind":"PropertySignature","id":0,"name":"logs","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeLiteral","id":0,"members":{"msg":[{"kind":"PropertySignature","id":0,"name":"msg","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{}}]}}],"time":[{"kind":"PropertySignature","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}}]}}}}],"cam":[{"kind":"PropertySignature","id":0,"name":"cam","type":{"kind":"TypeLiteral","id":0,"members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"shake":[{"kind":"PropertySignature","id":0,"name":"shake","type":{"kind":"NumberKeyword","id":0}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}]}}}]}}}}]},"name":"initGame","type":{"kind":"FunctionType","id":0,"parameters":[],"type":{"kind":"TypeLiteral","id":0,"members":{"events":[{"kind":"PropertySignature","id":0,"name":"events","type":{"kind":"TypeReference","id":0,"typeName":"KEventHandler","typeArguments":[{"kind":"TypeLiteral","id":0,"members":{"mouseMove":[{"kind":"PropertySignature","id":0,"name":"mouseMove","type":{"kind":"TupleType","id":0,"elements":[]}}],"mouseDown":[{"kind":"PropertySignature","id":0,"name":"mouseDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"mousePress":[{"kind":"PropertySignature","id":0,"name":"mousePress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"mouseRelease":[{"kind":"PropertySignature","id":0,"name":"mouseRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"MouseButton"}]}}],"charInput":[{"kind":"PropertySignature","id":0,"name":"charInput","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"keyPress":[{"kind":"PropertySignature","id":0,"name":"keyPress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyDown":[{"kind":"PropertySignature","id":0,"name":"keyDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyPressRepeat":[{"kind":"PropertySignature","id":0,"name":"keyPressRepeat","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"keyRelease":[{"kind":"PropertySignature","id":0,"name":"keyRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Key"}]}}],"touchStart":[{"kind":"PropertySignature","id":0,"name":"touchStart","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"touchMove":[{"kind":"PropertySignature","id":0,"name":"touchMove","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"touchEnd":[{"kind":"PropertySignature","id":0,"name":"touchEnd","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"TypeReference","id":0,"typeName":"Touch"}]}}],"gamepadButtonDown":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonDown","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadButtonPress":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonPress","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadButtonRelease":[{"kind":"PropertySignature","id":0,"name":"gamepadButtonRelease","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}],"gamepadStick":[{"kind":"PropertySignature","id":0,"name":"gamepadStick","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0},{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"gamepadConnect":[{"kind":"PropertySignature","id":0,"name":"gamepadConnect","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Gamepad"}]}}],"gamepadDisconnect":[{"kind":"PropertySignature","id":0,"name":"gamepadDisconnect","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Gamepad"}]}}],"scroll":[{"kind":"PropertySignature","id":0,"name":"scroll","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Vec2"}]}}],"add":[{"kind":"PropertySignature","id":0,"name":"add","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"GameObj"}]}}],"destroy":[{"kind":"PropertySignature","id":0,"name":"destroy","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"GameObj"}]}}],"load":[{"kind":"PropertySignature","id":0,"name":"load","type":{"kind":"TupleType","id":0,"elements":[]}}],"loading":[{"kind":"PropertySignature","id":0,"name":"loading","type":{"kind":"TupleType","id":0,"elements":[{"kind":"NumberKeyword","id":0}]}}],"error":[{"kind":"PropertySignature","id":0,"name":"error","type":{"kind":"TupleType","id":0,"elements":[{"kind":"TypeReference","id":0,"typeName":"Error"}]}}],"input":[{"kind":"PropertySignature","id":0,"name":"input","type":{"kind":"TupleType","id":0,"elements":[]}}],"frameEnd":[{"kind":"PropertySignature","id":0,"name":"frameEnd","type":{"kind":"TupleType","id":0,"elements":[]}}],"resize":[{"kind":"PropertySignature","id":0,"name":"resize","type":{"kind":"TupleType","id":0,"elements":[]}}],"sceneLeave":[{"kind":"PropertySignature","id":0,"name":"sceneLeave","type":{"kind":"TupleType","id":0,"elements":[{"kind":"StringKeyword","id":0}]}}]}}]}}],"objEvents":[{"kind":"PropertySignature","id":0,"name":"objEvents","type":{"kind":"TypeReference","id":0,"typeName":"KEventHandler","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"GameObjEventMap"}]}}],"root":[{"kind":"PropertySignature","id":0,"name":"root","type":{"kind":"TypeReference","id":0,"typeName":"GameObj","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TimerComp"}]}}],"gravity":[{"kind":"PropertySignature","id":0,"name":"gravity","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"scenes":[{"kind":"PropertySignature","id":0,"name":"scenes","type":{"kind":"TypeReference","id":0,"typeName":"Record","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"SceneName"},{"kind":"TypeReference","id":0,"typeName":"SceneDef"}]}}],"currentScene":[{"kind":"PropertySignature","id":0,"name":"currentScene","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"SceneName"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"layers":[{"kind":"PropertySignature","id":0,"name":"layers","type":{"kind":"UnionType","id":0,"types":[{"kind":"ArrayType","id":0,"elementType":{"kind":"StringKeyword","id":0}},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"defaultLayerIndex":[{"kind":"PropertySignature","id":0,"name":"defaultLayerIndex","type":{"kind":"NumberKeyword","id":0}}],"logs":[{"kind":"PropertySignature","id":0,"name":"logs","type":{"kind":"ArrayType","id":0,"elementType":{"kind":"TypeLiteral","id":0,"members":{"msg":[{"kind":"PropertySignature","id":0,"name":"msg","type":{"kind":"UnionType","id":0,"types":[{"kind":"StringKeyword","id":0},{"kind":"TypeLiteral","id":0,"members":{}}]}}],"time":[{"kind":"PropertySignature","id":0,"name":"time","type":{"kind":"NumberKeyword","id":0}}]}}}}],"cam":[{"kind":"PropertySignature","id":0,"name":"cam","type":{"kind":"TypeLiteral","id":0,"members":{"pos":[{"kind":"PropertySignature","id":0,"name":"pos","type":{"kind":"UnionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"Vec2"},{"kind":"LiteralType","id":0,"literal":{"kind":"NullKeyword","id":0}}]}}],"scale":[{"kind":"PropertySignature","id":0,"name":"scale","type":{"kind":"TypeReference","id":0,"typeName":"Vec2"}}],"angle":[{"kind":"PropertySignature","id":0,"name":"angle","type":{"kind":"NumberKeyword","id":0}}],"shake":[{"kind":"PropertySignature","id":0,"name":"shake","type":{"kind":"NumberKeyword","id":0}}],"transform":[{"kind":"PropertySignature","id":0,"name":"transform","type":{"kind":"TypeReference","id":0,"typeName":"Mat4"}}]}}}]}}}}],"kaplay":[{"kind":"FunctionDeclaration","id":0,"declarationList":{"kind":"VariableDeclarationList","id":0,"declarations":[{"kind":"VariableDeclaration","id":0,"name":"kaplay","type":{"kind":"FunctionType","id":0,"typeParameters":[{"kind":"TypeParameter","id":0,"name":"TPlugins","constraint":{"kind":"TypeReference","id":0,"typeName":"PluginList","typeArguments":[{"kind":"UnknownKeyword","id":0}]},"default":{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]}},{"kind":"TypeParameter","id":0,"name":"TButtons","constraint":{"kind":"TypeReference","id":0,"typeName":"ButtonsDef"},"default":{"kind":"TypeLiteral","id":0,"members":{}}},{"kind":"TypeParameter","id":0,"name":"TButtonsName","constraint":{"kind":"StringKeyword","id":0},"default":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"TButtons"}},{"kind":"StringKeyword","id":0}]}}],"parameters":[{"kind":"Parameter","id":0,"name":"gopt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYOpt","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TPlugins"},{"kind":"TypeReference","id":0,"typeName":"TButtons"}]}}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"TPlugins"},"extendsType":{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]},"trueType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TButtons"},{"kind":"TypeReference","id":0,"typeName":"TButtonsName"}]},"falseType":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TButtons"},{"kind":"TypeReference","id":0,"typeName":"TButtonsName"}]},{"kind":"TypeReference","id":0,"typeName":"MergePlugins","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TPlugins"}]}]}}}}]},"jsDoc":{"doc":"Initialize KAPLAY context. The starting point of all KAPLAY games.","tags":{"example":["```js\n// Start KAPLAY with default options (will create a fullscreen canvas under )\nkaplay()\n\n// Init with some options\nkaplay({\n width: 320,\n height: 240,\n font: \"sans-serif\",\n canvas: document.querySelector(\"#mycanvas\"),\n background: [ 0, 0, 255, ],\n})\n\n// All KAPLAY functions are imported to global after calling kaplay()\nadd()\nonUpdate()\nonKeyPress()\nvec2()\n\n// If you want to prevent KAPLAY from importing all functions to global and use a context handle for all KAPLAY functions\nconst k = kaplay({ global: false })\n\nk.add(...)\nk.onUpdate(...)\nk.onKeyPress(...)\nk.vec2(...)\n```"],"group":["Start"]}},"name":"kaplay","type":{"kind":"FunctionType","id":0,"typeParameters":[{"kind":"TypeParameter","id":0,"name":"TPlugins","constraint":{"kind":"TypeReference","id":0,"typeName":"PluginList","typeArguments":[{"kind":"UnknownKeyword","id":0}]},"default":{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]}},{"kind":"TypeParameter","id":0,"name":"TButtons","constraint":{"kind":"TypeReference","id":0,"typeName":"ButtonsDef"},"default":{"kind":"TypeLiteral","id":0,"members":{}}},{"kind":"TypeParameter","id":0,"name":"TButtonsName","constraint":{"kind":"StringKeyword","id":0},"default":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeOperator","id":0,"operator":143,"type":{"kind":"TypeReference","id":0,"typeName":"TButtons"}},{"kind":"StringKeyword","id":0}]}}],"parameters":[{"kind":"Parameter","id":0,"name":"gopt","questionToken":true,"type":{"kind":"TypeReference","id":0,"typeName":"KAPLAYOpt","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TPlugins"},{"kind":"TypeReference","id":0,"typeName":"TButtons"}]}}],"type":{"kind":"ConditionalType","id":0,"checkType":{"kind":"TypeReference","id":0,"typeName":"TPlugins"},"extendsType":{"kind":"TupleType","id":0,"elements":[{"kind":"UndefinedKeyword","id":0}]},"trueType":{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TButtons"},{"kind":"TypeReference","id":0,"typeName":"TButtonsName"}]},"falseType":{"kind":"IntersectionType","id":0,"types":[{"kind":"TypeReference","id":0,"typeName":"KAPLAYCtx","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TButtons"},{"kind":"TypeReference","id":0,"typeName":"TButtonsName"}]},{"kind":"TypeReference","id":0,"typeName":"MergePlugins","typeArguments":[{"kind":"TypeReference","id":0,"typeName":"TPlugins"}]}]}}}}]},"groups":{"Start":{"name":"Start","entries":["kaplay","quit","KAPLAYOpt"]},"Assets":{"name":"Assets","entries":["loadRoot","loadSprite","loadSpriteAtlas","loadAseprite","loadPedit","loadBean","loadJSON","loadSound","loadMusic","loadFont","loadBitmapFont","loadShader","loadShaderURL","load","loadProgress","getSprite","getSound","getFont","getBitmapFont","getShader","getAsset","Asset","SpriteData","SoundData"]},"Game Obj":{"name":"Game Obj","entries":["add","make","readd","get","query","destroy","destroyAll","GameObjRaw","GameObj","GameObjID"]},"Components":{"name":"Components","entries":["pos","scale","rotate","color","opacity","sprite","text","polygon","rect","circle","uvquad","area","anchor","z","layer","outline","body","surfaceEffector","areaEffector","pointEffector","buoyancyEffector","constantForce","doubleJump","move","offscreen","follow","shader","textInput","timer","fixed","stay","health","lifespan","named","state","fadeIn","mask","tile","agent","animate","sentry","patrol","navigation","Comp"]},"Component Types":{"name":"Component Types","entries":["CircleComp","CircleCompOpt","ColorComp","MaskComp","OpacityComp","OutlineComp","PolygonComp","PolygonCompOpt","RectComp","RectCompOpt","ShaderComp","SpriteComp","SpriteCompOpt","TextComp","TextCompOpt","UVQuadComp","AgentComp","AgentCompOpt","FixedComp","PosComp","SentryComp","SentryCompOpt","TileComp","TileCompOpt","HealthComp","LifespanCompOpt","NamedComp","StateComp","StayComp","TextInputComp","TimerComp","AreaComp","AreaCompOpt","BodyComp","BodyCompOpt","DoubleJumpComp","AnchorComp","FollowComp","LayerComp","OffScreenComp","OffScreenCompOpt","RotateComp","ScaleComp","ZComp","MergeComps","CompList","EmptyComp","LevelComp"]},"Scene":{"name":"Scene","entries":["getSceneName","scene","go","layers"]},"Input":{"name":"Input","entries":["onGamepadConnect","onGamepadDisconnect","onClick","onKeyDown","onKeyPress","onKeyPressRepeat","onKeyRelease","onCharInput","onMouseDown","onMousePress","onMouseRelease","onMouseMove","onTouchStart","onTouchMove","onTouchEnd","onScroll","onGamepadButtonDown","onGamepadButtonPress","onGamepadButtonRelease","onGamepadStick","onButtonPress","onButtonRelease","onButtonDown","isTouchscreen","mousePos","mouseDeltaPos","isKeyDown","isKeyPressed","isKeyPressedRepeat","isKeyReleased","isMouseDown","isMousePressed","isMouseReleased","isMouseMoved","isGamepadButtonPressed","isGamepadButtonDown","isGamepadButtonReleased","isButtonPressed","isButtonDown","isButtonReleased","getButton","setButton","getGamepadStick","charInputted","Key","MouseButton","KGamepadButton","GamepadStick"]},"Events":{"name":"Events","entries":["KEventController","GameObjEventMap","on","onUpdate","onDraw","onAdd","onDestroy","onLoad","onLoading","onError","onResize","onCleanup","onCollide","onCollideUpdate","onCollideEnd","onHover","onHoverUpdate","onHoverEnd","onHide","onShow","onSceneLeave","KEvent","KEventHandler","KEventController"]},"Info":{"name":"Info","entries":["width","getTreeRoot","height","center","dt","fixedDt","restDt","time","isFocused","shake","camPos","camScale","camRot","camFlash","camTransform","toScreen","toWorld","setGravity","getGravity","setBackground","getBackground","getGamepads","setCursor","getCursor","setCursorLocked","isCursorLocked","setFullscreen","isFullscreen","canvas","VERSION"]},"Timer":{"name":"Timer","entries":["wait","loop","TimerController","TweenController"]},"Math":{"name":"Math","entries":["Color","Vec2Args","Vec2","Quad","Mat4","RNG","ShapeType","RaycastHit","RaycastResult","Line","Rect","Circle","Ellipse","Polygon","UniformValue","UniformKey","Uniform","raycast","rand","randi","randSeed","vec2","rgb","hsl2rgb","quad","choose","chooseMultiple","shuffle","chance","lerp","tween","easings","easingSteps","easingLinear","easingCubicBezier","map","mapc","wave","deg2rad","rad2deg","clamp","evaluateQuadratic","evaluateQuadraticFirstDerivative","evaluateQuadraticSecondDerivative","evaluateBezier","evaluateBezierFirstDerivative","evaluateBezierSecondDerivative","evaluateCatmullRom","evaluateCatmullRomFirstDerivative","curveLengthApproximation","normalizedCurve","testLinePoint","testLineLine","testLineCircle","testRectRect","testRectLine","testRectPoint","testCirclePolygon","isConvex","triangulate","NavMesh","Point","Line","Rect","Circle","Ellipse","Polygon","Vec2","Color","Mat4","Quad","RNG","LerpValue","RNGValue","Collision","Edge","EdgeMask","EaseFuncs","EaseFunc"]},"Misc":{"name":"Misc","entries":["GfxCtx","Texture","VertexFormat","BatchRenderer","Mesh","initGfx","RGBValue","RGBAValue","ColorArgs","Mat2","Point","StepPosition","DrawCurveOpt","DrawBezierOpt","DrawCircleOpt","GfxFont","BitmapFontData","LoadBitmapFontOpt","FontData","CharTransformFunc","FormattedText","FormattedChar","DrawLineOpt","LineJoin","LineCap","DrawLinesOpt","DrawRectOpt","Graph","Grid","NavEdge","NavPolygon","NavMesh","DrawSpriteOpt","DrawTriangleOpt","ShaderData","AppGfxCtx","TexPacker","SoundData","SpriteAnim","SpriteAnims","LoadSpriteOpt","NineSlice","LoadSpriteSrc","SpriteData","Asset","AssetBucket","AssetsCtx","AsepriteData","PeditFile","SpriteAtlasData","SpriteAtlasEntry","AudioCtx","BinaryHeap","Registry","KEvent","KEventHandler","AudioPlayOpt","AudioPlay","EmitterOpt","ParticlesOpt","ParticlesComp","NavigationMapComp","NavigationMapCompOpt","NavigationComp","NavigationCompOpt","PatrolComp","PatrolEndBehavior","PatrolCompOpt","SentryCandidatesCb","SentryCandidates","TimeDirection","Interpolation","AnimateOpt","AnimateCompOpt","BaseValues","AnimateComp","AnimationChannelKeys","AnimationOptions","AnimationChannel","SurfaceEffectorCompOpt","SurfaceEffectorComp","AreaEffectorCompOpt","AreaEffectorComp","ForceMode","PointEffectorCompOpt","PointEffectorComp","ConstantForceCompOpt","ConstantForceComp","BuoyancyEffectorCompOpt","BuoyancyEffectorComp","GameObjEventNames","TupleWithoutFirst","SceneName","SceneDef","Game","addKaboom","Tag","UnionToIntersection","Defined","Expand","MergeObj","MergePlugins","PluginList","GamepadDef","KGamePad","GameObjInspect","SpriteAnimPlayOpt","MusicData","LoadFontOpt","TextureOpt","ImageSource","Canvas","Vertex","TexFilter","TexWrap","RenderProps","DrawTextureOpt","DrawUVQuadOpt","DrawEllipseOpt","DrawPolygonOpt","Outline","Mask","SpriteCurAnim","initAppGfx","initAssets","initAudio","initGame"]},"GFX":{"name":"GFX","entries":["FrameBuffer","Shader"]},"Draw":{"name":"Draw","entries":["DrawTextOpt","TextAlign","drawSprite","drawText","drawRect","drawLine","drawLines","drawCurve","drawBezier","drawTriangle","drawCircle","drawEllipse","drawPolygon","drawUVQuad","drawFormattedText","drawMasked","drawSubtracted","pushTransform","popTransform","pushTranslate","pushScale","pushRotate","pushMatrix","usePostEffect","formatText","makeCanvas","Cursor","Anchor","Shape"]},"Options":{"name":"Options","entries":["CharTransform","BoomOpt","LevelOpt","GetOpt","QueryOpt","PathFindOpt"]},"Audio":{"name":"Audio","entries":["play","burp","volume","audioCtx"]},"Level":{"name":"Level","entries":["addLevel"]},"Data":{"name":"Data","entries":["getData","setData","screenshot","download","downloadText","downloadJSON","downloadBlob","record","Recording"]},"Debug":{"name":"Debug","entries":["debug","Debug"]},"Plugins":{"name":"Plugins","entries":["plug","KAPLAYPlugin"]},"Constants":{"name":"Constants","entries":["ASCII_CHARS","LEFT","RIGHT","UP","DOWN","RED","GREEN","BLUE","YELLOW","MAGENTA","CYAN","WHITE","BLACK"]},"Button Bindings":{"name":"Button Bindings","entries":["ButtonBinding","ButtonsDef","ButtonBindingDevice"]}}} \ No newline at end of file diff --git a/scripts/buildDoc.js b/scripts/buildDoc.js index 218b01c..1c5f4d7 100644 --- a/scripts/buildDoc.js +++ b/scripts/buildDoc.js @@ -223,3 +223,11 @@ await fs.writeFile( groups: sortedGroups, }), ); + +await fs.writeFile( + "public/doc.json", + JSON.stringify({ + types, + groups: sortedGroups, + }), +);