Build 2D games
in the browser.
Vaelis is a 2D game engine with a visual editor, JavaScript scripting, Rapier2D physics, navigation, lighting and one-click export. These docs cover every component, API and editor control.
function onStart() {
this.speed = 220;
}
function onUpdate(dt) {
if (input.keyDown("ArrowRight")) {
this.x += this.speed * dt;
}
if (input.keyPressed("Space")) {
this.rigidbody.addImpulse(0, -350);
}
}Everything the engine does, documented
Pages are written from the shipped source: field names, defaults, script members and menu paths are checked, not guessed.
Editor, end to end
Hierarchy, Inspector, viewport tools, prefabs, physics layers and nav areas — with exact menu paths and shortcuts.
JavaScript scripting
Lifecycle hooks, this context, globals, timers, messaging and typed errors.
Rapier2D physics
Dynamic, kinematic and static bodies, 16-layer filtering, joints and one-way platforms.
Grid navigation
NavWorld2D bake & paint, 16 areas with costs, NavAgent2D steering and avoidance.
2D lighting
Six light types, shadow casters and quad or raymarched shadows.
Tween & time control
tween() with 33 easings, cancelTween(), and time.scale for slow motion or freeze.
Ship anywhere
HTML5, installable PWA, and Android APK: use an API key, or export HTML and upload it on the APK service website.
A clear path in
New to Vaelis? Follow these three pages in order.
Component reference
25 components, each with serialized fields, defaults, script API, tuning rules and the exact editor entry point.
For developers
Precise, prerequisite-aware API pages.
- Every component and script member with types and defaults
- Option (
opts) shapes for raycasts, spawning and navigation - Editor shortcuts and conditional tools, exactly as implemented
For AI assistants & crawlers
Plain HTML, stable URLs, no client-only content.
- llms.txt index and llms-full.txt full text
- A Markdown twin of every page (same URL,
.md) - JSON catalogs: API, search, sitemap
Ready to build?
Start with the installation guide, or jump straight into scripting.