{"id":14990943,"url":"https://github.com/killedbyapixel/littlejs","last_synced_at":"2026-10-19T00:12:52.318Z","repository":{"id":37491082,"uuid":"409749889","full_name":"KilledByAPixel/LittleJS","owner":"KilledByAPixel","description":"Tiny fast 2D/3D HTML5 game engine with many features and no dependencies.","archived":false,"fork":false,"pushed_at":"2026-10-15T19:50:47.000Z","size":34217,"stargazers_count":4264,"open_issues_count":3,"forks_count":235,"subscribers_count":45,"default_branch":"main","last_synced_at":"2026-10-15T22:09:52.827Z","etag":null,"topics":["box2d","game-development","game-engine","gamedev","javascript","js13k","littlejs","open-source","threejs","typescript","webgl2"],"latest_commit_sha":null,"homepage":"https://littlejsengine.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KilledByAPixel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT.txt","agents":"AGENTS.md","claude":"CLAUDE.md","gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null},"funding":{"github":["KilledByAPixel"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2021-09-23T21:34:48.000Z","updated_at":"2026-10-15T21:21:51.000Z","dependencies_parsed_at":"2026-10-08T07:23:05.009Z","dependency_job_id":null,"html_url":"https://github.com/KilledByAPixel/LittleJS","commit_stats":{"total_commits":830,"total_committers":16,"mean_commits":51.875,"dds":0.02168674698795181,"last_synced_commit":"1c7f3c0e24bc6be9f871ef1deeb801251ac8af85"},"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"purl":"pkg:github/KilledByAPixel/LittleJS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KilledByAPixel%2FLittleJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KilledByAPixel%2FLittleJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KilledByAPixel%2FLittleJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KilledByAPixel%2FLittleJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KilledByAPixel","download_url":"https://codeload.github.com/KilledByAPixel/LittleJS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KilledByAPixel%2FLittleJS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38343428,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-18T02:00:06.448Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["box2d","game-development","game-engine","gamedev","javascript","js13k","littlejs","open-source","threejs","typescript","webgl2"],"created_at":"2024-09-24T14:21:12.000Z","updated_at":"2026-10-19T00:12:52.312Z","avatar_url":"https://github.com/KilledByAPixel.png","language":"JavaScript","funding_links":["https://github.com/sponsors/KilledByAPixel"],"categories":[],"sub_categories":[],"readme":"# LittleJS - The Tiny Fast JavaScript Game Engine\n\n\u003cdiv align='center' markdown='1'\u003e\n    \n![LittleJS Logo](examples/logo.png)\n\n[![NPM Package][npm]][npm-url]\n[![Build Size][build-size]][build-size-url]\n[![NPM Downloads][npm-downloads]][npmtrends-url]\n[![DeepScan][deepscan]][deepscan-url]\n[![MIT License][license]][license-url]\n[![Discord][discord]][discord-url]\n\n\u003c/div\u003e\n\n## 🚂 All Aboard!\n\nLittleJS is a fast, lightweight, and fully open source HTML5 game engine designed for simplicity and performance.\nIts small footprint is packed with a comprehensive feature set including 2D and 3D rendering, physics, particles, sound, and input handling.\nThe code is very clean and well documented with many examples to get you started quickly.\n\n### 🚀 [Join the LittleJS Game Jam](https://itch.io/jam/littlejs-jam)\n\n*The Third Annual LittleJS Game Jam will take place from Oct 2 to Nov 2! Unleash your creativity and develop amazing games using the LittleJS game engine.*\n\n\u003cdiv align='center' markdown='1'\u003e\n\n## [Examples](https://killedbyapixel.github.io/LittleJS/examples) | [Arcade](https://killedbyapixel.github.io/LittleJSArcade) | [Docs](https://killedbyapixel.github.io/LittleJS/docs) | [Reference](https://github.com/KilledByAPixel/LittleJS/blob/main/REFERENCE.md) | [FAQ](https://github.com/KilledByAPixel/LittleJS/blob/main/FAQ.md) | [Trailer](https://youtu.be/V3ik8SKJF4g) | [Discord](https://discord.gg/zb7hcGkyZe)  | [AI](https://github.com/KilledByAPixel/LittleJS-AI)\n\n\u003c/div\u003e\n\n![LittleJS Screenshot1](examples/screenshot.jpg)\n\n![LittleJS Screenshot2](examples/screenshot2.jpg)\n\n## LittleJS Features\n\n### ✨ Graphics\n\n- Blazing fast WebGL2 + Canvas2D hybrid rendering system\n- Apply [Shadertoy](https://www.shadertoy.com) style shaders for post-processing effects, or on any object or draw\n- 2D lights with soft shadows, tinted glass and emissive objects, a sun with long shadows, and spotlight cones and gels\n- Robust particle effect system with a library of ready made effects and an [effect design tool](https://killedbyapixel.github.io/LittleJS/examples/particles/)\n- Parallax background layers that repeat across a level of any size\n- Load sprites and animations into texture sheets at runtime, or import [TexturePacker](https://www.codeandweb.com/texturepacker) and [Aseprite](https://www.aseprite.org) atlases\n\n### 🧊 LittleJS 3D\n\n- Built-in 3D renderer that shares the canvas with your 2D game\n- 3D objects with the same physics, children and timers as 2D\n- Shape builders, extruded sprites and text, and OBJ and glTF model loading\n- Height map terrain and voxel maps with collision and raycasts\n- 3D levels and prefabs, built in the 3D level editor and loaded with one call\n- Shadow maps, colored lights, spotlights, lens flares, specular, emissive glow and fog\n- Reflections of a sky box or the scene itself, from mirror sharp to rough\n- Particles, trails, billboards and instanced drawing\n- Orbit, chase and first person cameras with mouse picking\n- Custom shaders on any object\n- Optional [Three.js](https://threejs.org) plugin as an alternative renderer\n\n### 🔊 Audio\n\n- Sound and music with mp3, ogg, or wave files\n- Use [ZzFX](https://killedbyapixel.github.io/ZzFX/) sound generator to play sounds without asset files\n- Spatial audio with stereo panning\n- Audio effects plugin with filter, reverb, delay, distortion and compressor\n\n### 🎮 Input\n\n- Comprehensive input handling for mouse, keyboard, gamepad, and touch\n- Customizable on screen gamepad designed for mobile devices\n- Pinch to zoom on touch screens, read the same way as the mouse wheel\n\n### 💥 Physics\n\n- Robust arcade physics system with collision handling\n- Fast tilemap collision and raycasting, with one-way platforms that turn with their tiles\n- Swept bullet collision, so small fast objects never pass through a wall\n- Object collision that stays fast with thousands of objects\n- Full Box2D integration for realistic physics using [Box2D v2.3.1 wasm](https://github.com/kripken/box2d.js)\n- Grid-based A* pathfinding plugin with optional path smoothing\n\n### 🚀 Flexibility\n\n- Compatible with all modern web browsers and mobile devices\n- Full TypeScript and Module support with example projects for both\n- [Vite](https://vite.dev) starter template for instant dev server with hot reload\n- Great for size coding competitions like [Js13kGames](https://js13kgames.com/)\n- Open Source and [MIT licensed](https://github.com/KilledByAPixel/LittleJS/blob/main/LICENSE)\n\n### 🛠️ Developer Tools\n\n- Live example browser with code editor\n- Built-in 2D and 3D level editors that edit your game while it runs, with undo, autosave and prefabs\n- Make the editors your own with your game's own object types, keys, buttons and tools, see the [editor guide](https://github.com/KilledByAPixel/LittleJS/blob/main/EDITOR.md)\n- 2D levels load and save as [Tiled](https://github.com/mapeditor/tiled) JSON, so Tiled can edit them too\n- UI system with buttons, sliders, text input and nine-slice skins\n- Tween system with easing curves, and a scene system for titles, menus and game states\n- Debug overlay and primitive rendering system\n- Medals, leaderboards and cloud saves on [Newgrounds](https://www.newgrounds.com/) and [Wavedash](https://wavedash.com/)\n- Node.js build system\n\n### 🤖 AI Friendly\n\n- The entire API is small and well documented so LLMs can produce high quality results\n- [LittleJS AI Tools](https://github.com/KilledByAPixel/LittleJS-AI) - Templates, examples, and prompts tuned for AI + LittleJS workflows\n- [LittleJS GPT](https://chatgpt.com/g/g-67c7c080b5bc81919736bc8815836be6-littlejs-game-maker) - Build LittleJS games right inside ChatGPT\n\n## How To Use LittleJS\n\nTo get started download the latest release from GitHub, the engine's builds and source as npm has them (the examples are in the repository), or install via npm: \n\n```\nnpm install littlejsengine\n```\n\nor use `degit` for an empty Vite template\n\n```\nnpx degit KilledByAPixel/LittleJS/examples/vite-starter my-game\ncd my-game\nnpm install\nnpm run dev\n```\n\nThe examples are only in the repository: clone it, or use Download ZIP on its GitHub page; the npm package and the release zip hold the engine alone. A page that loads images or modules needs a local web server, as browsers block them from a file on disk: serve the repository's root, for example with `npx http-server`, then open `http://localhost:8080/examples/starter/`, the place to start. The [FAQ](FAQ.md#do-i-need-a-local-server-to-run-littlejs-games-and-how-do-i-set-one-up) has more.\n\nHere is a minimal Hello World example game, with the script path pointing at the engine file from the download or npm package; it loads nothing, so it runs straight from the file.\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003cscript src=\"node_modules/littlejsengine/dist/littlejs.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\nfunction gameInit() {}\nfunction gameUpdate() {}\nfunction gameUpdatePost() {}\nfunction gameRender() {}\nfunction gameRenderPost() { drawTextScreen('Hello World!', mainCanvasSize.scale(.5), 80); }\nengineInit(gameInit, gameUpdate, gameUpdatePost, gameRender, gameRenderPost);\n\u003c/script\u003e\n```\n\n## Tutorials\n\n- [Making Awesome Games With LittleJS](https://youtu.be/_dXKU0WgAj8) - A short talk about LittleJS with some tips on how to use it\n- [Tutorial: Breakout](https://github.com/KilledByAPixel/LittleJS/tree/main/examples/breakoutTutorial) - Learn how to make a simple game from scratch\n- [Tutorial: Make a ski game](https://eoinmcgrath.com/little-ski/tutorial.html) - A tutorial by eoinmcg that shows how to make a pixel art style game\n- [LittleJS Quick Reference Sheet](https://github.com/KilledByAPixel/LittleJS/blob/main/REFERENCE.md) - The whole API in one file, made to be read by people and by AI coding tools\n- [Making Your Own Level Editor](https://github.com/KilledByAPixel/LittleJS/blob/main/EDITOR.md) - How to turn the built in 2D and 3D level editors into an editor for your own game\n- [LittleJS FAQ](https://github.com/KilledByAPixel/LittleJS/blob/main/FAQ.md) - Answers to common questions about LittleJS\n- [Changelog](https://github.com/KilledByAPixel/LittleJS/blob/main/CHANGELOG.md) - What changed in each release\n- [JS13k Branch](https://github.com/KilledByAPixel/LittleJS/tree/js13k) - A special branch for size coding events that builds to a 7KB zip\n\n## Examples\n\nLittleJS comes with several demos both for learning and using as starter projects to create new games.\n\n- [Example Browser](https://killedbyapixel.github.io/LittleJS/examples/) - Live example browser with all examples and editable source\n- [LittleJS Arcade](https://killedbyapixel.github.io/LittleJSArcade/) - Over 50 example games you can use as starter projects\n- [Short Examples](https://killedbyapixel.github.io/LittleJS/examples/) - 100+ single-file demos showing off individual engine features\n- [Breakout](https://killedbyapixel.github.io/LittleJS/examples/breakout/) - Block breaking game with post-processing effects\n- [Puzzle Game](https://killedbyapixel.github.io/LittleJS/examples/puzzle/) - Match 3 puzzle game with HD rendering and high score tracking\n- [Platformer](https://killedbyapixel.github.io/LittleJS/examples/platformer/) - Platformer/shooter demo that loads level data\n- [Box2D Demo](https://killedbyapixel.github.io/LittleJS/examples/box2d/) - Box2D plugin demonstration and testbed\n- [3D Example](https://killedbyapixel.github.io/LittleJS/examples/3d/) - The 3D plugin in one scene: terrain, shadows, lights, sprites, particles and bloom\n- [3D Racing Game](https://killedbyapixel.github.io/LittleJS/examples/?example=3D%20Racing%20Game) - Built-in 3D plugin: terrain, shadows and a chase camera in one short file\n- [Three.js Platformer](https://killedbyapixel.github.io/LittleJS/examples/threejs/) - 3D platformer with LittleJS gameplay and Three.js rendering\n- [Particle System Designer](https://killedbyapixel.github.io/LittleJS/examples/particles/) - Particle system editor and visualizer\n\n## Builds\n\n| File | Mode | Module | Use case |\n|------|------|--------|----------|\n| [littlejs.js](https://github.com/KilledByAPixel/LittleJS/blob/main/dist/littlejs.js) | Debug | No | Debug mode with asserts |\n| [littlejs.release.js](https://github.com/KilledByAPixel/LittleJS/blob/main/dist/littlejs.release.js) | Release | No | Optimized for release |\n| [littlejs.min.js](https://github.com/KilledByAPixel/LittleJS/blob/main/dist/littlejs.min.js) | Release | No | Optimized for release and minified |\n| [littlejs.esm.js](https://github.com/KilledByAPixel/LittleJS/blob/main/dist/littlejs.esm.js) | Debug | ESM | Debug mode with asserts |\n| [littlejs.esm.min.js](https://github.com/KilledByAPixel/LittleJS/blob/main/dist/littlejs.esm.min.js) | Release | ESM | Optimized for release and minified |\n\nEvery build includes the plugins. littlejs.min.js is about 135 KB gzipped, and the 3D plugins are a large part of that. A bundler like Vite leaves out the plugins a game does not use, so a small 2D game comes to about 26 KB gzipped, and a lit 3D scene to about 47 KB.\n\n## Games Made With LittleJS\n\nHere are a few of the many amazing games created with LittleJS...\n\n- [Space Huggers](https://www.newgrounds.com/portal/view/819609) - Roguelike platformer shoot-em-up game with procedural levels. by [KilledByAPixel](https://frankforce.com/)\n- [Black Cat Squadron](https://js13kgames.com/games/black-cat-squadron) - One button shooter based on a WW2 Navy squadron. JS13k 5th place! by [repsej](https://github.com/repsej)\n- [L1ttl3 Paws](https://github.com/KilledByAPixel/JS13K2025) - Cat glider with procedural art and levels for JS13K! by [KilledByAPixel](https://frankforce.com/)\n- [KleptoKitty](https://js13kgames.com/games/kleptokitty) - Cat themed heist puzzle. JS13K 22nd place. by [eoinmcg](https://eoinmcg.itch.io/)\n- [The Way of the Dodo](https://js13kgames.com/2024/games/the-way-of-the-dodo) - Single button platformer. JS13k 5th place! by [repsej](https://github.com/repsej)\n- [Undergrowth](https://undergrowth.squidband.uk/) - An interactive music videogame for the band Squid. by [KilledByAPixel](https://frankforce.com/)\n- [204Snake!](https://www.newgrounds.com/portal/view/960100) - A puzzle game that combines 2048 with snake. LittleJS Jam 1st place! by [Sodoj](https://sodoj.itch.io/) and [Shai-P](https://shai-p.itch.io/)\n- [GATOR](https://www.newgrounds.com/portal/view/960757) - Retro platformer shooter game where you rescue animals. LittleJS Jam 2nd place! by [eoinmcg](https://eoinmcg.itch.io/)\n- [A Hedgehog's Search](https://willsm1111.itch.io/a-hedgehogs-search) - Adventure game starring a hedgehog. LittleJS Jam 3rd place! by [willsm1111](https://willsm1111.itch.io/)\n- [Wendol Village](https://js13kgames.com/2024/games/wendol-village) - Warcraft inspired RTS game. by [sanojian](https://github.com/sanojian)\n- [Dead Again](https://js13kgames.com/entries/dead-again) - Top down survival horror. by [sanojian \u0026 repsej](https://github.com/sanojian/js13k_2022)\n- [Isletopia](https://store.steampowered.com/app/1861260/Isletopia) - Relaxing strategy game of greenifying barren islands. by [Gamex Studio](https://x.com/gamesgamex)\n- [Tetrimals](https://nixn.itch.io/tetrimals) - A puzzle game mixing Tetris with animals. by [nixn](https://nixn.itch.io/)\n- [Bug\u0026Bee](https://itch.io/jam/littlejs-game-jam-2025/results) - Low fi shoot em up with co-op gameplay. LittleJS Jam 1st place! by [eoinmcg](https://eoinmcg.itch.io/)\n- [Little Platformer](https://psemo.itch.io/little-platformer) - Platformer with many mechanics. LittleJS Jam 2nd place! by [PSEMO](https://psemo.itch.io/), [Solita666](https://itch.io/profile/solita666), [GabrielRG](https://gabrielrg.itch.io/), [Nate](https://natesassoon.itch.io/)\n- [Alien Escape Pinball](https://focaccai.itch.io/alien-pinball) - Pinball game with physics and aliens. by [Focaccai](https://www.focaccai.com/)\n- [LittleJS Jam 2024 Results](https://itch.io/jam/littlejs-jam-2024/results) - All the games from the first LittleJS Game Jam.\n- [LittleJS Jam 2025 Results](https://itch.io/jam/littlejs-game-jam-2025/results) - All the games from the second LittleJS Game Jam.\n\n![A collage of screenshots from games made with LittleJS](examples/games.jpg)\n\n*A sample of games built with LittleJS.*\n\n![LittleJS pixel-art favicon](examples/favicon.png)\n\n[npm]: https://img.shields.io/npm/v/littlejsengine\n[npm-url]: https://www.npmjs.com/package/littlejsengine\n[build-size]: https://img.shields.io/bundlephobia/minzip/littlejsengine\n[build-size-url]: https://bundlephobia.com/result?p=littlejsengine\n[npm-downloads]: https://img.shields.io/npm/dw/littlejsengine\n[npmtrends-url]: https://www.npmtrends.com/littlejsengine\n[deepscan]: https://deepscan.io/api/teams/22950/projects/26229/branches/831487/badge/grade.svg\n[deepscan-url]: https://deepscan.io/dashboard#view=project\u0026tid=22950\u0026pid=26229\u0026bid=831487\n[discord]: https://img.shields.io/discord/939926111469568050\n[discord-url]: https://discord.gg/zb7hcGkyZe\n[license]: https://img.shields.io/github/license/KilledByAPixel/LittleJS\n[license-url]: https://github.com/KilledByAPixel/LittleJS/blob/main/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkilledbyapixel%2Flittlejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkilledbyapixel%2Flittlejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkilledbyapixel%2Flittlejs/lists"}