A TypeScript engine for AI-driven worlds. Cross-session NPC memory, asymmetric relationships, deterministic replay. Browser-first via Canvas2D or WebGL2; ECS world; render-graph stages; Director-bridge SSE integration. Built from scratch for TheWorldTable.ai, available standalone on npm.

01Surfaces

02Quickstart

// 1. install $ npm i @sadhaka/loom-engine // 2. attach to a canvas import { Engine } from '@sadhaka/loom-engine'; var canvas = document.querySelector('canvas'); var engine = Engine.create({ canvas: canvas }); // 3. drive the frame loop function tick(now) { engine.tick(now); requestAnimationFrame(tick); } requestAnimationFrame(tick);

03Stats / integrity

Tests
3,218
3,218 / 3,218 green at v1.6.5
Versions
128
since v0.10.0 / 2026
Source
46,802
LOC / 198 files
License
BUSL-1.1
Apache on 2030-05-08

04Wave milestones

v1.0.0
BenchmarkHarness
v1.1.5
GhostReplay
v1.2.5
LootTier
v1.3.5
NarrativeMemory
v1.4.5
SoundtrackDirector
v1.5.5
KnowledgeMap
v1.6.5
WorldSeed

05Authors

Engineered by
Misha Mitiev (@sadhaka)
with Claude Opus 4.7 / Anthropic
  • Pair-engineered architecture, primitive design, code review
  • Deterministic-replay-first stance, var-only browser source
  • 128 commits since v0.10.0 land Pure Addition
Niche
TS engine for AI-driven worlds. The differentiation is not engine breadth (Babylon, Excalibur, Phaser, Kaboom all do that well already) but:
  • Cross-session NPC memory via NarrativeMemory (v1.3.5)
  • Asymmetric relationships via RelationshipGraph + EmotionState
  • Deterministic replay via mulberry32 + clock seams