├── .gitattributes ├── screenshot.gif ├── docs ├── game2048.wasm ├── index.html └── game2048.js ├── config.nelua ├── README.md ├── game2048.nelua └── raylib.nelua /.gitattributes: -------------------------------------------------------------------------------- 1 | *.nelua text eol=lf linguist-language=lua 2 | -------------------------------------------------------------------------------- /screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edubart/nelua-game2048/HEAD/screenshot.gif -------------------------------------------------------------------------------- /docs/game2048.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edubart/nelua-game2048/HEAD/docs/game2048.wasm -------------------------------------------------------------------------------- /config.nelua: -------------------------------------------------------------------------------- 1 | ##[[ 2 | local compiler = require 'nelua.ccompiler' 3 | if compiler.get_cc_info().is_emscripten then 4 | PLATFORM_WEB = true 5 | primtypes.integer = primtypes.int32 6 | primtypes.uinteger = primtypes.uint32 7 | primtypes.number = primtypes.float32 8 | cflags '-Oz -fno-plt -flto' 9 | cflags '-DGRAPHICS_API_OPENGL_ES2' 10 | cflags '-s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s TOTAL_MEMORY=16777216' 11 | cflags '-I/home/bart/apps/raylib/src /home/bart/apps/raylib/build.web/src/libraylib.bc' 12 | else 13 | linklib 'raylib' 14 | end 15 | ]] 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 2048 Game Clone in Nelua 2 | 3 | ![Screenshot](https://raw.githubusercontent.com/edubart/nelua-game2048/master/screenshot.gif) 4 | 5 | Play in your browser at https://edubart.github.io/nelua-game2048/ 6 | 7 | This an experimental clone of the [2048 game](https://play2048.co/) using 8 | [Nelua](https://github.com/edubart/nelua-lang) and 9 | [Raylib](https://www.raylib.com/). Made mainly for checking out raylib in practice. 10 | 11 | Raylib bindings from [raylib-nelua](https://github.com/Andre-LA/raylib-nelua-mirror) are used, 12 | thanks to @Andre-LA. 13 | 14 | ## Running 15 | 16 | You must have both Nelua and latest Raylib installed and working. 17 | 18 | To run simple do `nelua game2048.nelua` 19 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Nelua Game 2048 7 | 108 | 109 | 110 | 111 |
112 |
Downloading...
113 |
114 | 115 | 116 | 118 | 119 |
120 | 121 |
122 | 123 |
124 | 125 |
126 | 127 |
128 | 129 |
130 |

131 | Developed in 132 | Nelua 133 | programming language using 134 | Raylib game library. 135 |

136 |

137 | Check out the game sources at GitHub repository. 138 |

139 |
140 | 141 | 218 | 219 | 220 | 221 | 222 | 223 | -------------------------------------------------------------------------------- /game2048.nelua: -------------------------------------------------------------------------------- 1 | require 'config' 2 | require 'raylib' 3 | require 'math' 4 | require 'string' 5 | require 'vector' 6 | 7 | -- Compile time constants 8 | local SCREEN_WIDTH = 600 9 | local SCREEN_HEIGH = 800 10 | local TILEMAP_WIDTH = 512 11 | local TILEMAP_OFFSET: Vector2 = { 12 | (SCREEN_WIDTH - TILEMAP_WIDTH) // 2, 13 | SCREEN_HEIGH - TILEMAP_WIDTH - (SCREEN_WIDTH - TILEMAP_WIDTH) // 2 14 | } 15 | local TILE_SPACING = 12 16 | local TILE_COUNT = 4 17 | local TILE_WIDTH = (TILEMAP_WIDTH - (TILE_COUNT+1)*TILE_SPACING) // TILE_COUNT 18 | local NEWBUTTON_RECT: Rectangle = {SCREEN_WIDTH - 128 - 44, 48 + 128, 128, 48} 19 | 20 | -- Timer 21 | local frametime = GetTime() 22 | local Timer = @record { started: number, duration: number } 23 | function Timer:elapsed(): number 24 | return frametime - self.started 25 | end 26 | function Timer:delay(delay: number) 27 | self.started = self.started + delay 28 | end 29 | function Timer:progress(): number 30 | if self.duration == 0 then return 1.0 end 31 | return math.min(self:elapsed() / self.duration, 1.0) 32 | end 33 | function Timer:finished(): boolean 34 | if self.duration == 0 then return false end 35 | return (frametime - self.started) >= self.duration 36 | end 37 | function Timer:restart() 38 | self.started = frametime 39 | end 40 | function Timer.create(duration: number): Timer 41 | return Timer{frametime, duration} 42 | end 43 | function Timer.create_delayed(duration: number, delay: number): Timer 44 | return Timer{frametime + delay, duration} 45 | end 46 | 47 | -- TileAnim 48 | local TileAnimKind = @enum { NONE=0, MOVE, RAISE, MERGE} 49 | local TileAnim = @record { 50 | kind: TileAnimKind, 51 | n: integer, 52 | timer: Timer, 53 | movepos: Vector2 54 | } 55 | function TileAnim.createMove(n: integer, duration: number, movepos: Vector2): TileAnim 56 | return TileAnim{kind = TileAnimKind.MOVE, n=n, timer=Timer.create(duration), movepos = movepos} 57 | end 58 | function TileAnim.createRaise(n: integer, duration: number): TileAnim 59 | return TileAnim{kind = TileAnimKind.RAISE, n=n, timer=Timer.create(duration)} 60 | end 61 | function TileAnim.createMerge(n: integer, duration: number, delay: number): TileAnim 62 | return TileAnim{kind = TileAnimKind.MERGE, n=n, timer=Timer.create_delayed(duration, delay)} 63 | end 64 | 65 | -- Game variables 66 | local TileMap = @[TILE_COUNT][TILE_COUNT]integer 67 | local tiles: TileMap 68 | local AnimTileMap = @[TILE_COUNT][TILE_COUNT]vector(TileAnim) 69 | local tileanims: AnimTileMap 70 | local statetimer: Timer 71 | local score: integer 72 | local GameState = @enum{ IDLE=0, NEW, SPAWNING, SLIDING } 73 | local gamestate: GameState 74 | local notify: record{text:string, timer:Timer} 75 | 76 | local function set_game_state(state: GameState, duration: number) 77 | gamestate = state 78 | statetimer = Timer.create(duration) 79 | end 80 | 81 | local function clear_animations() 82 | for x=0,TILE_COUNT-1 do 83 | for y=0,TILE_COUNT-1 do 84 | tileanims[x][y]:clear() 85 | end 86 | end 87 | end 88 | 89 | local function get_random_avaiable_tile(): (integer, integer) 90 | local availables: [(TILE_COUNT*TILE_COUNT)]record{x: integer, y: integer} 91 | local index = 0 92 | for x=0,TILE_COUNT-1 do 93 | for y=0,TILE_COUNT-1 do 94 | if tiles[x][y] == 0 then 95 | availables[index] = {x, y} 96 | index = index + 1 97 | end 98 | end 99 | end 100 | if index == 0 then return -1, -1 end 101 | index = math.random(0, index-1) 102 | return availables[index].x, availables[index].y 103 | end 104 | 105 | local function spawn_tile(duration: number) 106 | local x, y = get_random_avaiable_tile() 107 | if x == -1 then return end 108 | tiles[x][y] = 1 109 | tileanims[x][y]:push(TileAnim.createRaise(1, duration)) 110 | end 111 | 112 | local function destroy_animations() 113 | for x=0,TILE_COUNT-1 do 114 | for y=0,TILE_COUNT-1 do 115 | tileanims[x][y]:destroy() 116 | end 117 | end 118 | end 119 | 120 | local function destroy_notify() 121 | notify.text:destroy() 122 | notify = {} 123 | end 124 | 125 | local function reset_game() 126 | local NEW_DURATION = 0.1 127 | tiles = (@TileMap)() 128 | destroy_animations() 129 | destroy_notify() 130 | score = 0 131 | statetimer = {} 132 | spawn_tile(NEW_DURATION) 133 | spawn_tile(NEW_DURATION) 134 | set_game_state(GameState.NEW, NEW_DURATION) 135 | end 136 | 137 | local function slide_tiles(keydir: integer) 138 | local SLIDE_DURATION = 0.1 139 | local MERGE_DURATION = 0.2 140 | local slidden = false 141 | local addscore = 0 142 | clear_animations() 143 | 144 | ## function macro_process_tile() 145 | local n = tiles[x][y] 146 | local movepos: Vector2 = {x, y} 147 | tileanims[x][y]:push(TileAnim.createMove(n, SLIDE_DURATION, movepos)) 148 | if n > 0 then 149 | local nn = n 150 | if ln == n then 151 | nn = n + 1 152 | addscore = addscore + (1 << nn) 153 | ln = 0 154 | else 155 | ln = n 156 | lx = lx + lxs 157 | ly = ly + lys 158 | end 159 | if y ~= ly or x ~= lx then 160 | tileanims[x][y][0].movepos = {lx, ly} 161 | tiles[x][y] = 0 162 | tiles[lx][ly] = nn 163 | if n ~= nn then 164 | tileanims[lx][ly]:push(TileAnim.createMerge(nn, MERGE_DURATION, SLIDE_DURATION)) 165 | end 166 | slidden = true 167 | end 168 | end 169 | ## end 170 | 171 | if keydir == KeyboardKey.KEY_UP then 172 | local lxs, lys = 0, 1 173 | for x=0,TILE_COUNT-1,1 do 174 | local lx, ly, ln = x, -1, 0 175 | for y=0,TILE_COUNT-1,1 do 176 | ## macro_process_tile() 177 | end 178 | end 179 | elseif keydir == KeyboardKey.KEY_DOWN then 180 | local lxs, lys = 0, -1 181 | for x=0,TILE_COUNT-1 do 182 | local lx, ly, ln = x, TILE_COUNT, 0 183 | for y=TILE_COUNT-1,0,-1 do 184 | ## macro_process_tile() 185 | end 186 | end 187 | elseif keydir == KeyboardKey.KEY_LEFT then 188 | local lxs, lys = 1, 0 189 | for y=0,TILE_COUNT-1 do 190 | local lx, ly, ln = -1, y, 0 191 | for x=0,TILE_COUNT-1,1 do 192 | ## macro_process_tile() 193 | end 194 | end 195 | elseif keydir == KeyboardKey.KEY_RIGHT then 196 | local lxs, lys = -1, 0 197 | for y=0,TILE_COUNT-1 do 198 | local lx, ly, ln = TILE_COUNT, y, 0 199 | for x=TILE_COUNT-1,0,-1 do 200 | ## macro_process_tile() 201 | end 202 | end 203 | end 204 | 205 | if slidden then 206 | set_game_state(GameState.SLIDING, SLIDE_DURATION) 207 | else 208 | clear_animations() 209 | end 210 | 211 | if addscore > 0 then 212 | score = score + addscore 213 | destroy_notify() 214 | notify = {string.format('+%d', addscore), Timer.create(1.0)} 215 | end 216 | end 217 | 218 | local function get_tile_rect(x: number, y: number): Rectangle 219 | return (@Rectangle){ 220 | TILEMAP_OFFSET.x + (x+1)*TILE_SPACING + x*TILE_WIDTH, 221 | TILEMAP_OFFSET.y + (y+1)*TILE_SPACING + y*TILE_WIDTH, 222 | TILE_WIDTH, TILE_WIDTH} 223 | end 224 | 225 | local function draw_boxed_text(text: string, rect: Rectangle, fontsize: integer, fgcolor: Color) 226 | if #text == 0 then return end 227 | local font = GetFontDefault() 228 | local spacing = math.ceil(fontsize / 20) 229 | local textsize = MeasureTextEx(font, text, fontsize, spacing) 230 | local pos: Vector2 = { rect.x + (rect.width - textsize.x) // 2, 231 | rect.y + (rect.height - textsize.y) // 2 } 232 | DrawTextEx(font, text, pos, fontsize, spacing, fgcolor) 233 | end 234 | 235 | local function draw_tiles_grid() 236 | local bgrect: Rectangle = { TILEMAP_OFFSET.x, TILEMAP_OFFSET.y, TILEMAP_WIDTH, TILEMAP_WIDTH } 237 | DrawRectangleRec(bgrect, GetColor(0xBBADA0FF)) 238 | for i=0,TILE_COUNT-1 do 239 | for j=0,TILE_COUNT-1 do 240 | DrawRectangleRec(get_tile_rect(i, j), GetColor(0xCDC1B4FF)) 241 | end 242 | end 243 | end 244 | 245 | local TILE_COLORS: [10]record{fg: Color, bg: Color} = { 246 | {fg=GetColor(0x776E65FF), bg=GetColor(0xEEE4DAFF)}, -- 2 247 | {fg=GetColor(0x776E65FF), bg=GetColor(0xEDE0C8FF)}, -- 4 248 | {fg=GetColor(0xFFFFFFFF), bg=GetColor(0xF59563FF)}, -- 16 249 | {fg=GetColor(0xFFFFFFFF), bg=GetColor(0xF67C5FFF)}, -- 32 250 | {fg=GetColor(0xFFFFFFFF), bg=GetColor(0xF65E3BFF)}, -- 64 251 | {fg=GetColor(0xFFFFFFFF), bg=GetColor(0xEDCF72FF)}, -- 128 252 | {fg=GetColor(0xFFFFFFFF), bg=GetColor(0xEDCC61FF)}, -- 256 253 | {fg=GetColor(0xFFFFFFFF), bg=GetColor(0xEDC850FF)}, -- 512 254 | {fg=GetColor(0xFFFFFFFF), bg=GetColor(0xDDB513FF)}, -- 1024 255 | {fg=GetColor(0xFFFFFFFF), bg=GetColor(0xEDC22EFF)} -- 2048 256 | } 257 | 258 | local function scale_rect(rect: Rectangle, scale: number): Rectangle 259 | local newrect: Rectangle 260 | newrect.width = rect.width * scale 261 | newrect.height = rect.height * scale 262 | newrect.x = rect.x + (rect.width - newrect.width) / 2 263 | newrect.y = rect.y + (rect.height - newrect.height) / 2 264 | return newrect 265 | end 266 | 267 | local function draw_tile(x: number, y: number, num: integer, scale: number, opacity: number) 268 | if num == 0 then return end 269 | local color = TILE_COLORS[(num-1) % #TILE_COLORS] 270 | local rect = scale_rect(get_tile_rect(x, y), scale) 271 | local fontsize = (@integer)(math.ceil(8*scale))*5 272 | DrawRectangleRec(rect, Fade(color.bg, opacity)) 273 | local tiletext = tostring(1 << num) 274 | draw_boxed_text(tiletext, rect, fontsize, Fade(color.fg, opacity)) 275 | tiletext:destroy() 276 | end 277 | 278 | local function ease_in_back(x: number): number 279 | return (1.70158+1)*x*x*x - 1.70158*x*x 280 | end 281 | local function ease_out_back(x: number): number 282 | return 1-ease_in_back(1-x) 283 | end 284 | 285 | local function draw_tiles() 286 | for x=0,TILE_COUNT-1 do 287 | for y=0,TILE_COUNT-1 do 288 | local opacity = 1 289 | local scale = 1 290 | local pos: Vector2 = {x, y} 291 | local num = tiles[x][y] 292 | local animcount = #tileanims[x][y] 293 | if animcount > 0 then 294 | for i=0,animcount-1 do 295 | local anim = &tileanims[x][y][i] 296 | if not anim.timer:finished() then 297 | num = anim.n 298 | local fact = anim.timer:progress() 299 | if anim.kind == TileAnimKind.MOVE then 300 | pos = pos*(1-fact) + anim.movepos * fact 301 | elseif anim.kind == TileAnimKind.RAISE then 302 | opacity = fact*fact 303 | elseif anim.kind == TileAnimKind.MERGE then 304 | scale = ease_out_back(fact) 305 | end 306 | break 307 | end 308 | end 309 | end 310 | draw_tile(pos.x, pos.y, num, scale, opacity) 311 | end 312 | end 313 | end 314 | 315 | local function draw_title() 316 | draw_boxed_text('2048', {44, 44, 200, 128}, 80, GetColor(0x776E65FF)) 317 | end 318 | 319 | local function draw_score() 320 | local rect: Rectangle = {SCREEN_WIDTH - 128 - 44, 48, 128, 96} 321 | local titlerect: Rectangle = {rect.x, rect.y + 8, rect.width, 20} 322 | local textrect: Rectangle = {rect.x, rect.y + 8, rect.width, rect.height} 323 | DrawRectangleRec(rect, GetColor(0xBBADA0FF)) 324 | draw_boxed_text('Score', titlerect, 20, GetColor(0xEEE4DAFF)) 325 | local scoretext = tostring(score) 326 | draw_boxed_text(scoretext, textrect, 40, RAYWHITE) 327 | scoretext:destroy() 328 | end 329 | 330 | local function draw_buttons() 331 | DrawRectangleRec(NEWBUTTON_RECT, GetColor(0x8F7A66FF)) 332 | draw_boxed_text('New Game', NEWBUTTON_RECT, 20, RAYWHITE) 333 | end 334 | 335 | local function draw_notifications() 336 | if notify.timer:finished() then return end 337 | local f = notify.timer:progress() 338 | local opacity = 1 - f*f 339 | local rect: Rectangle = {SCREEN_WIDTH//2, 128 - f * 128, 128, 96} 340 | draw_boxed_text(notify.text, rect, 60, Fade(BLACK, opacity)) 341 | end 342 | 343 | local function draw() 344 | BeginDrawing() 345 | ClearBackground(GetColor(0xFAF8EFFF)) 346 | draw_tiles_grid() 347 | draw_tiles() 348 | draw_title() 349 | draw_score() 350 | draw_buttons() 351 | draw_notifications() 352 | EndDrawing() 353 | end 354 | 355 | local function check_slide(gesture: cint) 356 | if gamestate == GameState.SLIDING or gamestate == GameState.NEW then return end 357 | if IsKeyPressed(KeyboardKey.KEY_UP) or gesture == GESTURE_SWIPE_UP then 358 | slide_tiles(KeyboardKey.KEY_UP) 359 | elseif IsKeyPressed(KeyboardKey.KEY_DOWN) or gesture == GESTURE_SWIPE_DOWN then 360 | slide_tiles(KeyboardKey.KEY_DOWN) 361 | elseif IsKeyPressed(KeyboardKey.KEY_LEFT) or gesture == GESTURE_SWIPE_LEFT then 362 | slide_tiles(KeyboardKey.KEY_LEFT) 363 | elseif IsKeyPressed(KeyboardKey.KEY_RIGHT) or gesture == GESTURE_SWIPE_RIGHT then 364 | slide_tiles(KeyboardKey.KEY_RIGHT) 365 | end 366 | end 367 | 368 | local function check_newgame(gesture: cint) 369 | if gesture == GESTURE_TAP and 370 | CheckCollisionPointRec(GetTouchPosition(0), NEWBUTTON_RECT) then 371 | reset_game() 372 | end 373 | end 374 | 375 | local function update() 376 | local gesture = GetGestureDetected() 377 | check_slide(gesture) 378 | check_newgame(gesture) 379 | 380 | if statetimer:finished() then 381 | if gamestate == GameState.SLIDING then 382 | local SPAWN_DURATION = 0.1 383 | spawn_tile(SPAWN_DURATION) 384 | set_game_state(GameState.SPAWNING, SPAWN_DURATION) 385 | elseif gamestate == GameState.SPAWNING or gamestate == GameState.NEW then 386 | clear_animations() 387 | set_game_state(GameState.IDLE, 0) 388 | end 389 | end 390 | end 391 | 392 | local function frame() 393 | frametime = GetTime() 394 | update() 395 | draw() 396 | 397 | ## if PLATFORM_WEB and not pragmas.nogc then 398 | gc:run() -- safe to collect garbage here 399 | ## end 400 | end 401 | 402 | local function init() 403 | ## if PLATFORM_WEB and not pragmas.nogc then 404 | gc:pause() -- conservative GCs cannot run automatically with emscripten 405 | ## end 406 | 407 | -- SetTargetFPS is not allowed on web 408 | ## if not PLATFORM_WEB then 409 | SetTargetFPS(60) 410 | ## end 411 | 412 | SetGesturesEnabled(GESTURE_SWIPE_UP | GESTURE_SWIPE_DOWN | 413 | GESTURE_SWIPE_LEFT | GESTURE_SWIPE_RIGHT | 414 | GESTURE_TAP) 415 | InitWindow(SCREEN_WIDTH, SCREEN_HEIGH, "2048 Game") 416 | frametime = GetTime() 417 | reset_game() 418 | end 419 | 420 | local function terminate() 421 | destroy_animations() 422 | destroy_notify() 423 | CloseWindow() 424 | end 425 | 426 | -- Setup Window and Game 427 | init() 428 | 429 | -- Main game loop 430 | ## if PLATFORM_WEB then 431 | local function emscripten_set_main_loop(func: function(), fps: cint, infloop: cint) ',nodecl> end 432 | emscripten_set_main_loop(frame, 0, 1) 433 | ## else 434 | repeat 435 | frame() 436 | until WindowShouldClose() 437 | ## end 438 | 439 | -- Cleanup 440 | terminate() 441 | -------------------------------------------------------------------------------- /raylib.nelua: -------------------------------------------------------------------------------- 1 | ##[[ 2 | cinclude '' 3 | cinclude '' 4 | linklib 'raylib' 5 | if ccinfo.is_windows then 6 | linklib 'glfw3' 7 | else 8 | linklib 'glfw' 9 | end 10 | ]] 11 | global Vector2: type = @record{ 12 | x: float32, 13 | y: float32 14 | } 15 | global Vector3: type = @record{ 16 | x: float32, 17 | y: float32, 18 | z: float32 19 | } 20 | global Vector4: type = @record{ 21 | x: float32, 22 | y: float32, 23 | z: float32, 24 | w: float32 25 | } 26 | global Quaternion: type = @Vector4 27 | global Matrix: type = @record{ 28 | m0: float32, 29 | m4: float32, 30 | m8: float32, 31 | m12: float32, 32 | m1: float32, 33 | m5: float32, 34 | m9: float32, 35 | m13: float32, 36 | m2: float32, 37 | m6: float32, 38 | m10: float32, 39 | m14: float32, 40 | m3: float32, 41 | m7: float32, 42 | m11: float32, 43 | m15: float32 44 | } 45 | global Color: type = @record{ 46 | r: cuchar, 47 | g: cuchar, 48 | b: cuchar, 49 | a: cuchar 50 | } 51 | global Rectangle: type = @record{ 52 | x: float32, 53 | y: float32, 54 | width: float32, 55 | height: float32 56 | } 57 | global Image: type = @record{ 58 | data: pointer, 59 | width: cint, 60 | height: cint, 61 | mipmaps: cint, 62 | format: cint 63 | } 64 | global Texture: type = @record{ 65 | id: cuint, 66 | width: cint, 67 | height: cint, 68 | mipmaps: cint, 69 | format: cint 70 | } 71 | global Texture2D: type = @Texture 72 | global TextureCubemap: type = @Texture 73 | global RenderTexture: type = @record{ 74 | id: cuint, 75 | texture: Texture, 76 | depth: Texture 77 | } 78 | global RenderTexture2D: type = @RenderTexture 79 | global NPatchInfo: type = @record{ 80 | source: Rectangle, 81 | left: cint, 82 | top: cint, 83 | right: cint, 84 | bottom: cint, 85 | layout: cint 86 | } 87 | global GlyphInfo: type = @record{ 88 | value: cint, 89 | offsetX: cint, 90 | offsetY: cint, 91 | advanceX: cint, 92 | image: Image 93 | } 94 | global Font: type = @record{ 95 | baseSize: cint, 96 | glyphCount: cint, 97 | glyphPadding: cint, 98 | texture: Texture2D, 99 | recs: *Rectangle, 100 | glyphs: *GlyphInfo 101 | } 102 | global Camera3D: type = @record{ 103 | position: Vector3, 104 | target: Vector3, 105 | up: Vector3, 106 | fovy: float32, 107 | projection: cint 108 | } 109 | global Camera: type = @Camera3D 110 | global Camera2D: type = @record{ 111 | offset: Vector2, 112 | target: Vector2, 113 | rotation: float32, 114 | zoom: float32 115 | } 116 | global Mesh: type = @record{ 117 | vertexCount: cint, 118 | triangleCount: cint, 119 | vertices: *float32, 120 | texcoords: *float32, 121 | texcoords2: *float32, 122 | normals: *float32, 123 | tangents: *float32, 124 | colors: *cuchar, 125 | indices: *cushort, 126 | animVertices: *float32, 127 | animNormals: *float32, 128 | boneIds: *cuchar, 129 | boneWeights: *float32, 130 | vaoId: cuint, 131 | vboId: *cuint 132 | } 133 | global Shader: type = @record{ 134 | id: cuint, 135 | locs: *cint 136 | } 137 | global MaterialMap: type = @record{ 138 | texture: Texture2D, 139 | color: Color, 140 | value: float32 141 | } 142 | global Material: type = @record{ 143 | shader: Shader, 144 | maps: *MaterialMap, 145 | params: [4]float32 146 | } 147 | global Transform: type = @record{ 148 | translation: Vector3, 149 | rotation: Quaternion, 150 | scale: Vector3 151 | } 152 | global BoneInfo: type = @record{ 153 | name: [32]cchar, 154 | parent: cint 155 | } 156 | global Model: type = @record{ 157 | transform: Matrix, 158 | meshCount: cint, 159 | materialCount: cint, 160 | meshes: *Mesh, 161 | materials: *Material, 162 | meshMaterial: *cint, 163 | boneCount: cint, 164 | bones: *BoneInfo, 165 | bindPose: *Transform 166 | } 167 | global ModelAnimation: type = @record{ 168 | boneCount: cint, 169 | frameCount: cint, 170 | bones: *BoneInfo, 171 | framePoses: **Transform 172 | } 173 | global Ray: type = @record{ 174 | position: Vector3, 175 | direction: Vector3 176 | } 177 | global RayCollision: type = @record{ 178 | hit: boolean, 179 | distance: float32, 180 | point: Vector3, 181 | normal: Vector3 182 | } 183 | global BoundingBox: type = @record{ 184 | min: Vector3, 185 | max: Vector3 186 | } 187 | global Wave: type = @record{ 188 | frameCount: cuint, 189 | sampleRate: cuint, 190 | sampleSize: cuint, 191 | channels: cuint, 192 | data: pointer 193 | } 194 | global rAudioBuffer: type = @record{} 195 | global AudioStream: type = @record{ 196 | buffer: *rAudioBuffer, 197 | sampleRate: cuint, 198 | sampleSize: cuint, 199 | channels: cuint 200 | } 201 | global Sound: type = @record{ 202 | stream: AudioStream, 203 | frameCount: cuint 204 | } 205 | global Music: type = @record{ 206 | stream: AudioStream, 207 | frameCount: cuint, 208 | looping: boolean, 209 | ctxType: cint, 210 | ctxData: pointer 211 | } 212 | global VrDeviceInfo: type = @record{ 213 | hResolution: cint, 214 | vResolution: cint, 215 | hScreenSize: float32, 216 | vScreenSize: float32, 217 | vScreenCenter: float32, 218 | eyeToScreenDistance: float32, 219 | lensSeparationDistance: float32, 220 | interpupillaryDistance: float32, 221 | lensDistortionValues: [4]float32, 222 | chromaAbCorrection: [4]float32 223 | } 224 | global VrStereoConfig: type = @record{ 225 | projection: [2]Matrix, 226 | viewOffset: [2]Matrix, 227 | leftLensCenter: [2]float32, 228 | rightLensCenter: [2]float32, 229 | leftScreenCenter: [2]float32, 230 | rightScreenCenter: [2]float32, 231 | scale: [2]float32, 232 | scaleIn: [2]float32 233 | } 234 | global ConfigFlags: type = @enum(cint){ 235 | FLAG_VSYNC_HINT = 64, 236 | FLAG_FULLSCREEN_MODE = 2, 237 | FLAG_WINDOW_RESIZABLE = 4, 238 | FLAG_WINDOW_UNDECORATED = 8, 239 | FLAG_WINDOW_HIDDEN = 128, 240 | FLAG_WINDOW_MINIMIZED = 512, 241 | FLAG_WINDOW_MAXIMIZED = 1024, 242 | FLAG_WINDOW_UNFOCUSED = 2048, 243 | FLAG_WINDOW_TOPMOST = 4096, 244 | FLAG_WINDOW_ALWAYS_RUN = 256, 245 | FLAG_WINDOW_TRANSPARENT = 16, 246 | FLAG_WINDOW_HIGHDPI = 8192, 247 | FLAG_MSAA_4X_HINT = 32, 248 | FLAG_INTERLACED_HINT = 65536 249 | } 250 | global TraceLogLevel: type = @enum(cint){ 251 | LOG_ALL = 0, 252 | LOG_TRACE = 1, 253 | LOG_DEBUG = 2, 254 | LOG_INFO = 3, 255 | LOG_WARNING = 4, 256 | LOG_ERROR = 5, 257 | LOG_FATAL = 6, 258 | LOG_NONE = 7 259 | } 260 | global KeyboardKey: type = @enum(cint){ 261 | KEY_NULL = 0, 262 | KEY_APOSTROPHE = 39, 263 | KEY_COMMA = 44, 264 | KEY_MINUS = 45, 265 | KEY_PERIOD = 46, 266 | KEY_SLASH = 47, 267 | KEY_ZERO = 48, 268 | KEY_ONE = 49, 269 | KEY_TWO = 50, 270 | KEY_THREE = 51, 271 | KEY_FOUR = 52, 272 | KEY_FIVE = 53, 273 | KEY_SIX = 54, 274 | KEY_SEVEN = 55, 275 | KEY_EIGHT = 56, 276 | KEY_NINE = 57, 277 | KEY_SEMICOLON = 59, 278 | KEY_EQUAL = 61, 279 | KEY_A = 65, 280 | KEY_B = 66, 281 | KEY_C = 67, 282 | KEY_D = 68, 283 | KEY_E = 69, 284 | KEY_F = 70, 285 | KEY_G = 71, 286 | KEY_H = 72, 287 | KEY_I = 73, 288 | KEY_J = 74, 289 | KEY_K = 75, 290 | KEY_L = 76, 291 | KEY_M = 77, 292 | KEY_N = 78, 293 | KEY_O = 79, 294 | KEY_P = 80, 295 | KEY_Q = 81, 296 | KEY_R = 82, 297 | KEY_S = 83, 298 | KEY_T = 84, 299 | KEY_U = 85, 300 | KEY_V = 86, 301 | KEY_W = 87, 302 | KEY_X = 88, 303 | KEY_Y = 89, 304 | KEY_Z = 90, 305 | KEY_LEFT_BRACKET = 91, 306 | KEY_BACKSLASH = 92, 307 | KEY_RIGHT_BRACKET = 93, 308 | KEY_GRAVE = 96, 309 | KEY_SPACE = 32, 310 | KEY_ESCAPE = 256, 311 | KEY_ENTER = 257, 312 | KEY_TAB = 258, 313 | KEY_BACKSPACE = 259, 314 | KEY_INSERT = 260, 315 | KEY_DELETE = 261, 316 | KEY_RIGHT = 262, 317 | KEY_LEFT = 263, 318 | KEY_DOWN = 264, 319 | KEY_UP = 265, 320 | KEY_PAGE_UP = 266, 321 | KEY_PAGE_DOWN = 267, 322 | KEY_HOME = 268, 323 | KEY_END = 269, 324 | KEY_CAPS_LOCK = 280, 325 | KEY_SCROLL_LOCK = 281, 326 | KEY_NUM_LOCK = 282, 327 | KEY_PRINT_SCREEN = 283, 328 | KEY_PAUSE = 284, 329 | KEY_F1 = 290, 330 | KEY_F2 = 291, 331 | KEY_F3 = 292, 332 | KEY_F4 = 293, 333 | KEY_F5 = 294, 334 | KEY_F6 = 295, 335 | KEY_F7 = 296, 336 | KEY_F8 = 297, 337 | KEY_F9 = 298, 338 | KEY_F10 = 299, 339 | KEY_F11 = 300, 340 | KEY_F12 = 301, 341 | KEY_LEFT_SHIFT = 340, 342 | KEY_LEFT_CONTROL = 341, 343 | KEY_LEFT_ALT = 342, 344 | KEY_LEFT_SUPER = 343, 345 | KEY_RIGHT_SHIFT = 344, 346 | KEY_RIGHT_CONTROL = 345, 347 | KEY_RIGHT_ALT = 346, 348 | KEY_RIGHT_SUPER = 347, 349 | KEY_KB_MENU = 348, 350 | KEY_KP_0 = 320, 351 | KEY_KP_1 = 321, 352 | KEY_KP_2 = 322, 353 | KEY_KP_3 = 323, 354 | KEY_KP_4 = 324, 355 | KEY_KP_5 = 325, 356 | KEY_KP_6 = 326, 357 | KEY_KP_7 = 327, 358 | KEY_KP_8 = 328, 359 | KEY_KP_9 = 329, 360 | KEY_KP_DECIMAL = 330, 361 | KEY_KP_DIVIDE = 331, 362 | KEY_KP_MULTIPLY = 332, 363 | KEY_KP_SUBTRACT = 333, 364 | KEY_KP_ADD = 334, 365 | KEY_KP_ENTER = 335, 366 | KEY_KP_EQUAL = 336, 367 | KEY_BACK = 4, 368 | KEY_MENU = 82, 369 | KEY_VOLUME_UP = 24, 370 | KEY_VOLUME_DOWN = 25 371 | } 372 | global MouseButton: type = @enum(cint){ 373 | MOUSE_BUTTON_LEFT = 0, 374 | MOUSE_BUTTON_RIGHT = 1, 375 | MOUSE_BUTTON_MIDDLE = 2, 376 | MOUSE_BUTTON_SIDE = 3, 377 | MOUSE_BUTTON_EXTRA = 4, 378 | MOUSE_BUTTON_FORWARD = 5, 379 | MOUSE_BUTTON_BACK = 6 380 | } 381 | global MouseCursor: type = @enum(cint){ 382 | MOUSE_CURSOR_DEFAULT = 0, 383 | MOUSE_CURSOR_ARROW = 1, 384 | MOUSE_CURSOR_IBEAM = 2, 385 | MOUSE_CURSOR_CROSSHAIR = 3, 386 | MOUSE_CURSOR_POINTING_HAND = 4, 387 | MOUSE_CURSOR_RESIZE_EW = 5, 388 | MOUSE_CURSOR_RESIZE_NS = 6, 389 | MOUSE_CURSOR_RESIZE_NWSE = 7, 390 | MOUSE_CURSOR_RESIZE_NESW = 8, 391 | MOUSE_CURSOR_RESIZE_ALL = 9, 392 | MOUSE_CURSOR_NOT_ALLOWED = 10 393 | } 394 | global GamepadButton: type = @enum(cint){ 395 | GAMEPAD_BUTTON_UNKNOWN = 0, 396 | GAMEPAD_BUTTON_LEFT_FACE_UP = 1, 397 | GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2, 398 | GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3, 399 | GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4, 400 | GAMEPAD_BUTTON_RIGHT_FACE_UP = 5, 401 | GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6, 402 | GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7, 403 | GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8, 404 | GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9, 405 | GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10, 406 | GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11, 407 | GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12, 408 | GAMEPAD_BUTTON_MIDDLE_LEFT = 13, 409 | GAMEPAD_BUTTON_MIDDLE = 14, 410 | GAMEPAD_BUTTON_MIDDLE_RIGHT = 15, 411 | GAMEPAD_BUTTON_LEFT_THUMB = 16, 412 | GAMEPAD_BUTTON_RIGHT_THUMB = 17 413 | } 414 | global GamepadAxis: type = @enum(cint){ 415 | GAMEPAD_AXIS_LEFT_X = 0, 416 | GAMEPAD_AXIS_LEFT_Y = 1, 417 | GAMEPAD_AXIS_RIGHT_X = 2, 418 | GAMEPAD_AXIS_RIGHT_Y = 3, 419 | GAMEPAD_AXIS_LEFT_TRIGGER = 4, 420 | GAMEPAD_AXIS_RIGHT_TRIGGER = 5 421 | } 422 | global MaterialMapIndex: type = @enum(cint){ 423 | MATERIAL_MAP_ALBEDO = 0, 424 | MATERIAL_MAP_METALNESS = 1, 425 | MATERIAL_MAP_NORMAL = 2, 426 | MATERIAL_MAP_ROUGHNESS = 3, 427 | MATERIAL_MAP_OCCLUSION = 4, 428 | MATERIAL_MAP_EMISSION = 5, 429 | MATERIAL_MAP_HEIGHT = 6, 430 | MATERIAL_MAP_CUBEMAP = 7, 431 | MATERIAL_MAP_IRRADIANCE = 8, 432 | MATERIAL_MAP_PREFILTER = 9, 433 | MATERIAL_MAP_BRDF = 10 434 | } 435 | global ShaderLocationIndex: type = @enum(cint){ 436 | SHADER_LOC_VERTEX_POSITION = 0, 437 | SHADER_LOC_VERTEX_TEXCOORD01 = 1, 438 | SHADER_LOC_VERTEX_TEXCOORD02 = 2, 439 | SHADER_LOC_VERTEX_NORMAL = 3, 440 | SHADER_LOC_VERTEX_TANGENT = 4, 441 | SHADER_LOC_VERTEX_COLOR = 5, 442 | SHADER_LOC_MATRIX_MVP = 6, 443 | SHADER_LOC_MATRIX_VIEW = 7, 444 | SHADER_LOC_MATRIX_PROJECTION = 8, 445 | SHADER_LOC_MATRIX_MODEL = 9, 446 | SHADER_LOC_MATRIX_NORMAL = 10, 447 | SHADER_LOC_VECTOR_VIEW = 11, 448 | SHADER_LOC_COLOR_DIFFUSE = 12, 449 | SHADER_LOC_COLOR_SPECULAR = 13, 450 | SHADER_LOC_COLOR_AMBIENT = 14, 451 | SHADER_LOC_MAP_ALBEDO = 15, 452 | SHADER_LOC_MAP_METALNESS = 16, 453 | SHADER_LOC_MAP_NORMAL = 17, 454 | SHADER_LOC_MAP_ROUGHNESS = 18, 455 | SHADER_LOC_MAP_OCCLUSION = 19, 456 | SHADER_LOC_MAP_EMISSION = 20, 457 | SHADER_LOC_MAP_HEIGHT = 21, 458 | SHADER_LOC_MAP_CUBEMAP = 22, 459 | SHADER_LOC_MAP_IRRADIANCE = 23, 460 | SHADER_LOC_MAP_PREFILTER = 24, 461 | SHADER_LOC_MAP_BRDF = 25 462 | } 463 | global ShaderUniformDataType: type = @enum(cint){ 464 | SHADER_UNIFORM_FLOAT = 0, 465 | SHADER_UNIFORM_VEC2 = 1, 466 | SHADER_UNIFORM_VEC3 = 2, 467 | SHADER_UNIFORM_VEC4 = 3, 468 | SHADER_UNIFORM_INT = 4, 469 | SHADER_UNIFORM_IVEC2 = 5, 470 | SHADER_UNIFORM_IVEC3 = 6, 471 | SHADER_UNIFORM_IVEC4 = 7, 472 | SHADER_UNIFORM_SAMPLER2D = 8 473 | } 474 | global ShaderAttributeDataType: type = @enum(cint){ 475 | SHADER_ATTRIB_FLOAT = 0, 476 | SHADER_ATTRIB_VEC2 = 1, 477 | SHADER_ATTRIB_VEC3 = 2, 478 | SHADER_ATTRIB_VEC4 = 3 479 | } 480 | global PixelFormat: type = @enum(cint){ 481 | PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, 482 | PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2, 483 | PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3, 484 | PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4, 485 | PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5, 486 | PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6, 487 | PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7, 488 | PIXELFORMAT_UNCOMPRESSED_R32 = 8, 489 | PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9, 490 | PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10, 491 | PIXELFORMAT_COMPRESSED_DXT1_RGB = 11, 492 | PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12, 493 | PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13, 494 | PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14, 495 | PIXELFORMAT_COMPRESSED_ETC1_RGB = 15, 496 | PIXELFORMAT_COMPRESSED_ETC2_RGB = 16, 497 | PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17, 498 | PIXELFORMAT_COMPRESSED_PVRT_RGB = 18, 499 | PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19, 500 | PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20, 501 | PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21 502 | } 503 | global TextureFilter: type = @enum(cint){ 504 | TEXTURE_FILTER_POINT = 0, 505 | TEXTURE_FILTER_BILINEAR = 1, 506 | TEXTURE_FILTER_TRILINEAR = 2, 507 | TEXTURE_FILTER_ANISOTROPIC_4X = 3, 508 | TEXTURE_FILTER_ANISOTROPIC_8X = 4, 509 | TEXTURE_FILTER_ANISOTROPIC_16X = 5 510 | } 511 | global TextureWrap: type = @enum(cint){ 512 | TEXTURE_WRAP_REPEAT = 0, 513 | TEXTURE_WRAP_CLAMP = 1, 514 | TEXTURE_WRAP_MIRROR_REPEAT = 2, 515 | TEXTURE_WRAP_MIRROR_CLAMP = 3 516 | } 517 | global CubemapLayout: type = @enum(cint){ 518 | CUBEMAP_LAYOUT_AUTO_DETECT = 0, 519 | CUBEMAP_LAYOUT_LINE_VERTICAL = 1, 520 | CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2, 521 | CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3, 522 | CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4, 523 | CUBEMAP_LAYOUT_PANORAMA = 5 524 | } 525 | global FontType: type = @enum(cint){ 526 | FONT_DEFAULT = 0, 527 | FONT_BITMAP = 1, 528 | FONT_SDF = 2 529 | } 530 | global BlendMode: type = @enum(cint){ 531 | BLEND_ALPHA = 0, 532 | BLEND_ADDITIVE = 1, 533 | BLEND_MULTIPLIED = 2, 534 | BLEND_ADD_COLORS = 3, 535 | BLEND_SUBTRACT_COLORS = 4, 536 | BLEND_CUSTOM = 5 537 | } 538 | global Gesture: type = @enum(cint){ 539 | GESTURE_NONE = 0, 540 | GESTURE_TAP = 1, 541 | GESTURE_DOUBLETAP = 2, 542 | GESTURE_HOLD = 4, 543 | GESTURE_DRAG = 8, 544 | GESTURE_SWIPE_RIGHT = 16, 545 | GESTURE_SWIPE_LEFT = 32, 546 | GESTURE_SWIPE_UP = 64, 547 | GESTURE_SWIPE_DOWN = 128, 548 | GESTURE_PINCH_IN = 256, 549 | GESTURE_PINCH_OUT = 512 550 | } 551 | global CameraMode: type = @enum(cint){ 552 | CAMERA_CUSTOM = 0, 553 | CAMERA_FREE = 1, 554 | CAMERA_ORBITAL = 2, 555 | CAMERA_FIRST_PERSON = 3, 556 | CAMERA_THIRD_PERSON = 4 557 | } 558 | global CameraProjection: type = @enum(cint){ 559 | CAMERA_PERSPECTIVE = 0, 560 | CAMERA_ORTHOGRAPHIC = 1 561 | } 562 | global NPatchLayout: type = @enum(cint){ 563 | NPATCH_NINE_PATCH = 0, 564 | NPATCH_THREE_PATCH_VERTICAL = 1, 565 | NPATCH_THREE_PATCH_HORIZONTAL = 2 566 | } 567 | global TraceLogCallback: type = @function(cint, cstring, cvalist): void 568 | global LoadFileDataCallback: type = @function(cstring, *cuint): *cuchar 569 | global SaveFileDataCallback: type = @function(cstring, pointer, cuint): boolean 570 | global LoadFileTextCallback: type = @function(cstring): cstring 571 | global SaveFileTextCallback: type = @function(cstring, cstring): boolean 572 | global function InitWindow(width: cint, height: cint, title: cstring): void end 573 | global function WindowShouldClose(): boolean end 574 | global function CloseWindow(): void end 575 | global function IsWindowReady(): boolean end 576 | global function IsWindowFullscreen(): boolean end 577 | global function IsWindowHidden(): boolean end 578 | global function IsWindowMinimized(): boolean end 579 | global function IsWindowMaximized(): boolean end 580 | global function IsWindowFocused(): boolean end 581 | global function IsWindowResized(): boolean end 582 | global function IsWindowState(flag: cuint): boolean end 583 | global function SetWindowState(flags: cuint): void end 584 | global function ClearWindowState(flags: cuint): void end 585 | global function ToggleFullscreen(): void end 586 | global function MaximizeWindow(): void end 587 | global function MinimizeWindow(): void end 588 | global function RestoreWindow(): void end 589 | global function SetWindowIcon(image: Image): void end 590 | global function SetWindowTitle(title: cstring): void end 591 | global function SetWindowPosition(x: cint, y: cint): void end 592 | global function SetWindowMonitor(monitor: cint): void end 593 | global function SetWindowMinSize(width: cint, height: cint): void end 594 | global function SetWindowSize(width: cint, height: cint): void end 595 | global function GetWindowHandle(): pointer end 596 | global function GetScreenWidth(): cint end 597 | global function GetScreenHeight(): cint end 598 | global function GetMonitorCount(): cint end 599 | global function GetCurrentMonitor(): cint end 600 | global function GetMonitorPosition(monitor: cint): Vector2 end 601 | global function GetMonitorWidth(monitor: cint): cint end 602 | global function GetMonitorHeight(monitor: cint): cint end 603 | global function GetMonitorPhysicalWidth(monitor: cint): cint end 604 | global function GetMonitorPhysicalHeight(monitor: cint): cint end 605 | global function GetMonitorRefreshRate(monitor: cint): cint end 606 | global function GetWindowPosition(): Vector2 end 607 | global function GetWindowScaleDPI(): Vector2 end 608 | global function GetMonitorName(monitor: cint): cstring end 609 | global function SetClipboardText(text: cstring): void end 610 | global function GetClipboardText(): cstring end 611 | global function SwapScreenBuffer(): void end 612 | global function PollInputEvents(): void end 613 | global function WaitTime(ms: float32): void end 614 | global function ShowCursor(): void end 615 | global function HideCursor(): void end 616 | global function IsCursorHidden(): boolean end 617 | global function EnableCursor(): void end 618 | global function DisableCursor(): void end 619 | global function IsCursorOnScreen(): boolean end 620 | global function ClearBackground(color: Color): void end 621 | global function BeginDrawing(): void end 622 | global function EndDrawing(): void end 623 | global function BeginMode2D(camera: Camera2D): void end 624 | global function EndMode2D(): void end 625 | global function BeginMode3D(camera: Camera3D): void end 626 | global function EndMode3D(): void end 627 | global function BeginTextureMode(target: RenderTexture2D): void end 628 | global function EndTextureMode(): void end 629 | global function BeginShaderMode(shader: Shader): void end 630 | global function EndShaderMode(): void end 631 | global function BeginBlendMode(mode: cint): void end 632 | global function EndBlendMode(): void end 633 | global function BeginScissorMode(x: cint, y: cint, width: cint, height: cint): void end 634 | global function EndScissorMode(): void end 635 | global function BeginVrStereoMode(config: VrStereoConfig): void end 636 | global function EndVrStereoMode(): void end 637 | global function LoadVrStereoConfig(device: VrDeviceInfo): VrStereoConfig end 638 | global function UnloadVrStereoConfig(config: VrStereoConfig): void end 639 | global function LoadShader(vsFileName: cstring, fsFileName: cstring): Shader end 640 | global function LoadShaderFromMemory(vsCode: cstring, fsCode: cstring): Shader end 641 | global function GetShaderLocation(shader: Shader, uniformName: cstring): cint end 642 | global function GetShaderLocationAttrib(shader: Shader, attribName: cstring): cint end 643 | global function SetShaderValue(shader: Shader, locIndex: cint, value: pointer, uniformType: cint): void end 644 | global function SetShaderValueV(shader: Shader, locIndex: cint, value: pointer, uniformType: cint, count: cint): void end 645 | global function SetShaderValueMatrix(shader: Shader, locIndex: cint, mat: Matrix): void end 646 | global function SetShaderValueTexture(shader: Shader, locIndex: cint, texture: Texture2D): void end 647 | global function UnloadShader(shader: Shader): void end 648 | global function GetMouseRay(mousePosition: Vector2, camera: Camera): Ray end 649 | global function GetCameraMatrix(camera: Camera): Matrix end 650 | global function GetCameraMatrix2D(camera: Camera2D): Matrix end 651 | global function GetWorldToScreen(position: Vector3, camera: Camera): Vector2 end 652 | global function GetWorldToScreenEx(position: Vector3, camera: Camera, width: cint, height: cint): Vector2 end 653 | global function GetWorldToScreen2D(position: Vector2, camera: Camera2D): Vector2 end 654 | global function GetScreenToWorld2D(position: Vector2, camera: Camera2D): Vector2 end 655 | global function SetTargetFPS(fps: cint): void end 656 | global function GetFPS(): cint end 657 | global function GetFrameTime(): float32 end 658 | global function GetTime(): float64 end 659 | global function GetRandomValue(min: cint, max: cint): cint end 660 | global function SetRandomSeed(seed: cuint): void end 661 | global function TakeScreenshot(fileName: cstring): void end 662 | global function SetConfigFlags(flags: cuint): void end 663 | global function TraceLog(logLevel: cint, text: cstring, ...: cvarargs): void end 664 | global function SetTraceLogLevel(logLevel: cint): void end 665 | global function MemAlloc(size: cint): pointer end 666 | global function MemRealloc(ptr: pointer, size: cint): pointer end 667 | global function MemFree(ptr: pointer): void end 668 | global function SetTraceLogCallback(callback: TraceLogCallback): void end 669 | global function SetLoadFileDataCallback(callback: LoadFileDataCallback): void end 670 | global function SetSaveFileDataCallback(callback: SaveFileDataCallback): void end 671 | global function SetLoadFileTextCallback(callback: LoadFileTextCallback): void end 672 | global function SetSaveFileTextCallback(callback: SaveFileTextCallback): void end 673 | global function LoadFileData(fileName: cstring, bytesRead: *cuint): *cuchar end 674 | global function UnloadFileData(data: *cuchar): void end 675 | global function SaveFileData(fileName: cstring, data: pointer, bytesToWrite: cuint): boolean end 676 | global function LoadFileText(fileName: cstring): cstring end 677 | global function UnloadFileText(text: cstring): void end 678 | global function SaveFileText(fileName: cstring, text: cstring): boolean end 679 | global function FileExists(fileName: cstring): boolean end 680 | global function DirectoryExists(dirPath: cstring): boolean end 681 | global function IsFileExtension(fileName: cstring, ext: cstring): boolean end 682 | global function GetFileExtension(fileName: cstring): cstring end 683 | global function GetFileName(filePath: cstring): cstring end 684 | global function GetFileNameWithoutExt(filePath: cstring): cstring end 685 | global function GetDirectoryPath(filePath: cstring): cstring end 686 | global function GetPrevDirectoryPath(dirPath: cstring): cstring end 687 | global function GetWorkingDirectory(): cstring end 688 | global function GetDirectoryFiles(dirPath: cstring, count: *cint): *cstring end 689 | global function ClearDirectoryFiles(): void end 690 | global function ChangeDirectory(dir: cstring): boolean end 691 | global function IsFileDropped(): boolean end 692 | global function GetDroppedFiles(count: *cint): *cstring end 693 | global function ClearDroppedFiles(): void end 694 | global function GetFileModTime(fileName: cstring): clong end 695 | global function CompressData(data: *cuchar, dataLength: cint, compDataLength: *cint): *cuchar end 696 | global function DecompressData(compData: *cuchar, compDataLength: cint, dataLength: *cint): *cuchar end 697 | global function EncodeDataBase64(data: *cuchar, dataLength: cint, outputLength: *cint): cstring end 698 | global function DecodeDataBase64(data: *cuchar, outputLength: *cint): *cuchar end 699 | global function SaveStorageValue(position: cuint, value: cint): boolean end 700 | global function LoadStorageValue(position: cuint): cint end 701 | global function OpenURL(url: cstring): void end 702 | global function IsKeyPressed(key: cint): boolean end 703 | global function IsKeyDown(key: cint): boolean end 704 | global function IsKeyReleased(key: cint): boolean end 705 | global function IsKeyUp(key: cint): boolean end 706 | global function SetExitKey(key: cint): void end 707 | global function GetKeyPressed(): cint end 708 | global function GetCharPressed(): cint end 709 | global function IsGamepadAvailable(gamepad: cint): boolean end 710 | global function GetGamepadName(gamepad: cint): cstring end 711 | global function IsGamepadButtonPressed(gamepad: cint, button: cint): boolean end 712 | global function IsGamepadButtonDown(gamepad: cint, button: cint): boolean end 713 | global function IsGamepadButtonReleased(gamepad: cint, button: cint): boolean end 714 | global function IsGamepadButtonUp(gamepad: cint, button: cint): boolean end 715 | global function GetGamepadButtonPressed(): cint end 716 | global function GetGamepadAxisCount(gamepad: cint): cint end 717 | global function GetGamepadAxisMovement(gamepad: cint, axis: cint): float32 end 718 | global function SetGamepadMappings(mappings: cstring): cint end 719 | global function IsMouseButtonPressed(button: cint): boolean end 720 | global function IsMouseButtonDown(button: cint): boolean end 721 | global function IsMouseButtonReleased(button: cint): boolean end 722 | global function IsMouseButtonUp(button: cint): boolean end 723 | global function GetMouseX(): cint end 724 | global function GetMouseY(): cint end 725 | global function GetMousePosition(): Vector2 end 726 | global function GetMouseDelta(): Vector2 end 727 | global function SetMousePosition(x: cint, y: cint): void end 728 | global function SetMouseOffset(offsetX: cint, offsetY: cint): void end 729 | global function SetMouseScale(scaleX: float32, scaleY: float32): void end 730 | global function GetMouseWheelMove(): float32 end 731 | global function SetMouseCursor(cursor: cint): void end 732 | global function GetTouchX(): cint end 733 | global function GetTouchY(): cint end 734 | global function GetTouchPosition(index: cint): Vector2 end 735 | global function GetTouchPointId(index: cint): cint end 736 | global function GetTouchPointCount(): cint end 737 | global function SetGesturesEnabled(flags: cuint): void end 738 | global function IsGestureDetected(gesture: cint): boolean end 739 | global function GetGestureDetected(): cint end 740 | global function GetGestureHoldDuration(): float32 end 741 | global function GetGestureDragVector(): Vector2 end 742 | global function GetGestureDragAngle(): float32 end 743 | global function GetGesturePinchVector(): Vector2 end 744 | global function GetGesturePinchAngle(): float32 end 745 | global function SetCameraMode(camera: Camera, mode: cint): void end 746 | global function UpdateCamera(camera: *Camera): void end 747 | global function SetCameraPanControl(keyPan: cint): void end 748 | global function SetCameraAltControl(keyAlt: cint): void end 749 | global function SetCameraSmoothZoomControl(keySmoothZoom: cint): void end 750 | global function SetCameraMoveControls(keyFront: cint, keyBack: cint, keyRight: cint, keyLeft: cint, keyUp: cint, keyDown: cint): void end 751 | global function SetShapesTexture(texture: Texture2D, source: Rectangle): void end 752 | global function DrawPixel(posX: cint, posY: cint, color: Color): void end 753 | global function DrawPixelV(position: Vector2, color: Color): void end 754 | global function DrawLine(startPosX: cint, startPosY: cint, endPosX: cint, endPosY: cint, color: Color): void end 755 | global function DrawLineV(startPos: Vector2, endPos: Vector2, color: Color): void end 756 | global function DrawLineEx(startPos: Vector2, endPos: Vector2, thick: float32, color: Color): void end 757 | global function DrawLineBezier(startPos: Vector2, endPos: Vector2, thick: float32, color: Color): void end 758 | global function DrawLineBezierQuad(startPos: Vector2, endPos: Vector2, controlPos: Vector2, thick: float32, color: Color): void end 759 | global function DrawLineBezierCubic(startPos: Vector2, endPos: Vector2, startControlPos: Vector2, endControlPos: Vector2, thick: float32, color: Color): void end 760 | global function DrawLineStrip(points: *Vector2, pointCount: cint, color: Color): void end 761 | global function DrawCircle(centerX: cint, centerY: cint, radius: float32, color: Color): void end 762 | global function DrawCircleSector(center: Vector2, radius: float32, startAngle: float32, endAngle: float32, segments: cint, color: Color): void end 763 | global function DrawCircleSectorLines(center: Vector2, radius: float32, startAngle: float32, endAngle: float32, segments: cint, color: Color): void end 764 | global function DrawCircleGradient(centerX: cint, centerY: cint, radius: float32, color1: Color, color2: Color): void end 765 | global function DrawCircleV(center: Vector2, radius: float32, color: Color): void end 766 | global function DrawCircleLines(centerX: cint, centerY: cint, radius: float32, color: Color): void end 767 | global function DrawEllipse(centerX: cint, centerY: cint, radiusH: float32, radiusV: float32, color: Color): void end 768 | global function DrawEllipseLines(centerX: cint, centerY: cint, radiusH: float32, radiusV: float32, color: Color): void end 769 | global function DrawRing(center: Vector2, innerRadius: float32, outerRadius: float32, startAngle: float32, endAngle: float32, segments: cint, color: Color): void end 770 | global function DrawRingLines(center: Vector2, innerRadius: float32, outerRadius: float32, startAngle: float32, endAngle: float32, segments: cint, color: Color): void end 771 | global function DrawRectangle(posX: cint, posY: cint, width: cint, height: cint, color: Color): void end 772 | global function DrawRectangleV(position: Vector2, size: Vector2, color: Color): void end 773 | global function DrawRectangleRec(rec: Rectangle, color: Color): void end 774 | global function DrawRectanglePro(rec: Rectangle, origin: Vector2, rotation: float32, color: Color): void end 775 | global function DrawRectangleGradientV(posX: cint, posY: cint, width: cint, height: cint, color1: Color, color2: Color): void end 776 | global function DrawRectangleGradientH(posX: cint, posY: cint, width: cint, height: cint, color1: Color, color2: Color): void end 777 | global function DrawRectangleGradientEx(rec: Rectangle, col1: Color, col2: Color, col3: Color, col4: Color): void end 778 | global function DrawRectangleLines(posX: cint, posY: cint, width: cint, height: cint, color: Color): void end 779 | global function DrawRectangleLinesEx(rec: Rectangle, lineThick: float32, color: Color): void end 780 | global function DrawRectangleRounded(rec: Rectangle, roundness: float32, segments: cint, color: Color): void end 781 | global function DrawRectangleRoundedLines(rec: Rectangle, roundness: float32, segments: cint, lineThick: float32, color: Color): void end 782 | global function DrawTriangle(v1: Vector2, v2: Vector2, v3: Vector2, color: Color): void end 783 | global function DrawTriangleLines(v1: Vector2, v2: Vector2, v3: Vector2, color: Color): void end 784 | global function DrawTriangleFan(points: *Vector2, pointCount: cint, color: Color): void end 785 | global function DrawTriangleStrip(points: *Vector2, pointCount: cint, color: Color): void end 786 | global function DrawPoly(center: Vector2, sides: cint, radius: float32, rotation: float32, color: Color): void end 787 | global function DrawPolyLines(center: Vector2, sides: cint, radius: float32, rotation: float32, color: Color): void end 788 | global function DrawPolyLinesEx(center: Vector2, sides: cint, radius: float32, rotation: float32, lineThick: float32, color: Color): void end 789 | global function CheckCollisionRecs(rec1: Rectangle, rec2: Rectangle): boolean end 790 | global function CheckCollisionCircles(center1: Vector2, radius1: float32, center2: Vector2, radius2: float32): boolean end 791 | global function CheckCollisionCircleRec(center: Vector2, radius: float32, rec: Rectangle): boolean end 792 | global function CheckCollisionPointRec(point: Vector2, rec: Rectangle): boolean end 793 | global function CheckCollisionPointCircle(point: Vector2, center: Vector2, radius: float32): boolean end 794 | global function CheckCollisionPointTriangle(point: Vector2, p1: Vector2, p2: Vector2, p3: Vector2): boolean end 795 | global function CheckCollisionLines(startPos1: Vector2, endPos1: Vector2, startPos2: Vector2, endPos2: Vector2, collisionPoint: *Vector2): boolean end 796 | global function CheckCollisionPointLine(point: Vector2, p1: Vector2, p2: Vector2, threshold: cint): boolean end 797 | global function GetCollisionRec(rec1: Rectangle, rec2: Rectangle): Rectangle end 798 | global function LoadImage(fileName: cstring): Image end 799 | global function LoadImageRaw(fileName: cstring, width: cint, height: cint, format: cint, headerSize: cint): Image end 800 | global function LoadImageAnim(fileName: cstring, frames: *cint): Image end 801 | global function LoadImageFromMemory(fileType: cstring, fileData: *cuchar, dataSize: cint): Image end 802 | global function LoadImageFromTexture(texture: Texture2D): Image end 803 | global function LoadImageFromScreen(): Image end 804 | global function UnloadImage(image: Image): void end 805 | global function ExportImage(image: Image, fileName: cstring): boolean end 806 | global function ExportImageAsCode(image: Image, fileName: cstring): boolean end 807 | global function GenImageColor(width: cint, height: cint, color: Color): Image end 808 | global function GenImageGradientV(width: cint, height: cint, top: Color, bottom: Color): Image end 809 | global function GenImageGradientH(width: cint, height: cint, left: Color, right: Color): Image end 810 | global function GenImageGradientRadial(width: cint, height: cint, density: float32, inner: Color, outer: Color): Image end 811 | global function GenImageChecked(width: cint, height: cint, checksX: cint, checksY: cint, col1: Color, col2: Color): Image end 812 | global function GenImageWhiteNoise(width: cint, height: cint, factor: float32): Image end 813 | global function GenImageCellular(width: cint, height: cint, tileSize: cint): Image end 814 | global function ImageCopy(image: Image): Image end 815 | global function ImageFromImage(image: Image, rec: Rectangle): Image end 816 | global function ImageText(text: cstring, fontSize: cint, color: Color): Image end 817 | global function ImageTextEx(font: Font, text: cstring, fontSize: float32, spacing: float32, tint: Color): Image end 818 | global function ImageFormat(image: *Image, newFormat: cint): void end 819 | global function ImageToPOT(image: *Image, fill: Color): void end 820 | global function ImageCrop(image: *Image, crop: Rectangle): void end 821 | global function ImageAlphaCrop(image: *Image, threshold: float32): void end 822 | global function ImageAlphaClear(image: *Image, color: Color, threshold: float32): void end 823 | global function ImageAlphaMask(image: *Image, alphaMask: Image): void end 824 | global function ImageAlphaPremultiply(image: *Image): void end 825 | global function ImageResize(image: *Image, newWidth: cint, newHeight: cint): void end 826 | global function ImageResizeNN(image: *Image, newWidth: cint, newHeight: cint): void end 827 | global function ImageResizeCanvas(image: *Image, newWidth: cint, newHeight: cint, offsetX: cint, offsetY: cint, fill: Color): void end 828 | global function ImageMipmaps(image: *Image): void end 829 | global function ImageDither(image: *Image, rBpp: cint, gBpp: cint, bBpp: cint, aBpp: cint): void end 830 | global function ImageFlipVertical(image: *Image): void end 831 | global function ImageFlipHorizontal(image: *Image): void end 832 | global function ImageRotateCW(image: *Image): void end 833 | global function ImageRotateCCW(image: *Image): void end 834 | global function ImageColorTint(image: *Image, color: Color): void end 835 | global function ImageColorInvert(image: *Image): void end 836 | global function ImageColorGrayscale(image: *Image): void end 837 | global function ImageColorContrast(image: *Image, contrast: float32): void end 838 | global function ImageColorBrightness(image: *Image, brightness: cint): void end 839 | global function ImageColorReplace(image: *Image, color: Color, replace: Color): void end 840 | global function LoadImageColors(image: Image): *Color end 841 | global function LoadImagePalette(image: Image, maxPaletteSize: cint, colorCount: *cint): *Color end 842 | global function UnloadImageColors(colors: *Color): void end 843 | global function UnloadImagePalette(colors: *Color): void end 844 | global function GetImageAlphaBorder(image: Image, threshold: float32): Rectangle end 845 | global function GetImageColor(image: Image, x: cint, y: cint): Color end 846 | global function ImageClearBackground(dst: *Image, color: Color): void end 847 | global function ImageDrawPixel(dst: *Image, posX: cint, posY: cint, color: Color): void end 848 | global function ImageDrawPixelV(dst: *Image, position: Vector2, color: Color): void end 849 | global function ImageDrawLine(dst: *Image, startPosX: cint, startPosY: cint, endPosX: cint, endPosY: cint, color: Color): void end 850 | global function ImageDrawLineV(dst: *Image, start: Vector2, End: Vector2, color: Color): void end 851 | global function ImageDrawCircle(dst: *Image, centerX: cint, centerY: cint, radius: cint, color: Color): void end 852 | global function ImageDrawCircleV(dst: *Image, center: Vector2, radius: cint, color: Color): void end 853 | global function ImageDrawRectangle(dst: *Image, posX: cint, posY: cint, width: cint, height: cint, color: Color): void end 854 | global function ImageDrawRectangleV(dst: *Image, position: Vector2, size: Vector2, color: Color): void end 855 | global function ImageDrawRectangleRec(dst: *Image, rec: Rectangle, color: Color): void end 856 | global function ImageDrawRectangleLines(dst: *Image, rec: Rectangle, thick: cint, color: Color): void end 857 | global function ImageDraw(dst: *Image, src: Image, srcRec: Rectangle, dstRec: Rectangle, tint: Color): void end 858 | global function ImageDrawText(dst: *Image, text: cstring, posX: cint, posY: cint, fontSize: cint, color: Color): void end 859 | global function ImageDrawTextEx(dst: *Image, font: Font, text: cstring, position: Vector2, fontSize: float32, spacing: float32, tint: Color): void end 860 | global function LoadTexture(fileName: cstring): Texture2D end 861 | global function LoadTextureFromImage(image: Image): Texture2D end 862 | global function LoadTextureCubemap(image: Image, layout: cint): TextureCubemap end 863 | global function LoadRenderTexture(width: cint, height: cint): RenderTexture2D end 864 | global function UnloadTexture(texture: Texture2D): void end 865 | global function UnloadRenderTexture(target: RenderTexture2D): void end 866 | global function UpdateTexture(texture: Texture2D, pixels: pointer): void end 867 | global function UpdateTextureRec(texture: Texture2D, rec: Rectangle, pixels: pointer): void end 868 | global function GenTextureMipmaps(texture: *Texture2D): void end 869 | global function SetTextureFilter(texture: Texture2D, filter: cint): void end 870 | global function SetTextureWrap(texture: Texture2D, wrap: cint): void end 871 | global function DrawTexture(texture: Texture2D, posX: cint, posY: cint, tint: Color): void end 872 | global function DrawTextureV(texture: Texture2D, position: Vector2, tint: Color): void end 873 | global function DrawTextureEx(texture: Texture2D, position: Vector2, rotation: float32, scale: float32, tint: Color): void end 874 | global function DrawTextureRec(texture: Texture2D, source: Rectangle, position: Vector2, tint: Color): void end 875 | global function DrawTextureQuad(texture: Texture2D, tiling: Vector2, offset: Vector2, quad: Rectangle, tint: Color): void end 876 | global function DrawTextureTiled(texture: Texture2D, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: float32, scale: float32, tint: Color): void end 877 | global function DrawTexturePro(texture: Texture2D, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: float32, tint: Color): void end 878 | global function DrawTextureNPatch(texture: Texture2D, nPatchInfo: NPatchInfo, dest: Rectangle, origin: Vector2, rotation: float32, tint: Color): void end 879 | global function DrawTexturePoly(texture: Texture2D, center: Vector2, points: *Vector2, texcoords: *Vector2, pointCount: cint, tint: Color): void end 880 | global function Fade(color: Color, alpha: float32): Color end 881 | global function ColorToInt(color: Color): cint end 882 | global function ColorNormalize(color: Color): Vector4 end 883 | global function ColorFromNormalized(normalized: Vector4): Color end 884 | global function ColorToHSV(color: Color): Vector3 end 885 | global function ColorFromHSV(hue: float32, saturation: float32, value: float32): Color end 886 | global function ColorAlpha(color: Color, alpha: float32): Color end 887 | global function ColorAlphaBlend(dst: Color, src: Color, tint: Color): Color end 888 | global function GetColor(hexValue: cuint): Color end 889 | global function GetPixelColor(srcPtr: pointer, format: cint): Color end 890 | global function SetPixelColor(dstPtr: pointer, color: Color, format: cint): void end 891 | global function GetPixelDataSize(width: cint, height: cint, format: cint): cint end 892 | global function GetFontDefault(): Font end 893 | global function LoadFont(fileName: cstring): Font end 894 | global function LoadFontEx(fileName: cstring, fontSize: cint, fontChars: *cint, glyphCount: cint): Font end 895 | global function LoadFontFromImage(image: Image, key: Color, firstChar: cint): Font end 896 | global function LoadFontFromMemory(fileType: cstring, fileData: *cuchar, dataSize: cint, fontSize: cint, fontChars: *cint, glyphCount: cint): Font end 897 | global function LoadFontData(fileData: *cuchar, dataSize: cint, fontSize: cint, fontChars: *cint, glyphCount: cint, type: cint): *GlyphInfo end 898 | global function GenImageFontAtlas(chars: *GlyphInfo, recs: **Rectangle, glyphCount: cint, fontSize: cint, padding: cint, packMethod: cint): Image end 899 | global function UnloadFontData(chars: *GlyphInfo, glyphCount: cint): void end 900 | global function UnloadFont(font: Font): void end 901 | global function DrawFPS(posX: cint, posY: cint): void end 902 | global function DrawText(text: cstring, posX: cint, posY: cint, fontSize: cint, color: Color): void end 903 | global function DrawTextEx(font: Font, text: cstring, position: Vector2, fontSize: float32, spacing: float32, tint: Color): void end 904 | global function DrawTextPro(font: Font, text: cstring, position: Vector2, origin: Vector2, rotation: float32, fontSize: float32, spacing: float32, tint: Color): void end 905 | global function DrawTextCodepoint(font: Font, codepoint: cint, position: Vector2, fontSize: float32, tint: Color): void end 906 | global function MeasureText(text: cstring, fontSize: cint): cint end 907 | global function MeasureTextEx(font: Font, text: cstring, fontSize: float32, spacing: float32): Vector2 end 908 | global function GetGlyphIndex(font: Font, codepoint: cint): cint end 909 | global function GetGlyphInfo(font: Font, codepoint: cint): GlyphInfo end 910 | global function GetGlyphAtlasRec(font: Font, codepoint: cint): Rectangle end 911 | global function LoadCodepoints(text: cstring, count: *cint): *cint end 912 | global function UnloadCodepoints(codepoints: *cint): void end 913 | global function GetCodepointCount(text: cstring): cint end 914 | global function GetCodepoint(text: cstring, bytesProcessed: *cint): cint end 915 | global function CodepointToUTF8(codepoint: cint, byteSize: *cint): cstring end 916 | global function TextCodepointsToUTF8(codepoints: *cint, length: cint): cstring end 917 | global function TextCopy(dst: cstring, src: cstring): cint end 918 | global function TextIsEqual(text1: cstring, text2: cstring): boolean end 919 | global function TextLength(text: cstring): cuint end 920 | global function TextFormat(text: cstring, ...: cvarargs): cstring end 921 | global function TextSubtext(text: cstring, position: cint, length: cint): cstring end 922 | global function TextReplace(text: cstring, replace: cstring, by: cstring): cstring end 923 | global function TextInsert(text: cstring, insert: cstring, position: cint): cstring end 924 | global function TextJoin(textList: *cstring, count: cint, delimiter: cstring): cstring end 925 | global function TextSplit(text: cstring, delimiter: cchar, count: *cint): *cstring end 926 | global function TextAppend(text: cstring, append: cstring, position: *cint): void end 927 | global function TextFindIndex(text: cstring, find: cstring): cint end 928 | global function TextToUpper(text: cstring): cstring end 929 | global function TextToLower(text: cstring): cstring end 930 | global function TextToPascal(text: cstring): cstring end 931 | global function TextToInteger(text: cstring): cint end 932 | global function DrawLine3D(startPos: Vector3, endPos: Vector3, color: Color): void end 933 | global function DrawPoint3D(position: Vector3, color: Color): void end 934 | global function DrawCircle3D(center: Vector3, radius: float32, rotationAxis: Vector3, rotationAngle: float32, color: Color): void end 935 | global function DrawTriangle3D(v1: Vector3, v2: Vector3, v3: Vector3, color: Color): void end 936 | global function DrawTriangleStrip3D(points: *Vector3, pointCount: cint, color: Color): void end 937 | global function DrawCube(position: Vector3, width: float32, height: float32, length: float32, color: Color): void end 938 | global function DrawCubeV(position: Vector3, size: Vector3, color: Color): void end 939 | global function DrawCubeWires(position: Vector3, width: float32, height: float32, length: float32, color: Color): void end 940 | global function DrawCubeWiresV(position: Vector3, size: Vector3, color: Color): void end 941 | global function DrawCubeTexture(texture: Texture2D, position: Vector3, width: float32, height: float32, length: float32, color: Color): void end 942 | global function DrawCubeTextureRec(texture: Texture2D, source: Rectangle, position: Vector3, width: float32, height: float32, length: float32, color: Color): void end 943 | global function DrawSphere(centerPos: Vector3, radius: float32, color: Color): void end 944 | global function DrawSphereEx(centerPos: Vector3, radius: float32, rings: cint, slices: cint, color: Color): void end 945 | global function DrawSphereWires(centerPos: Vector3, radius: float32, rings: cint, slices: cint, color: Color): void end 946 | global function DrawCylinder(position: Vector3, radiusTop: float32, radiusBottom: float32, height: float32, slices: cint, color: Color): void end 947 | global function DrawCylinderEx(startPos: Vector3, endPos: Vector3, startRadius: float32, endRadius: float32, sides: cint, color: Color): void end 948 | global function DrawCylinderWires(position: Vector3, radiusTop: float32, radiusBottom: float32, height: float32, slices: cint, color: Color): void end 949 | global function DrawCylinderWiresEx(startPos: Vector3, endPos: Vector3, startRadius: float32, endRadius: float32, sides: cint, color: Color): void end 950 | global function DrawPlane(centerPos: Vector3, size: Vector2, color: Color): void end 951 | global function DrawRay(ray: Ray, color: Color): void end 952 | global function DrawGrid(slices: cint, spacing: float32): void end 953 | global function LoadModel(fileName: cstring): Model end 954 | global function LoadModelFromMesh(mesh: Mesh): Model end 955 | global function UnloadModel(model: Model): void end 956 | global function UnloadModelKeepMeshes(model: Model): void end 957 | global function GetModelBoundingBox(model: Model): BoundingBox end 958 | global function DrawModel(model: Model, position: Vector3, scale: float32, tint: Color): void end 959 | global function DrawModelEx(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: float32, scale: Vector3, tint: Color): void end 960 | global function DrawModelWires(model: Model, position: Vector3, scale: float32, tint: Color): void end 961 | global function DrawModelWiresEx(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: float32, scale: Vector3, tint: Color): void end 962 | global function DrawBoundingBox(box: BoundingBox, color: Color): void end 963 | global function DrawBillboard(camera: Camera, texture: Texture2D, position: Vector3, size: float32, tint: Color): void end 964 | global function DrawBillboardRec(camera: Camera, texture: Texture2D, source: Rectangle, position: Vector3, size: Vector2, tint: Color): void end 965 | global function DrawBillboardPro(camera: Camera, texture: Texture2D, source: Rectangle, position: Vector3, up: Vector3, size: Vector2, origin: Vector2, rotation: float32, tint: Color): void end 966 | global function UploadMesh(mesh: *Mesh, dynamic: boolean): void end 967 | global function UpdateMeshBuffer(mesh: Mesh, index: cint, data: pointer, dataSize: cint, offset: cint): void end 968 | global function UnloadMesh(mesh: Mesh): void end 969 | global function DrawMesh(mesh: Mesh, material: Material, transform: Matrix): void end 970 | global function DrawMeshInstanced(mesh: Mesh, material: Material, transforms: *Matrix, instances: cint): void end 971 | global function ExportMesh(mesh: Mesh, fileName: cstring): boolean end 972 | global function GetMeshBoundingBox(mesh: Mesh): BoundingBox end 973 | global function GenMeshTangents(mesh: *Mesh): void end 974 | global function GenMeshBinormals(mesh: *Mesh): void end 975 | global function GenMeshPoly(sides: cint, radius: float32): Mesh end 976 | global function GenMeshPlane(width: float32, length: float32, resX: cint, resZ: cint): Mesh end 977 | global function GenMeshCube(width: float32, height: float32, length: float32): Mesh end 978 | global function GenMeshSphere(radius: float32, rings: cint, slices: cint): Mesh end 979 | global function GenMeshHemiSphere(radius: float32, rings: cint, slices: cint): Mesh end 980 | global function GenMeshCylinder(radius: float32, height: float32, slices: cint): Mesh end 981 | global function GenMeshCone(radius: float32, height: float32, slices: cint): Mesh end 982 | global function GenMeshTorus(radius: float32, size: float32, radSeg: cint, sides: cint): Mesh end 983 | global function GenMeshKnot(radius: float32, size: float32, radSeg: cint, sides: cint): Mesh end 984 | global function GenMeshHeightmap(heightmap: Image, size: Vector3): Mesh end 985 | global function GenMeshCubicmap(cubicmap: Image, cubeSize: Vector3): Mesh end 986 | global function LoadMaterials(fileName: cstring, materialCount: *cint): *Material end 987 | global function LoadMaterialDefault(): Material end 988 | global function UnloadMaterial(material: Material): void end 989 | global function SetMaterialTexture(material: *Material, mapType: cint, texture: Texture2D): void end 990 | global function SetModelMeshMaterial(model: *Model, meshId: cint, materialId: cint): void end 991 | global function LoadModelAnimations(fileName: cstring, animCount: *cuint): *ModelAnimation end 992 | global function UpdateModelAnimation(model: Model, anim: ModelAnimation, frame: cint): void end 993 | global function UnloadModelAnimation(anim: ModelAnimation): void end 994 | global function UnloadModelAnimations(animations: *ModelAnimation, count: cuint): void end 995 | global function IsModelAnimationValid(model: Model, anim: ModelAnimation): boolean end 996 | global function CheckCollisionSpheres(center1: Vector3, radius1: float32, center2: Vector3, radius2: float32): boolean end 997 | global function CheckCollisionBoxes(box1: BoundingBox, box2: BoundingBox): boolean end 998 | global function CheckCollisionBoxSphere(box: BoundingBox, center: Vector3, radius: float32): boolean end 999 | global function GetRayCollisionSphere(ray: Ray, center: Vector3, radius: float32): RayCollision end 1000 | global function GetRayCollisionBox(ray: Ray, box: BoundingBox): RayCollision end 1001 | global function GetRayCollisionModel(ray: Ray, model: Model): RayCollision end 1002 | global function GetRayCollisionMesh(ray: Ray, mesh: Mesh, transform: Matrix): RayCollision end 1003 | global function GetRayCollisionTriangle(ray: Ray, p1: Vector3, p2: Vector3, p3: Vector3): RayCollision end 1004 | global function GetRayCollisionQuad(ray: Ray, p1: Vector3, p2: Vector3, p3: Vector3, p4: Vector3): RayCollision end 1005 | global function InitAudioDevice(): void end 1006 | global function CloseAudioDevice(): void end 1007 | global function IsAudioDeviceReady(): boolean end 1008 | global function SetMasterVolume(volume: float32): void end 1009 | global function LoadWave(fileName: cstring): Wave end 1010 | global function LoadWaveFromMemory(fileType: cstring, fileData: *cuchar, dataSize: cint): Wave end 1011 | global function LoadSound(fileName: cstring): Sound end 1012 | global function LoadSoundFromWave(wave: Wave): Sound end 1013 | global function UpdateSound(sound: Sound, data: pointer, sampleCount: cint): void end 1014 | global function UnloadWave(wave: Wave): void end 1015 | global function UnloadSound(sound: Sound): void end 1016 | global function ExportWave(wave: Wave, fileName: cstring): boolean end 1017 | global function ExportWaveAsCode(wave: Wave, fileName: cstring): boolean end 1018 | global function PlaySound(sound: Sound): void end 1019 | global function StopSound(sound: Sound): void end 1020 | global function PauseSound(sound: Sound): void end 1021 | global function ResumeSound(sound: Sound): void end 1022 | global function PlaySoundMulti(sound: Sound): void end 1023 | global function StopSoundMulti(): void end 1024 | global function GetSoundsPlaying(): cint end 1025 | global function IsSoundPlaying(sound: Sound): boolean end 1026 | global function SetSoundVolume(sound: Sound, volume: float32): void end 1027 | global function SetSoundPitch(sound: Sound, pitch: float32): void end 1028 | global function WaveFormat(wave: *Wave, sampleRate: cint, sampleSize: cint, channels: cint): void end 1029 | global function WaveCopy(wave: Wave): Wave end 1030 | global function WaveCrop(wave: *Wave, initSample: cint, finalSample: cint): void end 1031 | global function LoadWaveSamples(wave: Wave): *float32 end 1032 | global function UnloadWaveSamples(samples: *float32): void end 1033 | global function LoadMusicStream(fileName: cstring): Music end 1034 | global function LoadMusicStreamFromMemory(fileType: cstring, data: *cuchar, dataSize: cint): Music end 1035 | global function UnloadMusicStream(music: Music): void end 1036 | global function PlayMusicStream(music: Music): void end 1037 | global function IsMusicStreamPlaying(music: Music): boolean end 1038 | global function UpdateMusicStream(music: Music): void end 1039 | global function StopMusicStream(music: Music): void end 1040 | global function PauseMusicStream(music: Music): void end 1041 | global function ResumeMusicStream(music: Music): void end 1042 | global function SeekMusicStream(music: Music, position: float32): void end 1043 | global function SetMusicVolume(music: Music, volume: float32): void end 1044 | global function SetMusicPitch(music: Music, pitch: float32): void end 1045 | global function GetMusicTimeLength(music: Music): float32 end 1046 | global function GetMusicTimePlayed(music: Music): float32 end 1047 | global function LoadAudioStream(sampleRate: cuint, sampleSize: cuint, channels: cuint): AudioStream end 1048 | global function UnloadAudioStream(stream: AudioStream): void end 1049 | global function UpdateAudioStream(stream: AudioStream, data: pointer, frameCount: cint): void end 1050 | global function IsAudioStreamProcessed(stream: AudioStream): boolean end 1051 | global function PlayAudioStream(stream: AudioStream): void end 1052 | global function PauseAudioStream(stream: AudioStream): void end 1053 | global function ResumeAudioStream(stream: AudioStream): void end 1054 | global function IsAudioStreamPlaying(stream: AudioStream): boolean end 1055 | global function StopAudioStream(stream: AudioStream): void end 1056 | global function SetAudioStreamVolume(stream: AudioStream, volume: float32): void end 1057 | global function SetAudioStreamPitch(stream: AudioStream, pitch: float32): void end 1058 | global function SetAudioStreamBufferSizeDefault(size: cint): void end 1059 | global float3: type = @record{ 1060 | v: [3]float32 1061 | } 1062 | global float16: type = @record{ 1063 | v: [16]float32 1064 | } 1065 | global function Clamp(value: float32, min: float32, max: float32): float32 end 1066 | global function Lerp(start: float32, End: float32, amount: float32): float32 end 1067 | global function Normalize(value: float32, start: float32, End: float32): float32 end 1068 | global function Remap(value: float32, inputStart: float32, inputEnd: float32, outputStart: float32, outputEnd: float32): float32 end 1069 | global function Vector2Zero(): Vector2 end 1070 | global function Vector2One(): Vector2 end 1071 | global function Vector2Add(v1: Vector2, v2: Vector2): Vector2 end 1072 | global function Vector2AddValue(v: Vector2, add: float32): Vector2 end 1073 | global function Vector2Subtract(v1: Vector2, v2: Vector2): Vector2 end 1074 | global function Vector2SubtractValue(v: Vector2, sub: float32): Vector2 end 1075 | global function Vector2Length(v: Vector2): float32 end 1076 | global function Vector2LengthSqr(v: Vector2): float32 end 1077 | global function Vector2DotProduct(v1: Vector2, v2: Vector2): float32 end 1078 | global function Vector2Distance(v1: Vector2, v2: Vector2): float32 end 1079 | global function Vector2Angle(v1: Vector2, v2: Vector2): float32 end 1080 | global function Vector2Scale(v: Vector2, scale: float32): Vector2 end 1081 | global function Vector2Multiply(v1: Vector2, v2: Vector2): Vector2 end 1082 | global function Vector2Negate(v: Vector2): Vector2 end 1083 | global function Vector2Divide(v1: Vector2, v2: Vector2): Vector2 end 1084 | global function Vector2Normalize(v: Vector2): Vector2 end 1085 | global function Vector2Lerp(v1: Vector2, v2: Vector2, amount: float32): Vector2 end 1086 | global function Vector2Reflect(v: Vector2, normal: Vector2): Vector2 end 1087 | global function Vector2Rotate(v: Vector2, angle: float32): Vector2 end 1088 | global function Vector2MoveTowards(v: Vector2, target: Vector2, maxDistance: float32): Vector2 end 1089 | global function Vector3Zero(): Vector3 end 1090 | global function Vector3One(): Vector3 end 1091 | global function Vector3Add(v1: Vector3, v2: Vector3): Vector3 end 1092 | global function Vector3AddValue(v: Vector3, add: float32): Vector3 end 1093 | global function Vector3Subtract(v1: Vector3, v2: Vector3): Vector3 end 1094 | global function Vector3SubtractValue(v: Vector3, sub: float32): Vector3 end 1095 | global function Vector3Scale(v: Vector3, scalar: float32): Vector3 end 1096 | global function Vector3Multiply(v1: Vector3, v2: Vector3): Vector3 end 1097 | global function Vector3CrossProduct(v1: Vector3, v2: Vector3): Vector3 end 1098 | global function Vector3Perpendicular(v: Vector3): Vector3 end 1099 | global function Vector3Length(v: Vector3): float32 end 1100 | global function Vector3LengthSqr(v: Vector3): float32 end 1101 | global function Vector3DotProduct(v1: Vector3, v2: Vector3): float32 end 1102 | global function Vector3Distance(v1: Vector3, v2: Vector3): float32 end 1103 | global function Vector3Angle(v1: Vector3, v2: Vector3): Vector2 end 1104 | global function Vector3Negate(v: Vector3): Vector3 end 1105 | global function Vector3Divide(v1: Vector3, v2: Vector3): Vector3 end 1106 | global function Vector3Normalize(v: Vector3): Vector3 end 1107 | global function Vector3OrthoNormalize(v1: *Vector3, v2: *Vector3): void end 1108 | global function Vector3Transform(v: Vector3, mat: Matrix): Vector3 end 1109 | global function Vector3RotateByQuaternion(v: Vector3, q: Quaternion): Vector3 end 1110 | global function Vector3Lerp(v1: Vector3, v2: Vector3, amount: float32): Vector3 end 1111 | global function Vector3Reflect(v: Vector3, normal: Vector3): Vector3 end 1112 | global function Vector3Min(v1: Vector3, v2: Vector3): Vector3 end 1113 | global function Vector3Max(v1: Vector3, v2: Vector3): Vector3 end 1114 | global function Vector3Barycenter(p: Vector3, a: Vector3, b: Vector3, c: Vector3): Vector3 end 1115 | global function Vector3Unproject(source: Vector3, projection: Matrix, view: Matrix): Vector3 end 1116 | global function Vector3ToFloatV(v: Vector3): float3 end 1117 | global function MatrixDeterminant(mat: Matrix): float32 end 1118 | global function MatrixTrace(mat: Matrix): float32 end 1119 | global function MatrixTranspose(mat: Matrix): Matrix end 1120 | global function MatrixInvert(mat: Matrix): Matrix end 1121 | global function MatrixNormalize(mat: Matrix): Matrix end 1122 | global function MatrixIdentity(): Matrix end 1123 | global function MatrixAdd(left: Matrix, right: Matrix): Matrix end 1124 | global function MatrixSubtract(left: Matrix, right: Matrix): Matrix end 1125 | global function MatrixMultiply(left: Matrix, right: Matrix): Matrix end 1126 | global function MatrixTranslate(x: float32, y: float32, z: float32): Matrix end 1127 | global function MatrixRotate(axis: Vector3, angle: float32): Matrix end 1128 | global function MatrixRotateX(angle: float32): Matrix end 1129 | global function MatrixRotateY(angle: float32): Matrix end 1130 | global function MatrixRotateZ(angle: float32): Matrix end 1131 | global function MatrixRotateXYZ(ang: Vector3): Matrix end 1132 | global function MatrixRotateZYX(ang: Vector3): Matrix end 1133 | global function MatrixScale(x: float32, y: float32, z: float32): Matrix end 1134 | global function MatrixFrustum(left: float64, right: float64, bottom: float64, top: float64, near: float64, far: float64): Matrix end 1135 | global function MatrixPerspective(fovy: float64, aspect: float64, near: float64, far: float64): Matrix end 1136 | global function MatrixOrtho(left: float64, right: float64, bottom: float64, top: float64, near: float64, far: float64): Matrix end 1137 | global function MatrixLookAt(eye: Vector3, target: Vector3, up: Vector3): Matrix end 1138 | global function MatrixToFloatV(mat: Matrix): float16 end 1139 | global function QuaternionAdd(q1: Quaternion, q2: Quaternion): Quaternion end 1140 | global function QuaternionAddValue(q: Quaternion, add: float32): Quaternion end 1141 | global function QuaternionSubtract(q1: Quaternion, q2: Quaternion): Quaternion end 1142 | global function QuaternionSubtractValue(q: Quaternion, sub: float32): Quaternion end 1143 | global function QuaternionIdentity(): Quaternion end 1144 | global function QuaternionLength(q: Quaternion): float32 end 1145 | global function QuaternionNormalize(q: Quaternion): Quaternion end 1146 | global function QuaternionInvert(q: Quaternion): Quaternion end 1147 | global function QuaternionMultiply(q1: Quaternion, q2: Quaternion): Quaternion end 1148 | global function QuaternionScale(q: Quaternion, mul: float32): Quaternion end 1149 | global function QuaternionDivide(q1: Quaternion, q2: Quaternion): Quaternion end 1150 | global function QuaternionLerp(q1: Quaternion, q2: Quaternion, amount: float32): Quaternion end 1151 | global function QuaternionNlerp(q1: Quaternion, q2: Quaternion, amount: float32): Quaternion end 1152 | global function QuaternionSlerp(q1: Quaternion, q2: Quaternion, amount: float32): Quaternion end 1153 | global function QuaternionFromVector3ToVector3(from: Vector3, to: Vector3): Quaternion end 1154 | global function QuaternionFromMatrix(mat: Matrix): Quaternion end 1155 | global function QuaternionToMatrix(q: Quaternion): Matrix end 1156 | global function QuaternionFromAxisAngle(axis: Vector3, angle: float32): Quaternion end 1157 | global function QuaternionToAxisAngle(q: Quaternion, outAxis: *Vector3, outAngle: *float32): void end 1158 | global function QuaternionFromEuler(pitch: float32, yaw: float32, roll: float32): Quaternion end 1159 | global function QuaternionToEuler(q: Quaternion): Vector3 end 1160 | global function QuaternionTransform(q: Quaternion, mat: Matrix): Quaternion end 1161 | global PI: float32 = 3.14159265358979323846 1162 | global DEG2RAD: float32 1163 | global RAD2DEG: float32 1164 | global LIGHTGRAY: Color 1165 | global GRAY: Color 1166 | global DARKGRAY: Color 1167 | global YELLOW: Color 1168 | global GOLD: Color 1169 | global ORANGE: Color 1170 | global PINK: Color 1171 | global RED: Color 1172 | global MAROON: Color 1173 | global GREEN: Color 1174 | global LIME: Color 1175 | global DARKGREEN: Color 1176 | global SKYBLUE: Color 1177 | global BLUE: Color 1178 | global DARKBLUE: Color 1179 | global PURPLE: Color 1180 | global VIOLET: Color 1181 | global BEIGE: Color 1182 | global BROWN: Color 1183 | global DARKBROWN: Color 1184 | global WHITE: Color 1185 | global BLACK: Color 1186 | global BLANK: Color 1187 | global MAGENTA: Color 1188 | global RAYWHITE: Color 1189 | function Vector2.__add(v1: Vector2, v2: Vector2): Vector2 end 1190 | function Vector2.__sub(v1: Vector2, v2: Vector2): Vector2 end 1191 | function Vector2.__len(v: Vector2): float32 end 1192 | function Vector2.__unm(v: Vector2): Vector2 end 1193 | function Vector2.__div(v: Vector2, divisor: overload(Vector2, number)): Vector2 1194 | ## if divisor.type.nickname == 'Vector2' then 1195 | return Vector2Divide(v, divisor) 1196 | ## else 1197 | return Vector2Divide(v, 1.0/divisor) 1198 | ## end 1199 | end 1200 | function Vector2.__mul(v: Vector2, multiplier: overload(Vector2, number)): Vector2 1201 | ## if multiplier.type.nickname == 'Vector2' then 1202 | return Vector2Multiply(v, multiplier) 1203 | ## else 1204 | return Vector2Scale(v, multiplier) 1205 | ## end 1206 | end 1207 | function Vector3.__add(v1: Vector3, v2: Vector3): Vector3 end 1208 | function Vector3.__sub(v1: Vector3, v2: Vector3): Vector3 end 1209 | function Vector3.__len(v: Vector3): float32 end 1210 | function Vector3.__unm(v: Vector3): Vector3 end 1211 | function Vector3.__mul(v: Vector3, multiplier: overload(Vector3, number)): Vector3 1212 | ## if multiplier.type.nickname == 'Vector3' then 1213 | return Vector3Multiply(v, multiplier) 1214 | ## else 1215 | return Vector3Scale(v, multiplier) 1216 | ## end 1217 | end 1218 | function Vector3.__div(v: Vector3, divisor: overload(Vector3, number)): Vector3 1219 | ## if divisor.type.nickname == 'Vector3' then 1220 | return Vector3Divide(v, divisor) 1221 | ## else 1222 | return Vector3Scale(v, 1.0/divisor) 1223 | ## end 1224 | end 1225 | function Matrix.__add(left: Matrix, right: Matrix): Matrix end 1226 | function Matrix.__sub(left: Matrix, right: Matrix): Matrix end 1227 | function Matrix.__mul(left: Matrix, right: Matrix): Matrix end 1228 | function Quaternion.__len(q: Quaternion): float32 end 1229 | function Quaternion.__mul(q1: Quaternion, q2: Quaternion): Quaternion end 1230 | -------------------------------------------------------------------------------- /docs/game2048.js: -------------------------------------------------------------------------------- 1 | var e;e||(e=typeof Module !== 'undefined' ? Module : {});var aa={},ba;for(ba in e)e.hasOwnProperty(ba)&&(aa[ba]=e[ba]);var ca=[],da="./this.program";function ea(a,b){throw b;}var fa=!1,ha=!1,ia=!1,ja=!1;fa="object"===typeof window;ha="function"===typeof importScripts;ia="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node;ja=!fa&&!ia&&!ha; 2 | if(e.ENVIRONMENT)throw Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var k="",ka,la,ma,na; 3 | if(ia)k=ha?require("path").dirname(k)+"/":__dirname+"/",ka=function(a,b){ma||(ma=require("fs"));na||(na=require("path"));a=na.normalize(a);return ma.readFileSync(a,b?null:"utf8")},la=function(a){a=ka(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a},1>0]=b;break;case "i8":p[a>>0]=b;break;case "i16":Aa[a>>1]=b;break;case "i32":r[a>>2]=b;break;case "i64":Ba=[b>>>0,(t=b,1<=+Ca(t)?0>>0:~~+Fa((t-+(~~t>>>0))/4294967296)>>>0:0)];r[a>>2]=Ba[0];r[a+4>>2]=Ba[1];break;case "float":w[a>>2]=b;break;case "double":Ga[a>>3]=b;break;default:l("invalid type for setValue: "+c)}} 14 | var Ha,Ia=new WebAssembly.Table({initial:200,maximum:200,element:"anyfunc"}),Ja=!1;function assert(a,b){a||l("Assertion failed: "+b)} 15 | function Ka(a,b){if("number"===typeof a){var c=!0;var d=a}else c=!1,d=a.length;var f="string"===typeof b?b:null;var g=x(Math.max(d,f?1:b.length));if(c){a=g;assert(0==(g&3));for(b=g+(d&-4);a>2]=0;for(b=g+d;a>0]=0;return g}if("i8"===f)return a.subarray||a.slice?y.set(a,g):y.set(new Uint8Array(a),g),g;c=0;for(var h,n,q;c=d);)++c;if(16f?d+=String.fromCharCode(f):(f-= 18 | 65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d}function B(a,b){return a?Ma(y,a,b):""} 19 | function Na(a,b,c,d){if(!(0=h){var n=a.charCodeAt(++g);h=65536+((h&1023)<<10)|n&1023}if(127>=h){if(c>=d)break;b[c++]=h}else{if(2047>=h){if(c+1>=d)break;b[c++]=192|h>>6}else{if(65535>=h){if(c+2>=d)break;b[c++]=224|h>>12}else{if(c+3>=d)break;2097152<=h&&ua("Invalid Unicode code point 0x"+h.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."); 20 | b[c++]=240|h>>18;b[c++]=128|h>>12&63}b[c++]=128|h>>6&63}b[c++]=128|h&63}}b[c]=0;return c-f}function C(a,b,c){assert("number"==typeof c,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");return Na(a,y,b,c)}function Oa(a){for(var b=0,c=0;c=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b} 21 | "undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");function Pa(a){var b=Oa(a)+1,c=sa(b);Na(a,p,c,b);return c}var buffer,p,y,Aa,Qa,r,D,w,Ga;assert(!0,"stack must start aligned");assert(!0,"heap must start aligned");e.TOTAL_STACK&&assert(5242880===e.TOTAL_STACK,"the stack size can no longer be determined at runtime");var Ra=e.TOTAL_MEMORY||16777216;Object.getOwnPropertyDescriptor(e,"TOTAL_MEMORY")||Object.defineProperty(e,"TOTAL_MEMORY",{configurable:!0,get:function(){l("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY")}}); 22 | assert(5242880<=Ra,"TOTAL_MEMORY should be larger than TOTAL_STACK, was "+Ra+"! (TOTAL_STACK=5242880)");assert("undefined"!==typeof Int32Array&&"undefined"!==typeof Float64Array&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support");e.wasmMemory?Ha=e.wasmMemory:Ha=new WebAssembly.Memory({initial:Ra/65536,maximum:Ra/65536});Ha&&(buffer=Ha.buffer);Ra=buffer.byteLength;assert(0===Ra%65536);var E=buffer;buffer=E;e.HEAP8=p=new Int8Array(E); 23 | e.HEAP16=Aa=new Int16Array(E);e.HEAP32=r=new Int32Array(E);e.HEAPU8=y=new Uint8Array(E);e.HEAPU16=Qa=new Uint16Array(E);e.HEAPU32=D=new Uint32Array(E);e.HEAPF32=w=new Float32Array(E);e.HEAPF64=Ga=new Float64Array(E);r[9220]=5279920;function Sa(){assert(!0);D[9261]=34821223;D[9262]=2310721022;r[0]=1668509029} 24 | function Ta(){var a=D[9261],b=D[9262];34821223==a&&2310721022==b||l("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+b.toString(16)+" "+a.toString(16));1668509029!==r[0]&&l("Runtime error: The application has corrupted its heap memory area (address zero)!")}var Ua=new Int16Array(1),Va=new Int8Array(Ua.buffer);Ua[0]=25459;if(115!==Va[0]||99!==Va[1])throw"Runtime error: expected the system to be little-endian!"; 25 | function Wa(a){for(;0>2]=28:m("failed to set errno from JS")}function pb(a,b){for(var c=0,d=a.length-1;0<=d;d--){var f=a[d];"."===f?a.splice(d,1):".."===f?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a} 31 | function qb(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=pb(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a}function rb(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function sb(a){if("/"===a)return"/";var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)} 32 | function tb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=pb(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}var ub=[];function vb(a,b){ub[a]={input:[],output:[],D:b};wb(a,xb)} 33 | var xb={open:function(a){var b=ub[a.node.rdev];if(!b)throw new I(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.D.flush(a.tty)},flush:function(a){a.tty.D.flush(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.D.oa)throw new I(60);for(var f=0,g=0;g=b||(b=Math.max(b,c*(1048576>c?2:1.125)|0),0!=c&&(b=Math.max(b,256)),c=a.b,a.b=new Uint8Array(b),0b)a.b.length=b;else for(;a.b.length=a.node.g)return 0;a=Math.min(a.node.g-f,d);assert(0<=a);if(8b)throw new I(28);return b},ga:function(a,b,c){J.ka(a.node,b+c);a.node.g=Math.max(a.node.g,b+c)},pa:function(a,b,c,d,f,g,h){assert(!(b instanceof ArrayBuffer));if(32768!==(a.node.mode& 43 | 61440))throw new I(43);c=a.node.b;if(h&2||c.buffer!==b.buffer){if(0>>0)%Lb.length}function Sb(a){var b=Rb(a.parent.id,a.name);a.La=Lb[b];Lb[b]=a}function Eb(a,b){var c;if(c=(c=Tb(a,"x"))?c:a.c.lookup?0:2)throw new I(c,a);for(c=Lb[Rb(a.id,b)];c;c=c.La){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.c.lookup(a,b)} 54 | function Cb(a,b,c,d){Ub||(Ub=function(f,g,h,n){f||(f=this);this.parent=f;this.o=f.o;this.T=null;this.id=Kb++;this.name=g;this.mode=h;this.c={};this.f={};this.rdev=n},Ub.prototype={},Object.defineProperties(Ub.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(f){f?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(f){f?this.mode|=146:this.mode&=-147}}}));a=new Ub(a,b,c,d);Sb(a);return a} 55 | var Vb={r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218};function Wb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}function Tb(a,b){if(Mb)return 0;if(-1===b.indexOf("r")||a.mode&292){if(-1!==b.indexOf("w")&&!(a.mode&146)||-1!==b.indexOf("x")&&!(a.mode&73))return 2}else return 2;return 0}function Xb(a,b){try{return Eb(a,b),20}catch(c){}return Tb(a,"wx")} 56 | function Yb(a){var b=4096;for(a=a||0;a<=b;a++)if(!Jb[a])return a;throw new I(33);}function Zb(a,b){$b||($b=function(){},$b.prototype={},Object.defineProperties($b.prototype,{object:{get:function(){return this.node},set:function(f){this.node=f}}}));var c=new $b,d;for(d in a)c[d]=a[d];a=c;b=Yb(b);a.fd=b;return Jb[b]=a}var Bb={open:function(a){a.f=Ib[a.node.rdev].f;a.f.open&&a.f.open(a)},A:function(){throw new I(70);}};function wb(a,b){Ib[a]={f:b}} 57 | function ac(a,b){if("string"===typeof a)throw a;var c="/"===b,d=!b;if(c&&Hb)throw new I(10);if(!c&&!d){var f=K(b,{la:!1});b=f.path;f=f.node;if(f.T)throw new I(10);if(16384!==(f.mode&61440))throw new I(54);}b={type:a,Cd:{},qa:b,Ka:[]};a=a.o(b);a.o=b;b.root=a;c?Hb=a:f&&(f.T=b,f.o&&f.o.Ka.push(b))}function bc(a,b,c){var d=K(a,{parent:!0}).node;a=sb(a);if(!a||"."===a||".."===a)throw new I(28);var f=Xb(d,a);if(f)throw new I(f);if(!d.c.S)throw new I(63);return d.c.S(d,a,b,c)} 58 | function L(a){bc(a,16895,0)}function cc(a,b,c){"undefined"===typeof c&&(c=b,b=438);bc(a,b|8192,c)}function dc(a,b){if(!tb(a))throw new I(44);var c=K(b,{parent:!0}).node;if(!c)throw new I(44);b=sb(b);var d=Xb(c,b);if(d)throw new I(d);if(!c.c.symlink)throw new I(63);c.c.symlink(c,b,a)}function Ob(a){a=K(a).node;if(!a)throw new I(44);if(!a.c.readlink)throw new I(28);return tb(Pb(a.parent),a.c.readlink(a))} 59 | function ec(a,b,c,d){if(""===a)throw new I(44);if("string"===typeof b){var f=Vb[b];if("undefined"===typeof f)throw Error("Unknown file open mode: "+b);b=f}c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var g=a;else{a=qb(a);try{g=K(a,{O:!(b&131072)}).node}catch(n){}}f=!1;if(b&64)if(g){if(b&128)throw new I(20);}else g=bc(a,c,0),f=!0;if(!g)throw new I(44);8192===(g.mode&61440)&&(b&=-513);if(b&65536&&16384!==(g.mode&61440))throw new I(54);if(!f&&(c=g?40960===(g.mode&61440)? 60 | 32:16384===(g.mode&61440)&&("r"!==Wb(b)||b&512)?31:Tb(g,Wb(b)):44))throw new I(c);if(b&512){c=g;var h;"string"===typeof c?h=K(c,{O:!0}).node:h=c;if(!h.c.m)throw new I(63);if(16384===(h.mode&61440))throw new I(31);if(32768!==(h.mode&61440))throw new I(28);if(c=Tb(h,"w"))throw new I(c);h.c.m(h,{size:0,timestamp:Date.now()})}b&=-641;d=Zb({node:g,path:Pb(g),flags:b,seekable:!0,position:0,f:g.f,Ua:[],error:!1},d);d.f.open&&d.f.open(d);!e.logReadFiles||b&1||(fc||(fc={}),a in fc||(fc[a]=1,m("FS.trackingDelegate error on read file: "+ 61 | a)));try{Nb.onOpenFile&&(g=0,1!==(b&2097155)&&(g|=1),0!==(b&2097155)&&(g|=2),Nb.onOpenFile(a,g))}catch(n){m("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+n.message)}return d}function hc(a){if(null===a.fd)throw new I(8);a.aa&&(a.aa=null);try{a.f.close&&a.f.close(a)}catch(b){throw b;}finally{Jb[a.fd]=null}a.fd=null}function ic(a,b,c){if(null===a.fd)throw new I(8);if(!a.seekable||!a.f.A)throw new I(70);if(0!=c&&1!=c&&2!=c)throw new I(28);a.position=a.f.A(a,b,c);a.Ua=[]} 62 | function jc(a,b,c,d,f){var g=void 0;if(0>d||0>g)throw new I(28);if(null===a.fd)throw new I(8);if(0===(a.flags&2097155))throw new I(8);if(16384===(a.node.mode&61440))throw new I(31);if(!a.f.write)throw new I(28);a.flags&1024&&ic(a,0,2);var h="undefined"!==typeof g;if(!h)g=a.position;else if(!a.seekable)throw new I(70);b=a.f.write(a,b,c,d,g,f);h||(a.position+=b);try{if(a.path&&Nb.onWriteToFile)Nb.onWriteToFile(a.path)}catch(n){m("FS.trackingDelegate['onWriteToFile']('"+a.path+"') threw an exception: "+ 63 | n.message)}return b}function kc(){I||(I=function(a,b){this.node=b;this.Sa=function(c){this.s=c;for(var d in Gb)if(Gb[d]===c){this.code=d;break}};this.Sa(a);this.message=Fb[a];this.stack&&(Object.defineProperty(this,"stack",{value:Error().stack,writable:!0}),this.stack=hb(this.stack))},I.prototype=Error(),I.prototype.constructor=I,[44].forEach(function(a){Db[a]=new I(a);Db[a].stack=""}))}var lc;function mc(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c} 64 | function nc(){var a="/";a="string"===typeof a?a:Pb(a);for(var b=[".glfw_dropped_files"].reverse();b.length;){var c=b.pop();if(c){a=qb(a+"/"+c);try{L(a)}catch(d){}}}} 65 | function oc(a,b,c){a=qb("/dev/"+a);var d=mc(!!b,!!c);pc||(pc=64);var f=pc++<<8|0;wb(f,{open:function(g){g.seekable=!1},close:function(){c&&c.buffer&&c.buffer.length&&c(10)},read:function(g,h,n,q){for(var u=0,v=0;v>2]}function sc(a){void 0===a&&(a=M());a=Jb[a];if(!a)throw new I(8);return a} 67 | function tc(a,b){uc=a;vc=b;if(!wc)console.error("emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.");else if(0==a)xc=function(){var d=Math.max(0,yc+b-N())|0;setTimeout(zc,d)},Ac="timeout";else if(1==a)xc=function(){Bc(zc)},Ac="rAF";else if(2==a){if("undefined"===typeof setImmediate){var c=[];addEventListener("message",function(d){if("setimmediate"===d.data||"setimmediate"===d.data.target)d.stopPropagation(), 68 | c.shift()()},!0);setImmediate=function(d){c.push(d);ha?(void 0===e.setImmediates&&(e.setImmediates=[]),e.setImmediates.push(d),postMessage({target:"setimmediate"})):postMessage("setimmediate","*")}}xc=function(){setImmediate(zc)};Ac="immediate"}}function N(){l()} 69 | function Cc(a,b,c,d,f){ya=!0;assert(!wc,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");wc=a;Dc=d;var g="undefined"!==typeof d?function(){e.dynCall_vi(a,d)}:function(){e.dynCall_v(a)};var h=Ec;zc=function(){if(!Ja)if(0>A-6&63;A-=6;z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[Qb]}2==A?(z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(G&3)<<4],z+="=="):4==A&&(z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(G&15)<<2],z+="="); 77 | v.src="data:audio/x-"+d.substr(-3)+";base64,"+z;h(v)}};v.src=u;Tc(function(){h(v)})}else return n()}});var b=e.canvas;b&&(b.requestPointerLock=b.requestPointerLock||b.mozRequestPointerLock||b.webkitRequestPointerLock||b.msRequestPointerLock||function(){},b.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},b.exitPointerLock=b.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",a,!1), 78 | document.addEventListener("mozpointerlockchange",a,!1),document.addEventListener("webkitpointerlockchange",a,!1),document.addEventListener("mspointerlockchange",a,!1),e.elementPointerLock&&b.addEventListener("click",function(c){!Kc&&e.canvas.requestPointerLock&&(e.canvas.requestPointerLock(),c.preventDefault())},!1))}} 79 | function Uc(a,b,c,d){if(b&&e.B&&a==e.canvas)return e.B;var f;if(b){var g={antialias:!1,alpha:!1,Ja:1};if(d)for(var h in d)g[h]=d[h];if("undefined"!==typeof Vc&&(f=Wc(a,g)))var n=Xc[f].Y}else n=a.getContext("2d");if(!n)return null;c&&(b||assert("undefined"===typeof O,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),e.B=n,b&&(Yc=Xc[f],e.B=O=Yc&&Yc.Y),e.Ed=b,Lc.forEach(function(q){q()}),Mc());return n}var Zc=!1,$c=void 0,ad=void 0; 80 | function bd(a,b,c){function d(){Jc=!1;var h=f.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===h?(f.exitFullscreen=cd,$c&&f.requestPointerLock(),Jc=!0,ad?("undefined"!=typeof SDL&&(r[SDL.screen>>2]=D[SDL.screen>>2]|8388608),dd(e.canvas),ed()):dd(f)):(h.parentNode.insertBefore(f,h),h.parentNode.removeChild(h),ad?("undefined"!=typeof SDL&&(r[SDL.screen>>2]=D[SDL.screen>>2]& 81 | -8388609),dd(e.canvas),ed()):dd(f));if(e.onFullScreen)e.onFullScreen(Jc);if(e.onFullscreen)e.onFullscreen(Jc)}$c=a;ad=b;fd=c;"undefined"===typeof $c&&($c=!0);"undefined"===typeof ad&&(ad=!1);"undefined"===typeof fd&&(fd=null);var f=e.canvas;Zc||(Zc=!0,document.addEventListener("fullscreenchange",d,!1),document.addEventListener("mozfullscreenchange",d,!1),document.addEventListener("webkitfullscreenchange",d,!1),document.addEventListener("MSFullscreenChange",d,!1));var g=document.createElement("div"); 82 | f.parentNode.insertBefore(g,f);g.appendChild(f);g.requestFullscreen=g.requestFullscreen||g.mozRequestFullScreen||g.msRequestFullscreen||(g.webkitRequestFullscreen?function(){g.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(g.webkitRequestFullScreen?function(){g.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null);c?g.requestFullscreen({Fd:c}):g.requestFullscreen()} 83 | function cd(){if(!Jc)return!1;(document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]);return!0}var gd=0;function Bc(a){if("function"===typeof requestAnimationFrame)requestAnimationFrame(a);else{var b=Date.now();if(0===gd)gd=b+1E3/60;else for(;b+2>=gd;)gd+=1E3/60;setTimeout(a,Math.max(gd-b,0))}}function Tc(a){ya=!0;setTimeout(function(){Ja||a()},1E4)} 84 | function Sc(a){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[a.substr(a.lastIndexOf(".")+1)]}var hd=0,id=0,jd=0,kd=0; 85 | function ld(a){if(Kc)"mousemove"!=a.type&&"mozMovementX"in a?jd=kd=0:(jd=a.movementX||a.mozMovementX||a.webkitMovementX||0,kd=a.movementY||a.mozMovementY||a.webkitMovementY||0),"undefined"!=typeof SDL?(hd=SDL.zd+jd,id=SDL.Ad+kd):(hd+=jd,id+=kd);else{var b=e.canvas.getBoundingClientRect(),c=e.canvas.width,d=e.canvas.height,f="undefined"!==typeof window.scrollX?window.scrollX:window.pageXOffset,g="undefined"!==typeof window.scrollY?window.scrollY:window.pageYOffset;assert("undefined"!==typeof f&&"undefined"!== 86 | typeof g,"Unable to retrieve scroll position, mouse positions likely broken.");"touchstart"!==a.type&&"touchend"!==a.type&&"touchmove"!==a.type&&(f=a.pageX-(f+b.left),a=a.pageY-(g+b.top),f*=c/b.width,a*=d/b.height,jd=f-hd,kd=a-id,hd=f,id=a)}}var md=[];function ed(){var a=e.canvas;md.forEach(function(b){b(a.width,a.height)})}function nd(a,b,c){dd(e.canvas,a,b);c||ed()} 87 | function dd(a,b,c){b&&c?(a.Va=b,a.Fa=c):(b=a.Va,c=a.Fa);var d=b,f=c;e.forcedAspectRatio&&0>3]=b.timestamp;for(var c=0;c>3]=b.axes[c];for(c=0;c>3]="object"===typeof b.buttons[c]?b.buttons[c].value:b.buttons[c];for(c=0;c>2]="object"===typeof b.buttons[c]?b.buttons[c].pressed:1==b.buttons[c];r[a+1296>>2]=b.connected;r[a+1300>>2]=b.index;r[a+8>>2]=b.axes.length;r[a+12>>2]=b.buttons.length;C(b.id,a+1304,64);C(b.mapping,a+1368,64)} 93 | function Md(a){var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=function(c,d){b.vertexAttribDivisorANGLE(c,d)},a.drawArraysInstanced=function(c,d,f,g){b.drawArraysInstancedANGLE(c,d,f,g)},a.drawElementsInstanced=function(c,d,f,g,h){b.drawElementsInstancedANGLE(c,d,f,g,h)})} 94 | function Nd(a){var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=function(){return b.createVertexArrayOES()},a.deleteVertexArray=function(c){b.deleteVertexArrayOES(c)},a.bindVertexArray=function(c){b.bindVertexArrayOES(c)},a.isVertexArray=function(c){return b.isVertexArrayOES(c)})}function Od(a){var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=function(c,d){b.drawBuffersWEBGL(c,d)})} 95 | var Pd=1,Qd=0,Rd=[],R=[],Sd=[],Td=[],Ud=[],S=[],T=[],Vd=[],Xc={},Yc=null,U=[],V={},Wd={},Xd=4;function W(a){Qd||(Qd=a)}function Yd(a){for(var b=Pd++,c=a.length;c>2]:-1;d+=B(r[b+4*f>>2],0>g?void 0:g)}return d} 96 | function Wc(a,b){if(a=a.getContext("webgl",b)){var c=x(8),d={yd:c,attributes:b,version:b.Ja,Y:a};a.canvas&&(a.canvas.od=d);Xc[c]=d;("undefined"===typeof b.Da||b.Da)&&be(d);b=c}else b=0;return b} 97 | function be(a){a||(a=Yc);if(!a.Ga){a.Ga=!0;var b=a.Y;2>a.version&&(Md(b),Nd(b),Od(b));b.h=b.getExtension("EXT_disjoint_timer_query");var c="OES_texture_float OES_texture_half_float OES_standard_derivatives OES_vertex_array_object WEBGL_compressed_texture_s3tc WEBGL_depth_texture OES_element_index_uint EXT_texture_filter_anisotropic EXT_frag_depth WEBGL_draw_buffers ANGLE_instanced_arrays OES_texture_float_linear OES_texture_half_float_linear EXT_blend_minmax EXT_shader_texture_lod EXT_texture_norm16 WEBGL_compressed_texture_pvrtc EXT_color_buffer_half_float WEBGL_color_buffer_float EXT_sRGB WEBGL_compressed_texture_etc1 EXT_disjoint_timer_query WEBGL_compressed_texture_etc WEBGL_compressed_texture_astc EXT_color_buffer_float WEBGL_compressed_texture_s3tc_srgb EXT_disjoint_timer_query_webgl2 WEBKIT_WEBGL_compressed_texture_pvrtc".split(" ");(b.getSupportedExtensions()|| 98 | []).forEach(function(d){-1!=c.indexOf(d)&&b.getExtension(d)})}}function ce(a){var b=R[a];a=V[a]={fa:{},R:0,i:-1,j:-1};for(var c=a.fa,d=O.getProgramParameter(b,35718),f=0;f>2]=h}}function he(a,b){D[a>>2]=b;D[a+4>>2]=(b-D[a>>2])/4294967296;var c=0<=b?D[a>>2]+4294967296*D[a+4>>2]:D[a>>2]+4294967296*r[a+4>>2];c!=b&&ua("writeI53ToI64() out of range: serialized JS Number "+b+" to Wasm heap as bytes lo=0x"+D[a>>2].toString(16)+", hi=0x"+D[a+4>>2].toString(16)+", which deserializes back to "+c+" instead!")} 100 | function ie(a,b,c){if(b){var d=void 0;switch(a){case 36346:d=1;break;case 36344:0!=c&&1!=c&&W(1280);return;case 36345:d=0;break;case 34466:var f=O.getParameter(34467);d=f?f.length:0}if(void 0===d)switch(f=O.getParameter(a),typeof f){case "number":d=f;break;case "boolean":d=f?1:0;break;case "string":W(1280);return;case "object":if(null===f)switch(a){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:d=0;break;default:W(1280);return}else{if(f instanceof Float32Array|| 101 | f instanceof Uint32Array||f instanceof Int32Array||f instanceof Array){for(a=0;a>2]=f[a];break;case 2:w[b+4*a>>2]=f[a];break;case 4:p[b+a>>0]=f[a]?1:0}return}try{d=f.name|0}catch(g){W(1280);m("GL_INVALID_ENUM in glGet"+c+"v: Unknown object returned from WebGL getParameter("+a+")! (error: "+g+")");return}}break;default:W(1280);m("GL_INVALID_ENUM in glGet"+c+"v: Native code calling glGet"+c+"v("+a+") and it returns "+f+" of type "+typeof f+"!");return}switch(c){case 1:he(b, 102 | d);break;case 0:r[b>>2]=d;break;case 2:w[b>>2]=d;break;case 4:p[b>>0]=d?1:0}}else W(1281)}function je(a){var b=Oa(a)+1,c=x(b);C(a,c,b);return c} 103 | function ke(a,b,c,d){if(c)if(a=O.getUniform(R[a],S[b]),"number"==typeof a||"boolean"==typeof a)switch(d){case 0:r[c>>2]=a;break;case 2:w[c>>2]=a;break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+d;}else for(b=0;b>2]=a[b];break;case 2:w[c+4*b>>2]=a[b];break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+d;}else W(1281)} 104 | function le(a,b,c,d){if(c)if(a=O.getVertexAttrib(a,b),34975==b)r[c>>2]=a.name;else if("number"==typeof a||"boolean"==typeof a)switch(d){case 0:r[c>>2]=a;break;case 2:w[c>>2]=a;break;case 5:r[c>>2]=Math.fround(a);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+d;}else for(b=0;b>2]=a[b];break;case 2:w[c+4*b>>2]=a[b];break;case 5:r[c+4*b>>2]=Math.fround(a[b]);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+ 105 | d;}else W(1281)}function me(a,b,c,d,f){a-=5120;a=1==a?y:4==a?r:6==a?w:5==a||28922==a?D:Qa;var g=31-Math.clz32(a.BYTES_PER_ELEMENT),h=Xd;return a.subarray(f>>g,f+d*(c*({5:3,6:4,8:2,29502:3,29504:4}[b-6402]||1)*(1<>g)}var ne=0; 106 | function oe(a,b,c,d){a|=0;b|=0;c|=0;d|=0;var f=0;ne=ne+1|0;for(r[a>>2]=ne;(f|0)<(d|0);){if(0==(r[c+(f<<3)>>2]|0))return r[c+(f<<3)>>2]=ne,r[c+((f<<3)+4)>>2]=b,r[c+((f<<3)+8)>>2]=0,wa=d|0,c|0;f=f+1|0}d=2*d|0;c=pe(c|0,8*(d+1|0)|0)|0;c=oe(a|0,b|0,c|0,d|0)|0;wa=d|0;return c|0} 107 | function qe(a,b,c,d){pd||(pd=x(64));a=Kd(a);Ed({target:a,G:!0,u:"click",H:d,J:function(f){f=f||event;var g=a,h=pd;r[h>>2]=f.screenX;r[h+4>>2]=f.screenY;r[h+8>>2]=f.clientX;r[h+12>>2]=f.clientY;r[h+16>>2]=f.ctrlKey;r[h+20>>2]=f.shiftKey;r[h+24>>2]=f.altKey;r[h+28>>2]=f.metaKey;Aa[h+32>>1]=f.button;Aa[h+34>>1]=f.buttons;var n=f.movementY||f.screenY-ud;r[h+36>>2]=f.movementX||f.screenX-td;r[h+40>>2]=n;g=0>Jd.indexOf(g)?g.getBoundingClientRect():{left:0,top:0};r[h+44>>2]=f.clientX-g.left;r[h+48>>2]=f.clientY- 108 | g.top;"wheel"!==f.type&&"mousewheel"!==f.type&&(td=f.screenX,ud=f.screenY);re(d,4,pd,b)&&f.preventDefault()},F:c})} 109 | function se(a,b,c,d,f){qd||(qd=x(280));Ed({target:a,u:f,H:d,J:function(g){g=g||event;var h=qd,n=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement,q=!!n;r[h>>2]=q;r[h+4>>2]=document.fullscreenEnabled||document.webkitFullscreenEnabled;var u=q?n:sd,v=u&&u.id?u.id:"";C(Fd(u),h+8,128);C(v,h+136,128);r[h+264>>2]=u?u.clientWidth:0;r[h+268>>2]=u?u.clientHeight:0;r[h+272>>2]=screen.width;r[h+276>>2]=screen.height;q&&(sd=n);re(d,19,h,b)&& 110 | g.preventDefault()},F:c})}function te(a,b,c,d,f){Hd||(Hd=x(1432));b={target:Kd(2),G:!0,u:f,H:c,J:function(g){g=g||event;var h=Hd;Ld(h,g.gamepad);re(c,d,h,a)&&g.preventDefault()},F:b};Ed(b)} 111 | function ue(a,b,c,d){od||(od=x(164));a={target:Kd(a),G:!0,u:"keypress",H:d,J:function(f){f=f||event;var g=od;C(f.key?f.key:"",g+0,32);C(f.code?f.code:"",g+32,32);r[g+64>>2]=f.location;r[g+68>>2]=f.ctrlKey;r[g+72>>2]=f.shiftKey;r[g+76>>2]=f.altKey;r[g+80>>2]=f.metaKey;r[g+84>>2]=f.repeat;C(f.locale?f.locale:"",g+88,32);C(f.char?f.char:"",g+120,32);r[g+152>>2]=f.charCode;r[g+156>>2]=f.keyCode;r[g+160>>2]=f.which;re(d,1,g,b)&&f.preventDefault()},F:c};Ed(a)} 112 | function ve(a,b,c,d,f,g){rd||(rd=x(1684));a=Kd(a);Ed({target:a,G:"touchstart"==g||"touchend"==g,u:g,H:d,J:function(h){h=h||event;for(var n={},q=0;q>2]=h.ctrlKey;r[v+8>>2]=h.shiftKey;r[v+12>>2]=h.altKey;r[v+16>>2]=h.metaKey;v+=20;var z=a.getBoundingClientRect(), 113 | G=0;for(q in n){var A=n[q];r[v>>2]=A.identifier;r[v+4>>2]=A.screenX;r[v+8>>2]=A.screenY;r[v+12>>2]=A.clientX;r[v+16>>2]=A.clientY;r[v+20>>2]=A.pageX;r[v+24>>2]=A.pageY;r[v+28>>2]=A.ia;r[v+32>>2]=A.Ma;r[v+36>>2]=A.clientX-z.left;r[v+40>>2]=A.clientY-z.top;v+=52;if(32<=++G)break}r[u>>2]=G;re(d,f,u,b)&&h.preventDefault()},F:c})} 114 | function we(a,b,c,d,f){this.id=a;this.y=this.x=0;this.$=!1;this.ya=this.wa=0;this.width=b;this.height=c;this.va=b;this.ua=c;this.title=d;this.share=f;this.attributes=xe;this.buttons=0;this.keys=[];this.Z=[];this.Ta=0;this.M=this.P=this.I=this.W=this.C=this.N=this.U=this.ma=this.za=this.X=this.title=null}function X(a){return 0>=a||!Y?null:Y[a-1]} 115 | var ye=null,Z=null,Y=null,ze=null,xe=null,Ae={131073:0,131074:0,131075:1,131076:1,131077:1,135169:8,135170:8,135171:8,135172:8,135173:24,135174:8,135175:0,135176:0,135177:0,135178:0,135179:0,135180:0,135181:0,135182:0,135183:0,139265:196609,139266:1,139267:0,139268:0,139269:0,139270:0,139271:0,139272:0}; 116 | function Be(a){switch(a){case 32:return 32;case 222:return 39;case 188:return 44;case 173:return 45;case 189:return 45;case 190:return 46;case 191:return 47;case 48:return 48;case 49:return 49;case 50:return 50;case 51:return 51;case 52:return 52;case 53:return 53;case 54:return 54;case 55:return 55;case 56:return 56;case 57:return 57;case 59:return 59;case 61:return 61;case 187:return 61;case 65:return 65;case 66:return 66;case 67:return 67;case 68:return 68;case 69:return 69;case 70:return 70;case 71:return 71; 117 | case 72:return 72;case 73:return 73;case 74:return 74;case 75:return 75;case 76:return 76;case 77:return 77;case 78:return 78;case 79:return 79;case 80:return 80;case 81:return 81;case 82:return 82;case 83:return 83;case 84:return 84;case 85:return 85;case 86:return 86;case 87:return 87;case 88:return 88;case 89:return 89;case 90:return 90;case 219:return 91;case 220:return 92;case 221:return 93;case 192:return 94;case 27:return 256;case 13:return 257;case 9:return 258;case 8:return 259;case 45:return 260; 118 | case 46:return 261;case 39:return 262;case 37:return 263;case 40:return 264;case 38:return 265;case 33:return 266;case 34:return 267;case 36:return 268;case 35:return 269;case 20:return 280;case 145:return 281;case 144:return 282;case 44:return 283;case 19:return 284;case 112:return 290;case 113:return 291;case 114:return 292;case 115:return 293;case 116:return 294;case 117:return 295;case 118:return 296;case 119:return 297;case 120:return 298;case 121:return 299;case 122:return 300;case 123:return 301; 119 | case 124:return 302;case 125:return 303;case 126:return 304;case 127:return 305;case 128:return 306;case 129:return 307;case 130:return 308;case 131:return 309;case 132:return 310;case 133:return 311;case 134:return 312;case 135:return 313;case 136:return 314;case 96:return 320;case 97:return 321;case 98:return 322;case 99:return 323;case 100:return 324;case 101:return 325;case 102:return 326;case 103:return 327;case 104:return 328;case 105:return 329;case 110:return 330;case 111:return 331;case 106:return 332; 120 | case 109:return 333;case 107:return 334;case 16:return 340;case 17:return 341;case 18:return 342;case 91:return 343;case 93:return 348;default:return-1}}function Ce(){var a=Z,b=0;a.keys[340]&&(b|=1);a.keys[341]&&(b|=2);a.keys[342]&&(b|=4);a.keys[343]&&(b|=8);return b}function De(a){Z&&Z.M&&!a.ctrlKey&&!a.metaKey&&(a=a.charCode,0==a||0<=a&&31>=a||Ee(Z.M,Z.id,a))}function Fe(a,b){if(Z){var c=Be(a);if(-1!=c){var d=b&&Z.keys[c];Z.keys[c]=b;Z.Z[a]=b;Z.P&&(d&&(b=2),Ge(Z.P,Z.id,c,a,b,Ce()))}}} 121 | function He(){Ie()}function Je(){Ie()}function Ke(a){Fe(a.keyCode,1);8!==a.keyCode&&9!==a.keyCode||a.preventDefault()}function Le(a){Fe(a.keyCode,0)}function Me(){if(Z)for(var a=0;adf;df++)Zd[df]=cf.subarray(0,df+1);var ef=new Int32Array(256);for(df=0;256>df;df++)$d[df]=ef.subarray(0,df+1);for(var ff=0;32>ff;ff++)fe.push(Array(ff));function yb(a,b){var c=Array(Oa(a)+1);a=Na(a,c,0,c.length);b&&(c.length=a);return c} 133 | var nf={__assert_fail:function(a,b,c,d){l("Assertion failed: "+B(a)+", at: "+[b?B(b):"unknown filename",c,d?B(d):"unknown function"])},__handle_stack_overflow:function(){l("stack overflow")},__lock:function(){},__syscall221:function(a,b){rc=b;try{var c=sc();switch(M()){case 0:var d=M();return 0>d?-28:ec(c.path,c.flags,0,d).fd;case 1:case 2:return 0;case 3:return c.flags;case 4:return d=M(),c.flags|=d,0;case 12:return d=M(),Aa[d+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return ob(), 134 | -1;default:return-28}}catch(f){return"undefined"!==typeof qc&&f instanceof I||l(f),-f.s}},__syscall5:function(a,b){rc=b;try{var c=B(M()),d=M(),f=M();return ec(c,d,f).fd}catch(g){return"undefined"!==typeof qc&&g instanceof I||l(g),-g.s}},__syscall54:function(a,b){rc=b;try{var c=sc(),d=M();switch(d){case 21509:case 21505:return c.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return c.tty?0:-59;case 21519:if(!c.tty)return-59;var f=M();return r[f>>2]=0;case 21520:return c.tty? 135 | -28:-59;case 21531:a=f=M();if(!c.f.Ha)throw new I(59);return c.f.Ha(c,d,a);case 21523:return c.tty?0:-59;case 21524:return c.tty?0:-59;default:l("bad ioctl syscall "+d)}}catch(g){return"undefined"!==typeof qc&&g instanceof I||l(g),-g.s}},__unlock:function(){},abort:function(){l()},abs:Ca,eglGetProcAddress:function(a){return gf(a)},emscripten_exit_pointerlock:function(){for(var a=Ad,b=0;b>3]=a.width;Ga[c>>3]=a.height;return 0},emscripten_get_gamepad_status:function(a,b){if(!Gd)throw"emscripten_get_gamepad_status() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!";if(0>a||a>=Gd.length)return-5;if(!Gd[a])return-7;Ld(b,Gd[a]);return 0},emscripten_get_num_gamepads:function(){if(!Gd)throw"emscripten_get_num_gamepads() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!"; 137 | return Gd.length},emscripten_get_pointerlock_status:function(a){if(a){var b=document.pointerLockElement||document.Ba||document.vd||document.ud;r[a>>2]=!!b;var c=b&&b.id?b.id:"";C(Fd(b),a+4,128);C(c,a+132,128)}return document.body&&(document.body.requestPointerLock||document.body.L||document.body.Ba||document.body.V)?0:-1},emscripten_glActiveTexture:function(a){O.activeTexture(a)},emscripten_glAttachShader:function(a,b){O.attachShader(R[a],T[b])},emscripten_glBeginQueryEXT:function(a,b){O.h.beginQueryEXT(a, 138 | U[b])},emscripten_glBindAttribLocation:function(a,b,c){O.bindAttribLocation(R[a],b,B(c))},emscripten_glBindBuffer:function(a,b){O.bindBuffer(a,Rd[b])},emscripten_glBindFramebuffer:function(a,b){O.bindFramebuffer(a,Sd[b])},emscripten_glBindRenderbuffer:function(a,b){O.bindRenderbuffer(a,Td[b])},emscripten_glBindTexture:function(a,b){O.bindTexture(a,Ud[b])},emscripten_glBindVertexArrayOES:function(a){O.bindVertexArray(Vd[a])},emscripten_glBlendColor:function(a,b,c,d){O.blendColor(a,b,c,d)},emscripten_glBlendEquation:function(a){O.blendEquation(a)}, 139 | emscripten_glBlendEquationSeparate:function(a,b){O.blendEquationSeparate(a,b)},emscripten_glBlendFunc:function(a,b){O.blendFunc(a,b)},emscripten_glBlendFuncSeparate:function(a,b,c,d){O.blendFuncSeparate(a,b,c,d)},emscripten_glBufferData:function(a,b,c,d){O.bufferData(a,c?y.subarray(c,c+b):b,d)},emscripten_glBufferSubData:function(a,b,c,d){O.bufferSubData(a,b,y.subarray(d,d+c))},emscripten_glCheckFramebufferStatus:function(a){return O.checkFramebufferStatus(a)},emscripten_glClear:function(a){O.clear(a)}, 140 | emscripten_glClearColor:function(a,b,c,d){O.clearColor(a,b,c,d)},emscripten_glClearDepthf:function(a){O.clearDepth(a)},emscripten_glClearStencil:function(a){O.clearStencil(a)},emscripten_glColorMask:function(a,b,c,d){O.colorMask(!!a,!!b,!!c,!!d)},emscripten_glCompileShader:function(a){O.compileShader(T[a])},emscripten_glCompressedTexImage2D:function(a,b,c,d,f,g,h,n){O.compressedTexImage2D(a,b,c,d,f,g,n?y.subarray(n,n+h):null)},emscripten_glCompressedTexSubImage2D:function(a,b,c,d,f,g,h,n,q){O.compressedTexSubImage2D(a, 141 | b,c,d,f,g,h,q?y.subarray(q,q+n):null)},emscripten_glCopyTexImage2D:function(a,b,c,d,f,g,h,n){O.copyTexImage2D(a,b,c,d,f,g,h,n)},emscripten_glCopyTexSubImage2D:function(a,b,c,d,f,g,h,n){O.copyTexSubImage2D(a,b,c,d,f,g,h,n)},emscripten_glCreateProgram:function(){var a=Yd(R),b=O.createProgram();b.name=a;R[a]=b;return a},emscripten_glCreateShader:function(a){var b=Yd(T);T[b]=O.createShader(a);return b},emscripten_glCullFace:function(a){O.cullFace(a)},emscripten_glDeleteBuffers:function(a,b){for(var c= 142 | 0;c>2],f=Rd[d];f&&(O.deleteBuffer(f),f.name=0,Rd[d]=null,d==de&&(de=0),d==ee&&(ee=0))}},emscripten_glDeleteFramebuffers:function(a,b){for(var c=0;c>2],f=Sd[d];f&&(O.deleteFramebuffer(f),f.name=0,Sd[d]=null)}},emscripten_glDeleteProgram:function(a){if(a){var b=R[a];b?(O.deleteProgram(b),b.name=0,R[a]=null,V[a]=null):W(1281)}},emscripten_glDeleteQueriesEXT:function(a,b){for(var c=0;c>2],f=U[d];f&&(O.h.deleteQueryEXT(f),U[d]=null)}},emscripten_glDeleteRenderbuffers:function(a, 143 | b){for(var c=0;c>2],f=Td[d];f&&(O.deleteRenderbuffer(f),f.name=0,Td[d]=null)}},emscripten_glDeleteShader:function(a){if(a){var b=T[a];b?(O.deleteShader(b),T[a]=null):W(1281)}},emscripten_glDeleteTextures:function(a,b){for(var c=0;c>2],f=Ud[d];f&&(O.deleteTexture(f),f.name=0,Ud[d]=null)}},emscripten_glDeleteVertexArraysOES:function(a,b){for(var c=0;c>2];O.deleteVertexArray(Vd[d]);Vd[d]=null}},emscripten_glDepthFunc:function(a){O.depthFunc(a)}, 144 | emscripten_glDepthMask:function(a){O.depthMask(!!a)},emscripten_glDepthRangef:function(a,b){O.depthRange(a,b)},emscripten_glDetachShader:function(a,b){O.detachShader(R[a],T[b])},emscripten_glDisable:function(a){O.disable(a)},emscripten_glDisableVertexAttribArray:function(a){O.disableVertexAttribArray(a)},emscripten_glDrawArrays:function(a,b,c){O.drawArrays(a,b,c)},emscripten_glDrawArraysInstancedANGLE:function(a,b,c,d){O.drawArraysInstanced(a,b,c,d)},emscripten_glDrawBuffersWEBGL:function(a,b){for(var c= 145 | fe[a],d=0;d>2];O.drawBuffers(c)},emscripten_glDrawElements:function(a,b,c,d){O.drawElements(a,b,c,d)},emscripten_glDrawElementsInstancedANGLE:function(a,b,c,d,f){O.drawElementsInstanced(a,b,c,d,f)},emscripten_glEnable:function(a){O.enable(a)},emscripten_glEnableVertexAttribArray:function(a){O.enableVertexAttribArray(a)},emscripten_glEndQueryEXT:function(a){O.h.endQueryEXT(a)},emscripten_glFinish:function(){O.finish()},emscripten_glFlush:function(){O.flush()},emscripten_glFramebufferRenderbuffer:function(a, 146 | b,c,d){O.framebufferRenderbuffer(a,b,c,Td[d])},emscripten_glFramebufferTexture2D:function(a,b,c,d,f){O.framebufferTexture2D(a,b,c,Ud[d],f)},emscripten_glFrontFace:function(a){O.frontFace(a)},emscripten_glGenBuffers:function(a,b){ge(a,b,"createBuffer",Rd)},emscripten_glGenFramebuffers:function(a,b){ge(a,b,"createFramebuffer",Sd)},emscripten_glGenQueriesEXT:function(a,b){for(var c=0;c>2]=0;break}var f=Yd(U);d.name=f;U[f]=d;r[b+4*c>> 147 | 2]=f}},emscripten_glGenRenderbuffers:function(a,b){ge(a,b,"createRenderbuffer",Td)},emscripten_glGenTextures:function(a,b){ge(a,b,"createTexture",Ud)},emscripten_glGenVertexArraysOES:function(a,b){ge(a,b,"createVertexArray",Vd)},emscripten_glGenerateMipmap:function(a){O.generateMipmap(a)},emscripten_glGetActiveAttrib:function(a,b,c,d,f,g,h){a=R[a];if(a=O.getActiveAttrib(a,b))c=0>2]=c),f&&(r[f>>2]=a.size),g&&(r[g>>2]=a.type)},emscripten_glGetActiveUniform:function(a,b, 148 | c,d,f,g,h){a=R[a];if(a=O.getActiveUniform(a,b))c=0>2]=c),f&&(r[f>>2]=a.size),g&&(r[g>>2]=a.type)},emscripten_glGetAttachedShaders:function(a,b,c,d){a=O.getAttachedShaders(R[a]);var f=a.length;f>b&&(f=b);r[c>>2]=f;for(b=0;b>2]=T.indexOf(a[b])},emscripten_glGetAttribLocation:function(a,b){return O.getAttribLocation(R[a],B(b))},emscripten_glGetBooleanv:function(a,b){ie(a,b,4)},emscripten_glGetBufferParameteriv:function(a,b,c){c?r[c>>2]=O.getBufferParameter(a, 149 | b):W(1281)},emscripten_glGetError:function(){var a=O.getError()||Qd;Qd=0;return a},emscripten_glGetFloatv:function(a,b){ie(a,b,2)},emscripten_glGetFramebufferAttachmentParameteriv:function(a,b,c,d){a=O.getFramebufferAttachmentParameter(a,b,c);if(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)a=a.name|0;r[d>>2]=a},emscripten_glGetIntegerv:function(a,b){ie(a,b,0)},emscripten_glGetProgramInfoLog:function(a,b,c,d){a=O.getProgramInfoLog(R[a]);null===a&&(a="(unknown error)");b=0>2]=b)},emscripten_glGetProgramiv:function(a,b,c){if(c)if(a>=Pd)W(1281);else{var d=V[a];if(d)if(35716==b)a=O.getProgramInfoLog(R[a]),null===a&&(a="(unknown error)"),r[c>>2]=a.length+1;else if(35719==b)r[c>>2]=d.R;else if(35722==b){if(-1==d.i){a=R[a];var f=O.getProgramParameter(a,35721);for(b=d.i=0;b>2]=d.i}else if(35381==b){if(-1==d.j)for(a=R[a],f=O.getProgramParameter(a,35382),b=d.j=0;b>2]=d.j}else r[c>>2]=O.getProgramParameter(R[a],b);else W(1282)}else W(1281)},emscripten_glGetQueryObjecti64vEXT:function(a,b,c){if(c){a=O.h.getQueryObjectEXT(U[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;he(c,d)}else W(1281)},emscripten_glGetQueryObjectivEXT:function(a,b,c){if(c){a=O.h.getQueryObjectEXT(U[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;r[c>>2]=d}else W(1281)},emscripten_glGetQueryObjectui64vEXT:function(a,b,c){if(c){a=O.h.getQueryObjectEXT(U[a],b);var d;"boolean"==typeof a? 152 | d=a?1:0:d=a;he(c,d)}else W(1281)},emscripten_glGetQueryObjectuivEXT:function(a,b,c){if(c){a=O.h.getQueryObjectEXT(U[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;r[c>>2]=d}else W(1281)},emscripten_glGetQueryivEXT:function(a,b,c){c?r[c>>2]=O.h.getQueryEXT(a,b):W(1281)},emscripten_glGetRenderbufferParameteriv:function(a,b,c){c?r[c>>2]=O.getRenderbufferParameter(a,b):W(1281)},emscripten_glGetShaderInfoLog:function(a,b,c,d){a=O.getShaderInfoLog(T[a]);null===a&&(a="(unknown error)");b=0>2]=b)},emscripten_glGetShaderPrecisionFormat:function(a,b,c,d){a=O.getShaderPrecisionFormat(a,b);r[c>>2]=a.rangeMin;r[c+4>>2]=a.rangeMax;r[d>>2]=a.precision},emscripten_glGetShaderSource:function(a,b,c,d){if(a=O.getShaderSource(T[a]))b=0>2]=b)},emscripten_glGetShaderiv:function(a,b,c){c?35716==b?(a=O.getShaderInfoLog(T[a]),null===a&&(a="(unknown error)"),r[c>>2]=a.length+1):35720==b?(a=O.getShaderSource(T[a]),r[c>>2]=null===a||0==a.length?0:a.length+1):r[c>>2]=O.getShaderParameter(T[a], 154 | b):W(1281)},emscripten_glGetString:function(a){if(Wd[a])return Wd[a];switch(a){case 7939:var b=O.getSupportedExtensions()||[];b=b.concat(b.map(function(d){return"GL_"+d}));b=je(b.join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=O.getParameter(a))||W(1280);b=je(b);break;case 7938:b=je("OpenGL ES 2.0 ("+O.getParameter(7938)+")");break;case 35724:b=O.getParameter(35724);var c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),b="OpenGL ES GLSL ES "+ 155 | c[1]+" ("+b+")");b=je(b);break;default:return W(1280),0}return Wd[a]=b},emscripten_glGetTexParameterfv:function(a,b,c){c?w[c>>2]=O.getTexParameter(a,b):W(1281)},emscripten_glGetTexParameteriv:function(a,b,c){c?r[c>>2]=O.getTexParameter(a,b):W(1281)},emscripten_glGetUniformLocation:function(a,b){b=B(b);var c=0;if("]"==b[b.length-1]){var d=b.lastIndexOf("[");c="]"!=b[d+1]?parseInt(b.slice(d+1)):0;b=b.slice(0,d)}return(a=V[a]&&V[a].fa[b])&&0<=c&&c>2]=O.getVertexAttribOffset(a,b):W(1281)},emscripten_glGetVertexAttribfv:function(a,b,c){le(a,b,c,2)},emscripten_glGetVertexAttribiv:function(a,b,c){le(a,b,c,5)},emscripten_glHint:function(a,b){O.hint(a,b)},emscripten_glIsBuffer:function(a){return(a=Rd[a])?O.isBuffer(a):0},emscripten_glIsEnabled:function(a){return O.isEnabled(a)},emscripten_glIsFramebuffer:function(a){return(a= 157 | Sd[a])?O.isFramebuffer(a):0},emscripten_glIsProgram:function(a){return(a=R[a])?O.isProgram(a):0},emscripten_glIsQueryEXT:function(a){return(a=U[a])?O.h.isQueryEXT(a):0},emscripten_glIsRenderbuffer:function(a){return(a=Td[a])?O.isRenderbuffer(a):0},emscripten_glIsShader:function(a){return(a=T[a])?O.isShader(a):0},emscripten_glIsTexture:function(a){return(a=Ud[a])?O.isTexture(a):0},emscripten_glIsVertexArrayOES:function(a){return(a=Vd[a])?O.isVertexArray(a):0},emscripten_glLineWidth:function(a){O.lineWidth(a)}, 158 | emscripten_glLinkProgram:function(a){O.linkProgram(R[a]);ce(a)},emscripten_glPixelStorei:function(a,b){3317==a&&(Xd=b);O.pixelStorei(a,b)},emscripten_glPolygonOffset:function(a,b){O.polygonOffset(a,b)},emscripten_glQueryCounterEXT:function(a,b){O.h.queryCounterEXT(U[a],b)},emscripten_glReadPixels:function(a,b,c,d,f,g,h){(h=me(g,f,c,d,h))?O.readPixels(a,b,c,d,f,g,h):W(1280)},emscripten_glReleaseShaderCompiler:function(){},emscripten_glRenderbufferStorage:function(a,b,c,d){O.renderbufferStorage(a,b, 159 | c,d)},emscripten_glSampleCoverage:function(a,b){O.sampleCoverage(a,!!b)},emscripten_glScissor:function(a,b,c,d){O.scissor(a,b,c,d)},emscripten_glShaderBinary:function(){W(1280)},emscripten_glShaderSource:function(a,b,c,d){b=ae(b,c,d);O.shaderSource(T[a],b)},emscripten_glStencilFunc:function(a,b,c){O.stencilFunc(a,b,c)},emscripten_glStencilFuncSeparate:function(a,b,c,d){O.stencilFuncSeparate(a,b,c,d)},emscripten_glStencilMask:function(a){O.stencilMask(a)},emscripten_glStencilMaskSeparate:function(a, 160 | b){O.stencilMaskSeparate(a,b)},emscripten_glStencilOp:function(a,b,c){O.stencilOp(a,b,c)},emscripten_glStencilOpSeparate:function(a,b,c,d){O.stencilOpSeparate(a,b,c,d)},emscripten_glTexImage2D:function(a,b,c,d,f,g,h,n,q){O.texImage2D(a,b,c,d,f,g,h,n,q?me(n,h,d,f,q):null)},emscripten_glTexParameterf:function(a,b,c){O.texParameterf(a,b,c)},emscripten_glTexParameterfv:function(a,b,c){O.texParameterf(a,b,w[c>>2])},emscripten_glTexParameteri:function(a,b,c){O.texParameteri(a,b,c)},emscripten_glTexParameteriv:function(a, 161 | b,c){O.texParameteri(a,b,r[c>>2])},emscripten_glTexSubImage2D:function(a,b,c,d,f,g,h,n,q){var u=null;q&&(u=me(n,h,f,g,q));O.texSubImage2D(a,b,c,d,f,g,h,n,u)},emscripten_glUniform1f:function(a,b){O.uniform1f(S[a],b)},emscripten_glUniform1fv:function(a,b,c){if(256>=b)for(var d=Zd[b-1],f=0;f>2];else d=w.subarray(c>>2,c+4*b>>2);O.uniform1fv(S[a],d)},emscripten_glUniform1i:function(a,b){O.uniform1i(S[a],b)},emscripten_glUniform1iv:function(a,b,c){if(256>=b)for(var d=$d[b-1],f=0;f>2];else d=r.subarray(c>>2,c+4*b>>2);O.uniform1iv(S[a],d)},emscripten_glUniform2f:function(a,b,c){O.uniform2f(S[a],b,c)},emscripten_glUniform2fv:function(a,b,c){if(256>=2*b)for(var d=Zd[2*b-1],f=0;f<2*b;f+=2)d[f]=w[c+4*f>>2],d[f+1]=w[c+(4*f+4)>>2];else d=w.subarray(c>>2,c+8*b>>2);O.uniform2fv(S[a],d)},emscripten_glUniform2i:function(a,b,c){O.uniform2i(S[a],b,c)},emscripten_glUniform2iv:function(a,b,c){if(256>=2*b)for(var d=$d[2*b-1],f=0;f<2*b;f+=2)d[f]=r[c+4*f>>2],d[f+1]=r[c+(4*f+4)>>2];else d= 163 | r.subarray(c>>2,c+8*b>>2);O.uniform2iv(S[a],d)},emscripten_glUniform3f:function(a,b,c,d){O.uniform3f(S[a],b,c,d)},emscripten_glUniform3fv:function(a,b,c){if(256>=3*b)for(var d=Zd[3*b-1],f=0;f<3*b;f+=3)d[f]=w[c+4*f>>2],d[f+1]=w[c+(4*f+4)>>2],d[f+2]=w[c+(4*f+8)>>2];else d=w.subarray(c>>2,c+12*b>>2);O.uniform3fv(S[a],d)},emscripten_glUniform3i:function(a,b,c,d){O.uniform3i(S[a],b,c,d)},emscripten_glUniform3iv:function(a,b,c){if(256>=3*b)for(var d=$d[3*b-1],f=0;f<3*b;f+=3)d[f]=r[c+4*f>>2],d[f+1]=r[c+ 164 | (4*f+4)>>2],d[f+2]=r[c+(4*f+8)>>2];else d=r.subarray(c>>2,c+12*b>>2);O.uniform3iv(S[a],d)},emscripten_glUniform4f:function(a,b,c,d,f){O.uniform4f(S[a],b,c,d,f)},emscripten_glUniform4fv:function(a,b,c){if(256>=4*b)for(var d=Zd[4*b-1],f=0;f<4*b;f+=4)d[f]=w[c+4*f>>2],d[f+1]=w[c+(4*f+4)>>2],d[f+2]=w[c+(4*f+8)>>2],d[f+3]=w[c+(4*f+12)>>2];else d=w.subarray(c>>2,c+16*b>>2);O.uniform4fv(S[a],d)},emscripten_glUniform4i:function(a,b,c,d,f){O.uniform4i(S[a],b,c,d,f)},emscripten_glUniform4iv:function(a,b,c){if(256>= 165 | 4*b)for(var d=$d[4*b-1],f=0;f<4*b;f+=4)d[f]=r[c+4*f>>2],d[f+1]=r[c+(4*f+4)>>2],d[f+2]=r[c+(4*f+8)>>2],d[f+3]=r[c+(4*f+12)>>2];else d=r.subarray(c>>2,c+16*b>>2);O.uniform4iv(S[a],d)},emscripten_glUniformMatrix2fv:function(a,b,c,d){if(256>=4*b)for(var f=Zd[4*b-1],g=0;g<4*b;g+=4)f[g]=w[d+4*g>>2],f[g+1]=w[d+(4*g+4)>>2],f[g+2]=w[d+(4*g+8)>>2],f[g+3]=w[d+(4*g+12)>>2];else f=w.subarray(d>>2,d+16*b>>2);O.uniformMatrix2fv(S[a],!!c,f)},emscripten_glUniformMatrix3fv:function(a,b,c,d){if(256>=9*b)for(var f=Zd[9* 166 | b-1],g=0;g<9*b;g+=9)f[g]=w[d+4*g>>2],f[g+1]=w[d+(4*g+4)>>2],f[g+2]=w[d+(4*g+8)>>2],f[g+3]=w[d+(4*g+12)>>2],f[g+4]=w[d+(4*g+16)>>2],f[g+5]=w[d+(4*g+20)>>2],f[g+6]=w[d+(4*g+24)>>2],f[g+7]=w[d+(4*g+28)>>2],f[g+8]=w[d+(4*g+32)>>2];else f=w.subarray(d>>2,d+36*b>>2);O.uniformMatrix3fv(S[a],!!c,f)},emscripten_glUniformMatrix4fv:function(a,b,c,d){if(256>=16*b)for(var f=Zd[16*b-1],g=0;g<16*b;g+=16)f[g]=w[d+4*g>>2],f[g+1]=w[d+(4*g+4)>>2],f[g+2]=w[d+(4*g+8)>>2],f[g+3]=w[d+(4*g+12)>>2],f[g+4]=w[d+(4*g+16)>>2], 167 | f[g+5]=w[d+(4*g+20)>>2],f[g+6]=w[d+(4*g+24)>>2],f[g+7]=w[d+(4*g+28)>>2],f[g+8]=w[d+(4*g+32)>>2],f[g+9]=w[d+(4*g+36)>>2],f[g+10]=w[d+(4*g+40)>>2],f[g+11]=w[d+(4*g+44)>>2],f[g+12]=w[d+(4*g+48)>>2],f[g+13]=w[d+(4*g+52)>>2],f[g+14]=w[d+(4*g+56)>>2],f[g+15]=w[d+(4*g+60)>>2];else f=w.subarray(d>>2,d+64*b>>2);O.uniformMatrix4fv(S[a],!!c,f)},emscripten_glUseProgram:function(a){O.useProgram(R[a])},emscripten_glValidateProgram:function(a){O.validateProgram(R[a])},emscripten_glVertexAttrib1f:function(a,b){O.vertexAttrib1f(a, 168 | b)},emscripten_glVertexAttrib1fv:function(a,b){O.vertexAttrib1f(a,w[b>>2])},emscripten_glVertexAttrib2f:function(a,b,c){O.vertexAttrib2f(a,b,c)},emscripten_glVertexAttrib2fv:function(a,b){O.vertexAttrib2f(a,w[b>>2],w[b+4>>2])},emscripten_glVertexAttrib3f:function(a,b,c,d){O.vertexAttrib3f(a,b,c,d)},emscripten_glVertexAttrib3fv:function(a,b){O.vertexAttrib3f(a,w[b>>2],w[b+4>>2],w[b+8>>2])},emscripten_glVertexAttrib4f:function(a,b,c,d,f){O.vertexAttrib4f(a,b,c,d,f)},emscripten_glVertexAttrib4fv:function(a, 169 | b){O.vertexAttrib4f(a,w[b>>2],w[b+4>>2],w[b+8>>2],w[b+12>>2])},emscripten_glVertexAttribDivisorANGLE:function(a,b){O.vertexAttribDivisor(a,b)},emscripten_glVertexAttribPointer:function(a,b,c,d,f,g){O.vertexAttribPointer(a,b,c,!!d,f,g)},emscripten_glViewport:function(a,b,c,d){O.viewport(a,b,c,d)},emscripten_longjmp:function(a,b){hf(a,b||1);throw"longjmp";},emscripten_memcpy_big:function(a,b,c){y.set(y.subarray(b,b+c),a)},emscripten_request_pointerlock:function(a,b){a=Kd(a);return a?a.requestPointerLock|| 170 | a.V?Cd&&Dd.G?Ad(a):b?(zd([a]),1):-2:-1:-4},emscripten_resize_heap:function(a){l("Cannot enlarge memory arrays to size "+a+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+p.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},emscripten_run_script:function(a){eval(B(a))},emscripten_sample_gamepad_data:function(){return(Gd= 171 | navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null)?0:-1},emscripten_set_click_callback_on_thread:function(a,b,c,d){qe(a,b,c,d);return 0},emscripten_set_fullscreenchange_callback_on_thread:function(a,b,c,d){if(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)return-1;a=Kd(a);if(!a)return-4;se(a,b,c,d,"fullscreenchange");se(a,b,c,d,"webkitfullscreenchange");return 0},emscripten_set_gamepadconnected_callback_on_thread:function(a, 172 | b,c){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;te(a,b,c,26,"gamepadconnected");return 0},emscripten_set_gamepaddisconnected_callback_on_thread:function(a,b,c){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;te(a,b,c,27,"gamepaddisconnected");return 0},emscripten_set_keypress_callback_on_thread:function(a,b,c,d){ue(a,b,c,d);return 0},emscripten_set_main_loop:Cc,emscripten_set_touchcancel_callback_on_thread:function(a,b,c,d){ve(a,b,c,d,25,"touchcancel");return 0}, 173 | emscripten_set_touchend_callback_on_thread:function(a,b,c,d){ve(a,b,c,d,23,"touchend");return 0},emscripten_set_touchmove_callback_on_thread:function(a,b,c,d){ve(a,b,c,d,24,"touchmove");return 0},emscripten_set_touchstart_callback_on_thread:function(a,b,c,d){ve(a,b,c,d,22,"touchstart");return 0},emscripten_sleep:function(){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_sleep";},exit:function(a){jf(a)},fd_close:function(a){try{var b=sc(a); 174 | hc(b);return 0}catch(c){return"undefined"!==typeof qc&&c instanceof I||l(c),c.s}},fd_read:function(a,b,c,d){try{a:{for(var f=sc(a),g=a=0;g>2],n=f,q=r[b+8*g>>2],u=h,v=void 0,z=p;if(0>u||0>v)throw new I(28);if(null===n.fd)throw new I(8);if(1===(n.flags&2097155))throw new I(8);if(16384===(n.node.mode&61440))throw new I(31);if(!n.f.read)throw new I(28);var G="undefined"!==typeof v;if(!G)v=n.position;else if(!n.seekable)throw new I(70);var A=n.f.read(n,z,q,u,v);G||(n.position+= 175 | A);var P=A;if(0>P){var Qb=-1;break a}a+=P;if(P>2]=Qb;return 0}catch(Rc){return"undefined"!==typeof qc&&Rc instanceof I||l(Rc),Rc.s}},fd_seek:function(a,b,c,d,f){try{var g=sc(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;ic(g,a,d);Ba=[g.position>>>0,(t=g.position,1<=+Ca(t)?0>>0:~~+Fa((t-+(~~t>>>0))/4294967296)>>>0:0)];r[f>>2]=Ba[0];r[f+4>>2]=Ba[1];g.aa&&0===a&&0===d&&(g.aa=null);return 0}catch(h){return"undefined"!== 176 | typeof qc&&h instanceof I||l(h),h.s}},fd_write:function(a,b,c,d){try{a:{for(var f=sc(a),g=a=0;g>2],r[b+(8*g+4)>>2]);if(0>h){var n=-1;break a}a+=h}n=a}r[d>>2]=n;return 0}catch(q){return"undefined"!==typeof qc&&q instanceof I||l(q),q.s}},getTempRet0:function(){return wa|0},glActiveTexture:function(a){O.activeTexture(a)},glAttachShader:function(a,b){O.attachShader(R[a],T[b])},glBindAttribLocation:function(a,b,c){O.bindAttribLocation(R[a],b,B(c))},glBindBuffer:function(a, 177 | b){O.bindBuffer(a,Rd[b])},glBindTexture:function(a,b){O.bindTexture(a,Ud[b])},glBlendFunc:function(a,b){O.blendFunc(a,b)},glBufferData:function(a,b,c,d){O.bufferData(a,c?y.subarray(c,c+b):b,d)},glBufferSubData:function(a,b,c,d){O.bufferSubData(a,b,y.subarray(d,d+c))},glClear:function(a){O.clear(a)},glClearColor:function(a,b,c,d){O.clearColor(a,b,c,d)},glClearDepthf:function(a){O.clearDepth(a)},glCompileShader:function(a){O.compileShader(T[a])},glCompressedTexImage2D:function(a,b,c,d,f,g,h,n){O.compressedTexImage2D(a, 178 | b,c,d,f,g,n?y.subarray(n,n+h):null)},glCreateProgram:function(){var a=Yd(R),b=O.createProgram();b.name=a;R[a]=b;return a},glCreateShader:function(a){var b=Yd(T);T[b]=O.createShader(a);return b},glCullFace:function(a){O.cullFace(a)},glDeleteProgram:function(a){if(a){var b=R[a];b?(O.deleteProgram(b),b.name=0,R[a]=null,V[a]=null):W(1281)}},glDepthFunc:function(a){O.depthFunc(a)},glDisable:function(a){O.disable(a)},glDrawArrays:function(a,b,c){O.drawArrays(a,b,c)},glDrawElements:function(a,b,c,d){O.drawElements(a, 179 | b,c,d)},glEnable:function(a){O.enable(a)},glEnableVertexAttribArray:function(a){O.enableVertexAttribArray(a)},glFrontFace:function(a){O.frontFace(a)},glGenBuffers:function(a,b){ge(a,b,"createBuffer",Rd)},glGenTextures:function(a,b){ge(a,b,"createTexture",Ud)},glGetAttribLocation:function(a,b){return O.getAttribLocation(R[a],B(b))},glGetFloatv:function(a,b){ie(a,b,2)},glGetProgramInfoLog:function(a,b,c,d){a=O.getProgramInfoLog(R[a]);null===a&&(a="(unknown error)");b=0>2]=b)}, 180 | glGetProgramiv:function(a,b,c){if(c)if(a>=Pd)W(1281);else{var d=V[a];if(d)if(35716==b)a=O.getProgramInfoLog(R[a]),null===a&&(a="(unknown error)"),r[c>>2]=a.length+1;else if(35719==b)r[c>>2]=d.R;else if(35722==b){if(-1==d.i){a=R[a];var f=O.getProgramParameter(a,35721);for(b=d.i=0;b>2]=d.i}else if(35381==b){if(-1==d.j)for(a=R[a],f=O.getProgramParameter(a,35382),b=d.j=0;b>2]=d.j}else r[c>>2]=O.getProgramParameter(R[a],b);else W(1282)}else W(1281)},glGetShaderInfoLog:function(a,b,c,d){a=O.getShaderInfoLog(T[a]);null===a&&(a="(unknown error)");b=0>2]=b)},glGetShaderiv:function(a,b,c){c?35716==b?(a=O.getShaderInfoLog(T[a]),null===a&&(a="(unknown error)"),r[c>>2]=a.length+1):35720==b?(a=O.getShaderSource(T[a]),r[c>>2]=null===a||0==a.length?0:a.length+1):r[c>>2]=O.getShaderParameter(T[a],b):W(1281)},glGetString:function(a){if(Wd[a])return Wd[a]; 182 | switch(a){case 7939:var b=O.getSupportedExtensions()||[];b=b.concat(b.map(function(d){return"GL_"+d}));b=je(b.join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=O.getParameter(a))||W(1280);b=je(b);break;case 7938:b=je("OpenGL ES 2.0 ("+O.getParameter(7938)+")");break;case 35724:b=O.getParameter(35724);var c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),b="OpenGL ES GLSL ES "+c[1]+" ("+b+")");b=je(b);break;default:return W(1280),0}return Wd[a]= 183 | b},glGetUniformLocation:function(a,b){b=B(b);var c=0;if("]"==b[b.length-1]){var d=b.lastIndexOf("[");c="]"!=b[d+1]?parseInt(b.slice(d+1)):0;b=b.slice(0,d)}return(a=V[a]&&V[a].fa[b])&&0<=c&&c=16*b)for(var f=Zd[16*b-1],g=0;g<16*b;g+=16)f[g]=w[d+4*g>>2],f[g+1]=w[d+(4*g+4)>>2],f[g+2]=w[d+(4*g+8)>>2],f[g+3]=w[d+(4*g+12)>>2],f[g+4]=w[d+(4*g+16)>>2],f[g+5]=w[d+(4*g+20)>>2],f[g+6]=w[d+(4*g+24)>>2],f[g+7]=w[d+(4*g+28)>>2], 185 | f[g+8]=w[d+(4*g+32)>>2],f[g+9]=w[d+(4*g+36)>>2],f[g+10]=w[d+(4*g+40)>>2],f[g+11]=w[d+(4*g+44)>>2],f[g+12]=w[d+(4*g+48)>>2],f[g+13]=w[d+(4*g+52)>>2],f[g+14]=w[d+(4*g+56)>>2],f[g+15]=w[d+(4*g+60)>>2];else f=w.subarray(d>>2,d+64*b>>2);O.uniformMatrix4fv(S[a],!!c,f)},glUseProgram:function(a){O.useProgram(R[a])},glVertexAttribPointer:function(a,b,c,d,f,g){O.vertexAttribPointer(a,b,c,!!d,f,g)},glViewport:function(a,b,c,d){O.viewport(a,b,c,d)},glfwCreateWindow:function(a,b,c,d,f){var g;for(g=0;g=a||0>=b)h=0;else{d?bd():nd(a,b);for(g=0;g>2];a=r[a+4>>2];if(0>a||999999999c)return ob(),-1;0!==b&&(r[b>>2]=0,r[b+4>>2]=0);b=1E6*c+a/1E3;for(c=N();N()-c>2]|0;if(0==(f|0))break; 194 | if((f|0)==(a|0))return r[b+((d<<3)+4)>>2]|0;d=d+1|0}return 0},time:function(a){var b=Date.now()/1E3|0;a&&(r[a>>2]=b);return b}},of=function(){function a(g){e.asm=g.exports;cb--;e.monitorRunDependencies&&e.monitorRunDependencies(cb);assert(fb["wasm-instantiate"]);delete fb["wasm-instantiate"];0==cb&&(null!==db&&(clearInterval(db),db=null),eb&&(g=eb,eb=null,g()))}function b(g){assert(e===f,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"); 195 | f=null;a(g.instance)}function c(g){return mb().then(function(h){return WebAssembly.instantiate(h,d)}).then(g,function(h){m("failed to asynchronously prepare wasm: "+h);l(h)})}var d={env:nf,wasi_snapshot_preview1:nf};gb();var f=e;if(e.instantiateWasm)try{return e.instantiateWasm(d,a)}catch(g){return m("Module.instantiateWasm callback failed with error: "+g),!1}(function(){if(xa||"function"!==typeof WebAssembly.instantiateStreaming||ib()||"function"!==typeof fetch)return c(b);fetch(jb,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g, 196 | d).then(b,function(h){m("wasm streaming compile failed: "+h);m("falling back to ArrayBuffer instantiation");c(b)})})})();return{}}();e.asm=of;var nb=e.___wasm_call_ctors=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.__wasm_call_ctors.apply(null,arguments)}; 197 | e._main=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.main.apply(null,arguments)};e._fflush=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.fflush.apply(null,arguments)}; 198 | var Ze=e._free=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.free.apply(null,arguments)},pe=e._realloc=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.realloc.apply(null,arguments)}, 199 | x=e._malloc=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.malloc.apply(null,arguments)}; 200 | e.___errno_location=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.__errno_location.apply(null,arguments)}; 201 | var hf=e._setThrew=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.setThrew.apply(null,arguments)},gf=e._emscripten_GetProcAddress=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.emscripten_GetProcAddress.apply(null, 202 | arguments)},pf=e.dynCall_v=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.dynCall_v.apply(null,arguments)},qf=e.dynCall_vi=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.dynCall_vi.apply(null, 203 | arguments)},rf=e.dynCall_iii=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.dynCall_iii.apply(null,arguments)}; 204 | e.___set_stack_limit=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.__set_stack_limit.apply(null,arguments)}; 205 | var qa=e.stackSave=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.stackSave.apply(null,arguments)},sa=e.stackAlloc=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.stackAlloc.apply(null, 206 | arguments)},ra=e.stackRestore=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.stackRestore.apply(null,arguments)},re=e.dynCall_iiii=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.dynCall_iiii.apply(null, 207 | arguments)},Ee=e.dynCall_vii=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.dynCall_vii.apply(null,arguments)},af=e.dynCall_viii=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.dynCall_viii.apply(null, 208 | arguments)},Oe=e.dynCall_vidd=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.dynCall_vidd.apply(null,arguments)},Se=e.dynCall_viiii=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.dynCall_viiii.apply(null, 209 | arguments)},Ge=e.dynCall_viiiii=function(){assert(F,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!H,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return e.asm.dynCall_viiiii.apply(null,arguments)};function lf(a){var b=qa();try{pf(a)}catch(c){ra(b);if(c!==c+0&&"longjmp"!==c)throw c;hf(1,0)}}function kf(a,b,c){var d=qa();try{return rf(a,b,c)}catch(f){ra(d);if(f!==f+0&&"longjmp"!==f)throw f;hf(1,0)}} 210 | function mf(a,b){var c=qa();try{qf(a,b)}catch(d){ra(c);if(d!==d+0&&"longjmp"!==d)throw d;hf(1,0)}}e.asm=of;Object.getOwnPropertyDescriptor(e,"intArrayFromString")||(e.intArrayFromString=function(){l("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"intArrayToString")||(e.intArrayToString=function(){l("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 211 | Object.getOwnPropertyDescriptor(e,"ccall")||(e.ccall=function(){l("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"cwrap")||(e.cwrap=function(){l("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"setValue")||(e.setValue=function(){l("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 212 | Object.getOwnPropertyDescriptor(e,"getValue")||(e.getValue=function(){l("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"allocate")||(e.allocate=function(){l("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"getMemory")||(e.getMemory=function(){l("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}); 213 | Object.getOwnPropertyDescriptor(e,"UTF8ArrayToString")||(e.UTF8ArrayToString=function(){l("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"UTF8ToString")||(e.UTF8ToString=function(){l("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"stringToUTF8Array")||(e.stringToUTF8Array=function(){l("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 214 | Object.getOwnPropertyDescriptor(e,"stringToUTF8")||(e.stringToUTF8=function(){l("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"lengthBytesUTF8")||(e.lengthBytesUTF8=function(){l("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"stackTrace")||(e.stackTrace=function(){l("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 215 | Object.getOwnPropertyDescriptor(e,"addOnPreRun")||(e.addOnPreRun=function(){l("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"addOnInit")||(e.addOnInit=function(){l("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"addOnPreMain")||(e.addOnPreMain=function(){l("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 216 | Object.getOwnPropertyDescriptor(e,"addOnExit")||(e.addOnExit=function(){l("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"addOnPostRun")||(e.addOnPostRun=function(){l("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"writeStringToMemory")||(e.writeStringToMemory=function(){l("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 217 | Object.getOwnPropertyDescriptor(e,"writeArrayToMemory")||(e.writeArrayToMemory=function(){l("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"writeAsciiToMemory")||(e.writeAsciiToMemory=function(){l("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"addRunDependency")||(e.addRunDependency=function(){l("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}); 218 | Object.getOwnPropertyDescriptor(e,"removeRunDependency")||(e.removeRunDependency=function(){l("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")});Object.getOwnPropertyDescriptor(e,"FS_createFolder")||(e.FS_createFolder=function(){l("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}); 219 | Object.getOwnPropertyDescriptor(e,"FS_createPath")||(e.FS_createPath=function(){l("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")});Object.getOwnPropertyDescriptor(e,"FS_createDataFile")||(e.FS_createDataFile=function(){l("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}); 220 | Object.getOwnPropertyDescriptor(e,"FS_createPreloadedFile")||(e.FS_createPreloadedFile=function(){l("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")});Object.getOwnPropertyDescriptor(e,"FS_createLazyFile")||(e.FS_createLazyFile=function(){l("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}); 221 | Object.getOwnPropertyDescriptor(e,"FS_createLink")||(e.FS_createLink=function(){l("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")});Object.getOwnPropertyDescriptor(e,"FS_createDevice")||(e.FS_createDevice=function(){l("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}); 222 | Object.getOwnPropertyDescriptor(e,"FS_unlink")||(e.FS_unlink=function(){l("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")});Object.getOwnPropertyDescriptor(e,"dynamicAlloc")||(e.dynamicAlloc=function(){l("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 223 | Object.getOwnPropertyDescriptor(e,"loadDynamicLibrary")||(e.loadDynamicLibrary=function(){l("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"loadWebAssemblyModule")||(e.loadWebAssemblyModule=function(){l("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"getLEB")||(e.getLEB=function(){l("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 224 | Object.getOwnPropertyDescriptor(e,"getFunctionTables")||(e.getFunctionTables=function(){l("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"alignFunctionTables")||(e.alignFunctionTables=function(){l("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"registerFunctions")||(e.registerFunctions=function(){l("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 225 | Object.getOwnPropertyDescriptor(e,"addFunction")||(e.addFunction=function(){l("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"removeFunction")||(e.removeFunction=function(){l("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"getFuncWrapper")||(e.getFuncWrapper=function(){l("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 226 | Object.getOwnPropertyDescriptor(e,"prettyPrint")||(e.prettyPrint=function(){l("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"makeBigInt")||(e.makeBigInt=function(){l("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"dynCall")||(e.dynCall=function(){l("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 227 | Object.getOwnPropertyDescriptor(e,"getCompilerSetting")||(e.getCompilerSetting=function(){l("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"print")||(e.print=function(){l("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"printErr")||(e.printErr=function(){l("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 228 | Object.getOwnPropertyDescriptor(e,"getTempRet0")||(e.getTempRet0=function(){l("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"setTempRet0")||(e.setTempRet0=function(){l("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"callMain")||(e.callMain=function(){l("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 229 | Object.getOwnPropertyDescriptor(e,"abort")||(e.abort=function(){l("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"PROCINFO")||(e.PROCINFO=function(){l("'PROCINFO' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"stringToNewUTF8")||(e.stringToNewUTF8=function(){l("'stringToNewUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 230 | Object.getOwnPropertyDescriptor(e,"abortOnCannotGrowMemory")||(e.abortOnCannotGrowMemory=function(){l("'abortOnCannotGrowMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"emscripten_realloc_buffer")||(e.emscripten_realloc_buffer=function(){l("'emscripten_realloc_buffer' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"ENV")||(e.ENV=function(){l("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 231 | Object.getOwnPropertyDescriptor(e,"setjmpId")||(e.setjmpId=function(){l("'setjmpId' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"ERRNO_CODES")||(e.ERRNO_CODES=function(){l("'ERRNO_CODES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"ERRNO_MESSAGES")||(e.ERRNO_MESSAGES=function(){l("'ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 232 | Object.getOwnPropertyDescriptor(e,"DNS__deps")||(e.DNS__deps=function(){l("'DNS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"DNS")||(e.DNS=function(){l("'DNS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"GAI_ERRNO_MESSAGES")||(e.GAI_ERRNO_MESSAGES=function(){l("'GAI_ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 233 | Object.getOwnPropertyDescriptor(e,"Protocols")||(e.Protocols=function(){l("'Protocols' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"Sockets__deps")||(e.Sockets__deps=function(){l("'Sockets__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"Sockets")||(e.Sockets=function(){l("'Sockets' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 234 | Object.getOwnPropertyDescriptor(e,"UNWIND_CACHE")||(e.UNWIND_CACHE=function(){l("'UNWIND_CACHE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"readAsmConstArgs")||(e.readAsmConstArgs=function(){l("'readAsmConstArgs' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"PATH")||(e.PATH=function(){l("'PATH' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 235 | Object.getOwnPropertyDescriptor(e,"PATH_FS__deps")||(e.PATH_FS__deps=function(){l("'PATH_FS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"PATH_FS")||(e.PATH_FS=function(){l("'PATH_FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"SYSCALLS__deps")||(e.SYSCALLS__deps=function(){l("'SYSCALLS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 236 | Object.getOwnPropertyDescriptor(e,"SYSCALLS")||(e.SYSCALLS=function(){l("'SYSCALLS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"JSEvents")||(e.JSEvents=function(){l("'JSEvents' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"demangle__deps")||(e.demangle__deps=function(){l("'demangle__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 237 | Object.getOwnPropertyDescriptor(e,"demangle")||(e.demangle=function(){l("'demangle' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"demangleAll")||(e.demangleAll=function(){l("'demangleAll' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"jsStackTrace")||(e.jsStackTrace=function(){l("'jsStackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 238 | Object.getOwnPropertyDescriptor(e,"stackTrace")||(e.stackTrace=function(){l("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"writeI53ToI64__deps")||(e.writeI53ToI64__deps=function(){l("'writeI53ToI64__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"writeI53ToI64")||(e.writeI53ToI64=function(){l("'writeI53ToI64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 239 | Object.getOwnPropertyDescriptor(e,"writeI53ToI64Clamped")||(e.writeI53ToI64Clamped=function(){l("'writeI53ToI64Clamped' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"writeI53ToI64Signaling")||(e.writeI53ToI64Signaling=function(){l("'writeI53ToI64Signaling' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"writeI53ToU64Clamped")||(e.writeI53ToU64Clamped=function(){l("'writeI53ToU64Clamped' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 240 | Object.getOwnPropertyDescriptor(e,"writeI53ToU64Signaling")||(e.writeI53ToU64Signaling=function(){l("'writeI53ToU64Signaling' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"readI53FromI64")||(e.readI53FromI64=function(){l("'readI53FromI64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"readI53FromU64")||(e.readI53FromU64=function(){l("'readI53FromU64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 241 | Object.getOwnPropertyDescriptor(e,"convertI32PairToI53")||(e.convertI32PairToI53=function(){l("'convertI32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"convertU32PairToI53")||(e.convertU32PairToI53=function(){l("'convertU32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"Browser__deps")||(e.Browser__deps=function(){l("'Browser__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 242 | Object.getOwnPropertyDescriptor(e,"Browser__postset")||(e.Browser__postset=function(){l("'Browser__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"Browser")||(e.Browser=function(){l("'Browser' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"Browser__postset__deps")||(e.Browser__postset__deps=function(){l("'Browser__postset__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 243 | Object.getOwnPropertyDescriptor(e,"FS__deps")||(e.FS__deps=function(){l("'FS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"FS__postset")||(e.FS__postset=function(){l("'FS__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"FS")||(e.FS=function(){l("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 244 | Object.getOwnPropertyDescriptor(e,"MEMFS__deps")||(e.MEMFS__deps=function(){l("'MEMFS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"MEMFS")||(e.MEMFS=function(){l("'MEMFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"TTY__deps")||(e.TTY__deps=function(){l("'TTY__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 245 | Object.getOwnPropertyDescriptor(e,"TTY__postset")||(e.TTY__postset=function(){l("'TTY__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"TTY")||(e.TTY=function(){l("'TTY' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"PIPEFS__postset")||(e.PIPEFS__postset=function(){l("'PIPEFS__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 246 | Object.getOwnPropertyDescriptor(e,"PIPEFS__deps")||(e.PIPEFS__deps=function(){l("'PIPEFS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"PIPEFS")||(e.PIPEFS=function(){l("'PIPEFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"SOCKFS__postset")||(e.SOCKFS__postset=function(){l("'SOCKFS__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 247 | Object.getOwnPropertyDescriptor(e,"SOCKFS__deps")||(e.SOCKFS__deps=function(){l("'SOCKFS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"SOCKFS")||(e.SOCKFS=function(){l("'SOCKFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"GL__postset")||(e.GL__postset=function(){l("'GL__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 248 | Object.getOwnPropertyDescriptor(e,"GL__deps")||(e.GL__deps=function(){l("'GL__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"GL")||(e.GL=function(){l("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"emscriptenWebGLGet__deps")||(e.emscriptenWebGLGet__deps=function(){l("'emscriptenWebGLGet__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 249 | Object.getOwnPropertyDescriptor(e,"emscriptenWebGLGet")||(e.emscriptenWebGLGet=function(){l("'emscriptenWebGLGet' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"emscriptenWebGLGetTexPixelData__deps")||(e.emscriptenWebGLGetTexPixelData__deps=function(){l("'emscriptenWebGLGetTexPixelData__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 250 | Object.getOwnPropertyDescriptor(e,"emscriptenWebGLGetTexPixelData")||(e.emscriptenWebGLGetTexPixelData=function(){l("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"emscriptenWebGLGetUniform")||(e.emscriptenWebGLGetUniform=function(){l("'emscriptenWebGLGetUniform' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 251 | Object.getOwnPropertyDescriptor(e,"emscriptenWebGLGetVertexAttrib")||(e.emscriptenWebGLGetVertexAttrib=function(){l("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"GL__postset__deps")||(e.GL__postset__deps=function(){l("'GL__postset__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 252 | Object.getOwnPropertyDescriptor(e,"emscriptenWebGLGetUniform__deps")||(e.emscriptenWebGLGetUniform__deps=function(){l("'emscriptenWebGLGetUniform__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"emscriptenWebGLGetVertexAttrib__deps")||(e.emscriptenWebGLGetVertexAttrib__deps=function(){l("'emscriptenWebGLGetVertexAttrib__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 253 | Object.getOwnPropertyDescriptor(e,"AL__deps")||(e.AL__deps=function(){l("'AL__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"AL")||(e.AL=function(){l("'AL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"WebVR")||(e.WebVR=function(){l("'WebVR' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 254 | Object.getOwnPropertyDescriptor(e,"WebVR__deps")||(e.WebVR__deps=function(){l("'WebVR__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"SDL__deps")||(e.SDL__deps=function(){l("'SDL__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"SDL")||(e.SDL=function(){l("'SDL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 255 | Object.getOwnPropertyDescriptor(e,"SDL_gfx")||(e.SDL_gfx=function(){l("'SDL_gfx' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"SDL_gfx__deps")||(e.SDL_gfx__deps=function(){l("'SDL_gfx__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"GLUT__deps")||(e.GLUT__deps=function(){l("'GLUT__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 256 | Object.getOwnPropertyDescriptor(e,"GLUT")||(e.GLUT=function(){l("'GLUT' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"EGL__deps")||(e.EGL__deps=function(){l("'EGL__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"EGL")||(e.EGL=function(){l("'EGL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 257 | Object.getOwnPropertyDescriptor(e,"GLFW__deps")||(e.GLFW__deps=function(){l("'GLFW__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"GLFW")||(e.GLFW=function(){l("'GLFW' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"GLEW__deps")||(e.GLEW__deps=function(){l("'GLEW__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 258 | Object.getOwnPropertyDescriptor(e,"GLEW")||(e.GLEW=function(){l("'GLEW' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"IDBStore")||(e.IDBStore=function(){l("'IDBStore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"IDBStore__deps")||(e.IDBStore__deps=function(){l("'IDBStore__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 259 | Object.getOwnPropertyDescriptor(e,"runAndAbortIfError")||(e.runAndAbortIfError=function(){l("'runAndAbortIfError' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"warnOnce")||(e.warnOnce=function(){l("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"stackSave")||(e.stackSave=function(){l("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 260 | Object.getOwnPropertyDescriptor(e,"stackRestore")||(e.stackRestore=function(){l("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"stackAlloc")||(e.stackAlloc=function(){l("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"AsciiToString")||(e.AsciiToString=function(){l("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 261 | Object.getOwnPropertyDescriptor(e,"stringToAscii")||(e.stringToAscii=function(){l("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"UTF16ToString")||(e.UTF16ToString=function(){l("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"stringToUTF16")||(e.stringToUTF16=function(){l("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 262 | Object.getOwnPropertyDescriptor(e,"lengthBytesUTF16")||(e.lengthBytesUTF16=function(){l("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"UTF32ToString")||(e.UTF32ToString=function(){l("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"stringToUTF32")||(e.stringToUTF32=function(){l("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 263 | Object.getOwnPropertyDescriptor(e,"lengthBytesUTF32")||(e.lengthBytesUTF32=function(){l("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"allocateUTF8")||(e.allocateUTF8=function(){l("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")});Object.getOwnPropertyDescriptor(e,"allocateUTF8OnStack")||(e.allocateUTF8OnStack=function(){l("'allocateUTF8OnStack' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}); 264 | e.writeStackCookie=Sa;e.checkStackCookie=Ta;e.abortStackOverflow=function(a){l("Stack overflow! Attempted to allocate "+a+" bytes on the stack, but stack has only "+(37040-qa()+a)+" bytes available!")};Object.getOwnPropertyDescriptor(e,"ALLOC_NORMAL")||Object.defineProperty(e,"ALLOC_NORMAL",{configurable:!0,get:function(){l("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}); 265 | Object.getOwnPropertyDescriptor(e,"ALLOC_STACK")||Object.defineProperty(e,"ALLOC_STACK",{configurable:!0,get:function(){l("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}});Object.getOwnPropertyDescriptor(e,"ALLOC_DYNAMIC")||Object.defineProperty(e,"ALLOC_DYNAMIC",{configurable:!0,get:function(){l("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}); 266 | Object.getOwnPropertyDescriptor(e,"ALLOC_NONE")||Object.defineProperty(e,"ALLOC_NONE",{configurable:!0,get:function(){l("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}});Object.getOwnPropertyDescriptor(e,"calledRun")||Object.defineProperty(e,"calledRun",{configurable:!0,get:function(){l("'calledRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}}); 267 | var sf;function oa(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}eb=function tf(){sf||uf();sf||(eb=tf)}; 268 | function uf(a){function b(){if(!sf&&(sf=!0,!Ja)){Ta();assert(!F);F=!0;if(!e.noFSInit&&!lc){assert(!lc,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");lc=!0;kc();e.stdin=e.stdin;e.stdout=e.stdout;e.stderr=e.stderr;e.stdin?oc("stdin",e.stdin):dc("/dev/tty","/dev/stdin");e.stdout?oc("stdout",null,e.stdout):dc("/dev/tty","/dev/stdout");e.stderr?oc("stderr",null,e.stderr):dc("/dev/tty1", 269 | "/dev/stderr");var c=ec("/dev/stdin","r"),d=ec("/dev/stdout","w"),f=ec("/dev/stderr","w");assert(0===c.fd,"invalid handle for stdin ("+c.fd+")");assert(1===d.fd,"invalid handle for stdout ("+d.fd+")");assert(2===f.fd,"invalid handle for stderr ("+f.fd+")")}Wa(Ya);Ta();Mb=!1;Wa(Za);if(e.onRuntimeInitialized)e.onRuntimeInitialized();if(vf){c=a;assert(0==cb,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])');assert(0==Xa.length,"cannot call main when preRun functions remain to be called"); 270 | d=e._main;c=c||[];f=c.length+1;var g=sa(4*(f+1));r[g>>2]=Pa(da);for(var h=1;h>2)+h]=Pa(c[h-1]);r[(g>>2)+f]=0;try{e.___set_stack_limit(37040);var n=d(f,g);jf(n,!0)}catch(q){q instanceof oa||("unwind"==q?ya=!0:((n=q)&&"object"===typeof q&&q.stack&&(n=[q,q.stack]),m("exception thrown: "+n),ea(1,q)))}finally{}}Ta();if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;)n=e.postRun.shift(),ab.unshift(n);Wa(ab)}}a=a||ca;if(!(0