v0.15.3 Pre-1.0 / TypeScript / MIT

A TypeScript-first
2D runtime for
arcade games

ExoJS gives you scenes, sprites, graphics, input, audio, effects, assets, and rendering primitives — without turning your project into a full game-engine workflow.

game.ts scenetweens
import { Application, Color, Scene, Sprite, Texture } from '@codexo/exojs';

class HeroScene extends Scene {
  private ship!: Sprite;

  async load(loader) {
    this.ship = new Sprite(await loader.load(Texture, 'ship.png'));
  }

  init() {
    const { width, height } = this.app.canvas;
    this.ship.setAnchor(0.5).setPosition(width / 2, height / 2);

    // Pulse and spin — two tweens running in parallel.
    this.app.tweens.create(this.ship.scale)
      .to({ x: 1.4, y: 1.4 }, 0.9).yoyo(true).repeat(-1).start();
    this.app.tweens.create(this.ship)
      .to({ rotation: Math.PI }, 1.8).yoyo(true).repeat(-1).start();
  }

  draw(context) {
    context.backend.clear();
    context.render(this.ship);
  }
}

const app = new Application({
  canvas: { width: 960, height: 540 },
  clearColor: Color.black,
});

app.start(new HeroScene());
Live — rendering in your browser

Bonfire

Not a video or a GIF — this is the engine running in the page. Hit play, then open it in the Playground and edit it live.

Preview is paused until you click Play.

SCN

Scenes & lifecycle

Compose scenes from sprites, graphics, and text. Lifecycle hooks make state predictable.

INP

Unified input

Keyboard, pointer, and gamepad behind one action mapping API.

AUD

Spatial audio

Buses, effects, and listener-source positioning built on Web Audio.

FX

Filters & particles

Post-processing, bloom, blur, particles — composable and GPU-accelerated.

Live examples.

Open any of these in the Playground. The code and preview stay in sync with the running example.

examples / 54 chapters / 123 demos

Install once, use anywhere.

ExoJS ships as plain ES modules. Drop it into Vite, esbuild, or whatever you already use.

Open Getting Started
$ npm install @codexo/exojs COPY
import { Application, Scene } from '@codexo/exojs';

class HelloScene extends Scene {
  draw(context) {
    context.backend.clear();
  }
}

const app = new Application({ canvas: { width: 800, height: 600 } });
app.start(new HelloScene());