KilledByAPixel
LittleJS
JavaScript

Tiny fast HTML5 game engine with many features and no dependencies.

Last updated Jul 8, 2026
4.1k
Stars
225
Forks
17
Issues
+5
Stars/day
Attention Score
91
Language breakdown
JavaScript 100.0%
Batchfile 0.0%
โ–ธ Files click to expand
README

LittleJS - The Tiny Fast JavaScript Game Engine

LittleJS Logo

[![NPM Package][npm]][npm-url] [![Build Size][build-size]][build-size-url] [![NPM Downloads][npm-downloads]][npmtrends-url] [![DeepScan][deepscan]][deepscan-url] [![MIT License][license]][license-url] [![Discord][discord]][discord-url]

๐Ÿš‚ All Aboard!

LittleJS is a fast, lightweight, and fully open source HTML5 game engine designed for simplicity and performance. Its small footprint is packed with a comprehensive feature set including rendering, physics, particles, sound, and input handling. The code is very clean and well documented with many examples to get you started quickly.

๐Ÿš€ Join the LittleJS Game Jam

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.

Demos | Arcade | Docs | FAQ | Trailer | Discord

LittleJS Screenshot

LittleJS Features

โœจ Graphics

  • Blazing fast WebGL2 + Canvas2D hybrid rendering system
  • Apply Shadertoy style shaders for post-processing effects
  • Robust particle effect system and effect design tool
  • Optional 3D rendering with the Three.js plugin

๐Ÿ”Š Audio

  • Sound and music with mp3, ogg, or wave files
  • Use ZzFX sound generator to play sounds without asset files
  • Spatial audio stereo panning

๐ŸŽฎ Input

  • Comprehensive input handling for mouse, keyboard, gamepad, and touch
  • Customizable on screen gamepad designed for mobile devices

๐Ÿ’ฅ Physics

  • Robust arcade physics system with collision handling
  • Fast tilemap collision and raycasting
  • Full Box2D integration for realistic physics using Box2D v2.3.1 wasm
  • Grid-based A* pathfinding plugin with optional path smoothing

๐Ÿš€ Flexibility

  • Compatible with all modern web browsers and mobile devices
  • Full TypeScript and Module support with example projects for both
  • Vite starter template for instant dev server with hot reload
  • Great for size coding competitions like Js13kGames
  • Open Source and MIT licensed

๐Ÿ› ๏ธ Developer Tools

  • Live example browser with code editor
  • Import level editor data from Tiled or other JSON
  • Debug overlay and primitive rendering system
  • Medal tracking system with Newgrounds support
  • Node.js build system

๐Ÿค– AI Friendly

  • The entire API is small and well documented so LLMs can produce high quality results
  • LittleJS AI Tools - Templates, examples, and prompts tuned for AI + LittleJS workflows
  • LittleJS GPT - Build LittleJS games right inside ChatGPT

How To Use LittleJS

To get started download the latest LittleJS package from GitHub or install via npm:

npm install littlejsengine

or use degit for an empty Vite template

npx degit KilledByAPixel/LittleJS/examples/vite-starter my-game
cd my-game
npm install
npm run dev

Here is a minimal Hello World example game.

<!DOCTYPE html>

Tutorials

Examples

LittleJS comes with several demos both for learning and using as starter projects to create new games.

Builds

| File | Mode | Module | Use case | |------|------|--------|----------| | littlejs.js | Debug | No | Debug mode with asserts | | littlejs.release.js | Release | No | Optimized for release | | littlejs.min.js | Release | No | Optimized for release and minified | | littlejs.esm.js | Debug | ESM | Debug mode with asserts | | littlejs.esm.min.js | Release | ESM | Optimized for release and minified |

Games Made With LittleJS

Here are a few of the many amazing games created with LittleJS...

A collage of screenshots from games made with LittleJS

A sample of games built with LittleJS.

LittleJS pixel-art favicon

[npm]: https://img.shields.io/npm/v/littlejsengine [npm-url]: https://www.npmjs.com/package/littlejsengine [build-size]: https://img.shields.io/bundlephobia/minzip/littlejsengine [build-size-url]: https://bundlephobia.com/result?p=littlejsengine [npm-downloads]: https://img.shields.io/npm/dw/littlejsengine [npmtrends-url]: https://www.npmtrends.com/littlejsengine [deepscan]: https://deepscan.io/api/teams/22950/projects/26229/branches/831487/badge/grade.svg [deepscan-url]: https://deepscan.io/dashboard#view=project&tid=22950&pid=26229&bid=831487 [discord]: https://img.shields.io/discord/939926111469568050 [discord-url]: https://discord.gg/zb7hcGkyZe [license]: https://img.shields.io/github/license/KilledByAPixel/LittleJS [license-url]: https://github.com/KilledByAPixel/LittleJS/blob/main/LICENSE

ยฉ 2026 GitRepoTrend ยท KilledByAPixel/LittleJS ยท Updated daily from GitHub