Uniquely adaptable TypeScript engine for AI-driven worlds. Cross-session NPC memory via NarrativeMemory; asymmetric relationships via RelationshipGraph + EmotionState; deterministic replay via mulberry32 + per-tick state hash. Trinity Mainframe v2.0 adds 14 pure-logic kernels (acoustic propagation, voxel mesh, packet routing, AI Director governance, anti-cheat, more) that drive a deferred WebGPU / WebTransport / WebCrypto / WASM-SIMD integration layer. Try the live playground at theworldtable.ai/engine. Built from scratch for TheWorldTable.ai, available standalone on npm.

01Surfaces

02Quickstart

// 1. install $ npm i loom-engine // 2. attach to a canvas import { Engine } from '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,984
3,984 / 3,984 green at v2.0.0
Versions
136
since v0.10.0 / 2026
Source
69,500
LOC / 247 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 (procgen complete)
v1.7.5
ChatChannel (networking complete)
v2.0.0
Trinity Mainframe (14 kernels)

04AWave 2.0 - Trinity Mainframe

14 pure-logic kernels enforcing 90+ Codex hardening gates. All non-negotiable engine invariants honoured: no RNG, no wall clock, no Atomics, fixed-capacity, every input bounds-checked. Try them live at theworldtable.ai/engine.

SonicSync
Acoustic propagation: voxel DDA + double-buffered perception events. 40 tests / 7 gates.
LoomVerify
Anti-cheat: PASS/RESYNC/REJECT verdicts, regional Merkle witnesses, value-class ZK gate. 36 tests / 7 gates.
NeuralMaterial
PBR synthesis: capability-gated PACKED_F16/F16/F32 paths, atlas LRU, GPU-timestamp latency. 33 tests / 7 gates.
InferenceOrchestrator
NPC AI router: LOCAL_SLM consented + CLOUD rate-limited, batched dispatch, critical ceiling. 37 tests / 6 gates.
LoomPulse
Player-vibe inference: EMA + confidence + hysteresis, default-deny consent, NO direct reputation. 22 tests / 7 gates.
LoomFlow
Adaptive networking: 3 lanes, per-lane sequence + epoch + idempotency, throttle hysteresis. 37 tests / 6 gates.
NeuralAnimationSystem
Motion-matching + inertialization: feature-DB search, real per-bone delta, exp() LUT decay. 24 tests / 6 gates.
VoxelComputeSystem
Marching-cubes mesher: front/back epoch-swapped density, Bourke MC tables, capacity-checked emit. 24 tests / 6 gates.
AetherGrid
N2N authority handoff: two-phase transfer, idempotency dedup, split-brain detection, crash recovery. 29 tests / 6 gates.
LoomFSR
Temporal upscaler: Halton(2,3) jitter, ping-pong color/depth/normal history, FSR-class sharpening. 26 tests / 7 gates.
SealedAssetRegistry
AES-GCM delayed-key disclosure: AAD binding, entitlement+region scoping, transferable buffers. 27 tests / 7 gates.
LoomForgeBridge
WASM-SIMD physics: strict build contract, single-source memory layout, double-buffered phase barrier. 26 tests / 6 gates.
GlobalStateLedger
Spatio-temporal persistence: Lamport ordering, per-component merge rules, auditable compaction. 27 tests / 7 gates.
LoomStudioOrchestrator
AI Director governance: telemetry epochs, batched SLM queries, fact-tier guard, reserved index 0. 29 tests / 6 gates.

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
  • 136 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