npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

littlejsengine

v1.10.7

Published

LittleJS - Tiny and Fast HTML5 Game Engine

Downloads

532

Readme

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 First Ever LittleJS Game Jam

The LittleJS Game Jam will take place From Nov 11 to Dec 12! 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!

Demo | Docs | Trailer | Discord | Tutorial | FAQ

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 WebGL
  • 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
  • Builds to an executable with Electron for distribution on Windows, macOS, and Linux
  • 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
  • Particle effects system and design tool
  • Bitmap font rendering and includes a built in engine font
  • Medal system tracks and displays achievements with Newgrounds integration

How to use LittleJS

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

You will need to run a local web server to run LittleJS games!

This is because web browsers just have protection from loading local files. 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.

Debug builds of LittleJS have a special menu that can be opened by pressing the Esc key.

Games Made With LittleJS

Here are a few of the amazing games people made using LittleJS...

LittleJS Logo