---
title: "Why a 3D Web Engine Abandoned TypeScript for Jai and WebGPU"
description: "After eight years of TypeScript and Three.js, Polygon's creator scrapped the entire codebase to rebuild in Jai. The radical pivot reveals the growing frustration with JavaScript runtime bloat in production graphics."
canonical: https://www.trendingtechdaily.com/dev/rewriting-commercial-engine-in-jai-webgpu
last-updated: 2026-10-25
---

# Why a 3D Web Engine Abandoned TypeScript for Jai and WebGPU

*By TrendingTech Dev Intelligence · October 25, 2026 · 3 min read · Category: [Developer Tools & Architecture](https://www.trendingtechdaily.com/dev)*

> After eight years of TypeScript and Three.js, Polygon's creator scrapped the entire codebase to rebuild in Jai. The radical pivot reveals the growing frustration with JavaScript runtime bloat in production graphics.

In commercial software development, throwing away an eight-year-old, revenue-generating codebase is widely considered an act of madness. Yet that is precisely what Guillaume, the creator behind procedural 3D web platform Polygon, opted to do. After nearly a decade of navigating the quirks of TypeScript and Three.js, the developer announced a total architectural reset, migrating to Jonathan Blow's unreleased systems language, Jai, and building directly on top of WebGPU.

The move, documented in an exhaustive breakdown on the [Polygonjs engineering blog](https://polygonjs.com/blog/why-i-rewrote-polygon-from-scratch), underscores an increasingly urgent reckoning within graphics programming: modern web runtimes are collapsing under the weight of their own abstractions.

## The Illusion of JavaScript Ergonomics

TypeScript paired with Three.js has long served as the default gateway for interactive 3D on the web. It offers rapid prototyping, massive community ecosystems, and seamless browser compatibility. But when building a node-based computational engine where scenes demand thousands of geometry evaluations per frame, the runtime cost becomes crippling.

In high-throughput procedural graphics, unpredictable Garbage Collection (GC) pauses destroy real-time frame pacing. Despite defensive programming to reuse vectors and avoid allocations, JavaScript's runtime guarantees remain slippery. More critically, the cognitive friction of working around Three.js abstractions—designed around traditional scene graphs rather than data-oriented pipelines—created an unsustainable maintenance tax.

## Why Bet on Jai?

Rather than jumping to established systems languages like Rust or C++, Guillaume chose Jai—the bespoke, closed-beta programming language created by game designer Jonathan Blow. Engineered explicitly for game development and performance-critical systems, Jai emphasizes blistering compile speeds, compile-time code execution (run directives), and radical data layout control without the bureaucratic friction of complex borrow-checkers or template metaprogramming.

For Polygon, Jai offers mechanical sympathy that TypeScript cannot rival. By compiling Jai directly to WebAssembly and writing custom pipelines over the modern [W3C WebGPU specification](https://www.w3.org/TR/webgpu/), the engine completely bypasses external rendering engines. Compute shaders, custom memory allocators, and explicit buffer transfers now mirror native game engine architecture inside the browser sandbox.

## The Native Renaissance on the Web

This rewrite is not merely an isolated engineering adventure; it represents a broader ideological shift across web development. With WebAssembly maturing and WebGPU exposing explicit modern graphics hardware APIs, developers are no longer forced to treat the browser as a dynamic scripting playground.

By stripping out third-party framework overhead, Polygon joins a growing vanguard of systems engineers choosing raw control over convenience. While rewriting an engine from scratch carries immense opportunity cost, the payoff is definitive: sub-millisecond compilation cycles, deterministic memory boundaries, and graphics pipelines tuned directly to the silicon.

## Primary Sources

- [Why I rewrote Polygon from scratch · Polygonjs](https://polygonjs.com/blog/why-i-rewrote-polygon-from-scratch) (polygonjs.com)

---
[Agent Index (llms.txt)](https://www.trendingtechdaily.com/llms.txt) · [More in Developer Tools & Architecture](https://www.trendingtechdaily.com/dev)