Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@woosh/meep-engine

Package Overview
Dependencies
Maintainers
1
Versions
1265
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@woosh/meep-engine

Pure JavaScript game engine. Fully featured and production ready.

npmnpm
Version
2.128.23
Version published
Maintainers
1
Created
Source

Meep Engine

Getting Started

We offer a minimal project with no bells or whistles, just enough to run the engine and get you starter. If you're starting from scratch this is likely the best option.

Documentation

Engine Documentation

Samples

To help get you started, various samples are provided under /samples folder. Feel free to use them as a point of reference.

Quality

Testing

Meep is covered by 2,801 handwritten unit tests, reaching 90%+ coverage in core and 40%+ coverage total.

The aim is to ensure quality. As a result, the tests are written to cover complex code first and to exhaustively validate critical algorithms. Most of the test code is significantly larger than the code that is being tested.

Assertions

Meep is covered by 3,162 asserts. Assertions provide very extensive pre- and post-condition checks throughout the engine. Asserts are intended primarily for development builds. To remove asserts in Vite builds, you can use @rollup/plugin-strip package like so:

import strip from '@rollup/plugin-strip';
import { defineConfig } from 'vite';

export default defineConfig({
    plugins: [{
        // this will remove all assert statements from the production build
        ...strip(),
        apply: 'build'
    }],
    // ... the rest of the config ...
});

Assertion package can be found under /src/core/assert.js.

Package Size

Meep is infinitely tree-shakable, you only package what you use.

Meep is distributed as a fine-grained set of ~3,000 modules, with an average module being ~70 lines of code. If you use meep in your project, you add as much or as little to your overall bundle size as you want.

For example, if you include core/math/lerp function, you only add 4 lines of code to your project.

Performance

Some say that JavaScript is not a viable choice when performance is a factor. I disagree. Meep aims to strike a balance between performance and comfort. That said, meep is performance-first engine. Various API wrappers are offered for convenience, but you're always welcome to drop down to low-level API. Meep is written to generate close to 0 garbage and where that would be otherwise impossible - Meep implements custom memory management to make it possible. The engine is built to handle millions of objects at the same time on even low-spec mobile hardware.

Features

Input

  • Touch / Mouse / Keyboard device support
  • Unified abstraction of input, offering both query and event-driven APIs
  • Input binding implementation via InputController component

Rendering & Lighting

Automatic instancing

This will minimize the number of draw calls and improve performance.

Clustered lighting, aka Forward+

Meep implements clustered lighting technique which allows you to have a pretty much an unlimited number of point lights in your scene. All the other light types are supported as well, but only point lights are clustered for now. Point lights are useful for various effects, like muzzle flashes, grenade explosions, torches, etc.

Terrain

The terrain engine is chunk-based, which means that terrain is split into rectangular pieces internally, and they are built on-the-fly inside a web-worker based on camera position. Terrain is automatically culled based on camera position, so you're only drawing the chunks that are in view. Terrain supports layers just like Unity, but unlike Unity - Meep supports up to 256 layers of terrain instead of 4.

Path tracer

Pure JS implementation of a path tracer, using engine's BVH (See Physics section)

Visual Effects

Decals

Decals in meep are done on the GPU, and as a result you can have a lot of them in your scene. The most I tested in a single scene is 1,000,000 which works quite well. Decals are useful for bullet holes, blood splatter and various scene decorations such as signs and scuff marks.

Particles

Meep's particle engine ("Particular") is optimized for game development needs, this means supporting complex effects and being able to spawn/destroy many particle systems every frame. There are a lot of particle engines out there, but they tend to have costly spawning routines, take up a lot of draw calls and not manage memory well, which leads to pretty poor performance in games. My particle engine supports full particle lighting as well, and soft particles. On top of that - all particles are automatically atlassed in the background and are compiled with just 4 shaders. This means that no matter how many particle effects you have - there will be no shader switching and no texture switching, and there will be no delays associated with shader compilation. Particles are culled, so particle systems that are off-screen are not rendered and simulation for them can be paused to save CPU resources (this is automatic behavior)

Trails

Meep implements a fairly complex trail system, where a trail can be attached to an entity, and it will create a trail behind.

Audio

Sound engine

Meep has a custom sound engine which is culled and has custom attenuation, this allows scenes to have 1000s of positional audio sources without any extra cost in terms of performance

Physics

High performance spatial index

Meep features a BVH (bounding volume hierarchy) implementation optimized for speed and memory usage that provides a wide variety of spatial queries, such as:

  • Ray
  • Box
  • Sphere
  • Planar
  • Frustum
  • Point intersection
  • Point distance

Inverse kinematics

  • Meep has 2 very useful IK solvers to fix foot position for characters on uneven terrain or stairs, aligning both the position and orientation of character feet. This works for hands as well if you want and is not limited to bipeds, the system works just as well for, say, spiders.
  • Highly optimized FABRIK inverse kinematics solver for more complex IK use cases

Other

Asset streaming

Meep in general is a web-first engine, all assets are streamed, meaning that the engine is up and running even before any models/texture are loaded, and you're free to decide when to let the player see your level, wait until everything is loaded or drop them in as soon as you can. There is a pre-loader module in case you want to load some assets in bulk before starting the game.

AI tools

including, but not limited to:

  • full-fledged Behavior trees
  • Blackboard (took for recording information useful for AI to read/write relevant world state, very commonly used with Behavior Trees)
  • monte-carlo tree search (same as Google's AlphaGo, useful for decision-making)
  • state optimization (useful for decision-making)
  • grid-based path finding (optimized for 10,000s of queries per second)
  • resource allocation solver (useful for planning, given certain resources such as bullets/grenades/money/health - plan what actions to take to optimize your chances of winning)
  • and a number of other useful tools to complement development of game AI and other intelligent behavior use cases.

High-performance serialization

Extremely compact binary serialization system. You can save/load your scenes from files. This serialization system supports format changes, so as you develop your game - old saves will be supported and the system will automatically upgrade them to the most recent version, so the player doesn't have to lose any data.

Achievements

Achievements work with Blackboard components and are very easy to define. There is an abstraction system that helps connect your achievements to various platforms such as Steam or XBox (you'd have to implement that binding yourself though), by default it comes with a browser backend, storing data in IndexedDB. I also have bindings for Steam and NewGrounds that I can share.

UI system

You're free to use it or not, the engine works just fine without it. The system is written for speed, and it offers a few commonly used tools, such as popup windows, notifications and pages. The UI system is optimized for speed, so it generates no garbage, but again - if you want to use, say React - you can ignore this system or integrate it with the system.

For more information, please refer to the documentation

Copyright © 2025 Company Named Limited, All Rights Reserved

Keywords

dream

FAQs

Package last updated on 05 Oct 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