🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Book a DemoInstallSign in
Socket

littlejsengine

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

littlejsengine

LittleJS - Tiny and Fast HTML5 Game Engine

1.11.8
latest
Source
npm
Version published
Weekly downloads
81
9.46%
Maintainers
1
Weekly downloads
 
Created
Source

LittleJS - The Tiny Fast JavaScript Game Engine

LittleJS Screenshot

NPM Package Build Size NPM Downloads DeepScan Discord

🚂 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 hybrid rendering, physics, particles, sound, and input handling. The code is clean and well documented with some fun examples to get you started right away. Choo-Choo!

🚀 Join the LittleJS Game Jam

The Second Annual LittleJS Game Jam will take place From Oct 3 to Nov 3! Unleash your creativity and develop amazing games using the LittleJS game engine. đŸ•šī¸đŸŽŽ Sign up today and get more info about the jam on itch.io!

LittleJS Screenshot

About LittleJS Engine

LittleJS is a small but powerful game engine with many features and no dependencies.

✨ Graphics

  • Super fast sprite and tile map rendering engine with WebGL2
  • Update and render 100,000+ sprites at a solid 60fps
  • Apply Shadertoy compatible shaders for post-processing effects
  • Robust particle effect system and effect design tool

🔊 Audio

  • Positional sound effects with wave files, mp3s, or ZzFX
  • Use ZzFX sound effect generator to play sounds without asset files
  • Music with mp3, ogg, wave, or ZzFXM

🎮 Input

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

đŸ’Ĩ Physics

🚀 Flexibility

  • Compatible with all modern web browsers and on mobile devices
  • Support for TypeScript and Modules with example projects for both
  • Ideal for size coding competitions like js13kGames, starter project builds to a 7KB zip
  • Open Source with the MIT license so it can be used for anything you want forever

đŸ› ī¸ And more...

  • Node.js build system
  • 2D vector math library
  • Debug primitive rendering system
  • Bitmap font rendering and built in engine font
  • Medal tracking system with Newgrounds support

How To Use LittleJS

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

You need to run a local web server to run LittleJS games during development! You may see a console error like "The image element contains cross-origin data." Don't panic, it's easy to fix! If you are using Visual Studio Code there is a Live Preview Extension that will handle this for you automatically. Another option is to setup a simple local web server like http-server via npm.

Examples

These demos are for both learning and using as starter projects to create your own games.

Builds

To easily include LittleJS in your game, you can use one of the pre-built js files.

To rebuild the engine you must first run npm install to setup the necessary npm dependencies. Then call npm run build to build the engine.

The starter example project includes a node js file build.js that compresses everything into a tiny zip file using Google Closure, UglifyJS, and ECT Zip.

Games Made With LittleJS

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

LittleJS Logo

Keywords

LittleJS

FAQs

Package last updated on 28 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts