API Reference

Complete API documentation for the xs game engine, auto-generated from Wren module files.

Core Modules

The xs engine provides several modules for game development:

xs Core API

Main engine classes: Render, Input, Audio, SimpleAudio, File, Json, Device, Data, Inspector, Profiler

Math & Vectors

2D vector math, colors, geometry, and bit operations

Entity-Component

Flexible EC system for organizing game logic

Containers

Data structures like Grid, Queue, and RingBuffer

Tools

Utility functions and ShapeBuilder

Components

Pre-built components like Sprite and Transform

Usage

Import modules in your Wren code like this:

// Import core xs engine classes
import "xs/core" for Render, Input, Audio, SimpleAudio, File, Json, Device, Data

// Import math utilities
import "xs/math" for Vec2, Math, Color

// Import entity-component system
import "xs/ec" for Entity, Component

// Import pre-built components
import "xs/components" for Transform, Sprite, Body

// Import containers
import "xs/containers" for Grid, Queue

// Import utility tools
import "xs/tools" for ShapeBuilder

Module Overview

Each module provides classes and functions for specific functionality:

Available Modules

Browse the complete API documentation:

Note: API documentation is auto-generated from Wren source files. Run python3 tools/docs_html.py to regenerate after module changes.