Skip to content

@web-engine-dev/engine

The complete web game engine — umbrella package that re-exports all engine modules. Provides a single import for the full 75+ package engine.

Layer 9 · Engine Umbrella

Note: This package exports modules as namespaces to avoid name collisions between packages (e.g., Math.Vec3, ECS.World).

Installation

bash
npm install @web-engine-dev/engine
# or
pnpm add @web-engine-dev/engine

Quick Start

typescript
import { Math, ECS, Renderer, Input, Physics2DRapier, Time } from '@web-engine-dev/engine';

// Create game
const world = new ECS.World();
const renderer = await Renderer.create(canvas);
const input = new Input.InputManager();
const time = new Time.TimeManager();

// Define components
const Position = ECS.defineComponent('Position', { x: 'f32', y: 'f32' });
const Velocity = ECS.defineComponent('Velocity', { x: 'f32', y: 'f32' });

// Spawn entities
world.spawn().with(Position, { x: 0, y: 0 }).with(Velocity, { x: 1, y: 0 });

// Game loop
function gameLoop() {
  time.update(performance.now());
  input.update();

  // Update systems
  for (const [pos, vel] of world.query(Position, Velocity)) {
    pos.x += vel.x * time.delta;
    pos.y += vel.y * time.delta;
  }

  renderer.render(scene, camera);
  requestAnimationFrame(gameLoop);
}

gameLoop();

Architecture Layers

LayerCategoryPackages
0Foundationmath
1Standaloneevents, time, scheduler, hierarchy, resources, change-detection, splines
2ECSecs
3System Primitivesinput, audio, spatial, pooling, serialization, reflection, signals, tween, timer, scripting
4Simulationphysics2d, physics3d, physics2d-rapier, physics3d-rapier, animation, character, gesture, cloth, destruction, ragdoll
5Resourcesrender-graph, assets, asset-pipeline, shader-compiler
6Visual Outputrenderer, particles, text, sprites, tilemap, ui, vfx, camera, gltf, gizmos, terrain
7Gameplaypathfinding, ai, ai-ml, state, procgen, netcode, netcode-ecs, netcode-server, matchmaking, debug, devtools, screenshot, benchmark, timeline, replay
8Contentscene, prefab, level, save, streaming, hot-reload, build, storage, compression, editor-core, editor-ui, editor-viewport
9Umbrellaengine

Included Packages

Core

  • @web-engine-dev/ecs - Entity Component System
  • @web-engine-dev/math - Vector/matrix math
  • @web-engine-dev/time - Time management
  • @web-engine-dev/events - Event system
  • @web-engine-dev/scheduler - System scheduling

Rendering

  • @web-engine-dev/renderer - WebGPU/WebGL renderer
  • @web-engine-dev/render-graph - Render graph
  • @web-engine-dev/shader-compiler - WGSL preprocessing/transpilation
  • @web-engine-dev/sprites - 2D sprite rendering
  • @web-engine-dev/particles - Particle system
  • @web-engine-dev/ui - Game UI framework
  • @web-engine-dev/text-rendering - SDF text rendering
  • @web-engine-dev/gltf - glTF loader
  • @web-engine-dev/gizmos - Gizmo tools

Systems

  • @web-engine-dev/input - Input handling
  • @web-engine-dev/audio - Audio playback
  • @web-engine-dev/physics2d - 2D physics (reference)
  • @web-engine-dev/physics3d - 3D physics (reference)
  • @web-engine-dev/physics2d-rapier - 2D physics (production)
  • @web-engine-dev/physics3d-rapier - 3D physics (production)
  • @web-engine-dev/animation - Animation system

Infrastructure

  • @web-engine-dev/assets - Asset loading
  • @web-engine-dev/scene - Scene management
  • @web-engine-dev/save - Save system
  • @web-engine-dev/storage - Storage abstraction
  • @web-engine-dev/geometry-compression - Geometry compression
  • @web-engine-dev/texture-compression - Texture compression
  • @web-engine-dev/binary-compression - Binary compression

See individual package documentation for detailed API information.

Proprietary software. All rights reserved.