Installation
Install the engine and configure your bundler for development and production.
From npm
npm install @woosh/meep-engine
This pulls the latest published release.
Peer dependencies
Meep optionally depends on Three.js for the 3D rendering subsystem. If you’re using the graphics modules, install it too:
npm install three
The peer dep is marked optional — non-rendering uses of the engine (AI/simulation/ECS only) don’t require it.
Importing
Meep is distributed as fine-grained ES modules. There’s no monolithic root import — you reach for exactly what you need:
import { EntityManager } from "@woosh/meep-engine/...";
import { Entity } from "@woosh/meep-engine/...";
import { Transform } from "@woosh/meep-engine/...";
Internal paths are intentionally elided here because they’re subject to change. Find each module by name in the package’s src/ tree, or rely on your editor’s path completion against the installed package. Tree-shaking eliminates anything you don’t reference — the bundle size of a “use the lerp function” demo is about 4 lines compiled.
Bundler configuration
Vite
// vite.config.js
import { defineConfig } from "vite";
import strip from "@rollup/plugin-strip";
export default defineConfig({
plugins: [
{ ...strip({ functions: ["assert.*"] }), apply: "build" },
],
});
Rollup
// rollup.config.js
import strip from "@rollup/plugin-strip";
export default {
// ...
plugins: [
strip({ functions: ["assert.*"] }),
],
};
Webpack
Use babel-plugin-strip or a custom Terser pass. The pattern is the same — strip the assert.* calls before minification.
What strip actually does
In development, Meep runs with roughly 4,000 assertions sprinkled across the engine. They catch invalid component state, out-of-range indices, broken invariants, and similar bugs at the moment they happen. In production, you don’t want any of that runtime overhead, so the strip plugin removes the calls entirely. The resulting bundle is significantly smaller and runs at full speed.
Browser targets
Meep targets the last two stable versions of Chrome, Firefox, and Safari. WebGL2 is the floor for rendering; WebGPU is optionally used where available.
Verifying your install
import { version } from "@woosh/meep-engine/package.json" with { type: "json" };
console.log("meep", version);
If you can read that without errors, you’re set up. Move on to the ECS overview.