ExoJS is a TypeScript-first browser multimedia and rendering framework built around a clean Application entrypoint, a scene-driven runtime model, and explicit advanced backend surfaces when you need them.
The normal user path is package-based ESM usage through exojs.
Advanced backend-specific access lives under dedicated subpaths.
- Core package:
exojs - Advanced WebGL2 surface:
exojs/webgl2 - Advanced WebGPU surface:
exojs/webgpu
- Application / Scene / drawable rendering flow
- Graphics / DrawableShape rendering
- Sprite rendering
- ParticleSystem rendering
- Text rendering through the normal texture-backed path
- Video rendering through the normal texture-backed path
- RenderTexture / offscreen rendering
- Blend modes including normal, additive, subtract, multiply, and screen
- Audio playback and analysis
- Resource loading and typed factories
- IndexedDB-backed persistence support
- Input handling for pointer and gamepad
- Collision detection / response utilities
ExoJS now treats WebGPU as the preferred built-in backend when available, with automatic fallback to WebGL2.
Normal users typically do not need to choose a backend explicitly:
import { Application } from 'exojs';
const app = new Application();If you need to force a backend:
import { Application } from 'exojs';
const webGpuApp = new Application({ backend: { type: 'webgpu' } });
const webGlApp = new Application({ backend: { type: 'webgl2' } });
const autoApp = new Application({ backend: { type: 'auto' } });Install:
npm install exojsMinimal example:
import { Application, Color, Graphics, Scene } from 'exojs';
class DemoScene extends Scene {
private readonly graphics = new Graphics()
.beginFill(Color.white)
.drawRect(-64, -64, 128, 128)
.endFill();
public override draw(runtime: import('exojs').SceneRenderRuntime): void {
this.graphics.rotation += 0.01;
this.graphics.render(runtime);
}
}
const app = new Application();
app.start(new DemoScene());Primary real-world consumer and validation surface:
- Examples repository: https://github.com/Exoridus/ExoJS-examples
- Live examples: https://exoridus.github.io/ExoJS-examples/
The examples repository covers:
- normal built-in engine usage
- advanced backend-specific extension cases
- WebGL2 and WebGPU validation paths
- smoke-tested browser consumption through the real package surface
Class-focused runtime docs live under docs/api.
Key pages:
Use advanced backend-specific APIs only when you actually need them.
WebGL2 advanced surface:
import { RenderManager, SpriteRenderer } from 'exojs/webgl2';WebGPU advanced surface:
import { WebGpuRenderManager, type WebGpuRenderAccess } from 'exojs/webgpu';These subpaths exist for custom renderers and backend-specific systems. They are not required for normal Application-centric usage.
Common validation commands:
npm run typecheck
npm run lint
npm test
npm run build
npm run build:declarations
npm run verify:packageRepository-specific contributor guidance:
- AI / agent workflow: AGENTS.md
- Claude-specific repo guidance: CLAUDE.md
- AI repository map: docs/ai/repo-map.md
- Repository: https://github.com/Exoridus/ExoJS
- Issues: https://github.com/Exoridus/ExoJS/issues
- Examples repository: https://github.com/Exoridus/ExoJS-examples
- Live examples: https://exoridus.github.io/ExoJS-examples/