Skip to content

Exoridus/ExoJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

158 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExoJS

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.

Package Surface

  • Core package: exojs
  • Advanced WebGL2 surface: exojs/webgl2
  • Advanced WebGPU surface: exojs/webgpu

Current Built-In Runtime Features

  • 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

Backend Model

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' } });

Quick Start

Install:

npm install exojs

Minimal 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());

Examples

Primary real-world consumer and validation surface:

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

API Docs

Class-focused runtime docs live under docs/api.

Key pages:

Advanced Backend Access

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.

Development

Common validation commands:

npm run typecheck
npm run lint
npm test
npm run build
npm run build:declarations
npm run verify:package

Repository-specific contributor guidance:

Project Links

About

Modern multimedia framework with a focus on performance and extensibility

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages