Surfaces become a field of moving characters. Expressive by design, and ready for browsers without WebGPU.
scene.setMode("ascii")One scene. A new way to see it.
SCROLL TO CHANGE PERSPECTIVE ↓ASCII / STUDIO RECORDING
03 — THE MATERIAL COLLECTION
Materials that behave like matter.
IOR 1.5. A hint of green through its depth.
512
maximum samples per pixel when the scene holds still
Auto
adaptive quality adjusts to the available GPU budget
0 deps
one engine, WebGPU rendering and an ASCII fallback
SCROLL TO EXPLORE THE COLLECTION ↓RAY / STUDIO CAPTURE
04 — ONE SCENE API · SINCE 0.38
One scene. Your renderer.
createScene() draws the same objects, lights and effects in ASCII, Wireframe, Ray, or a renderer you write. Hand it a renderer plugin with mode: "custom" and switch back and forth with setMode().
The Toon look on this page is one of those plugins. And smoke in Ray is now a real 3D volume: objects hide it, it hides them, and the camera can fly straight through.
MODE CUSTOM / YOUR RENDERER
import { createScene } from "mote-engine";
import { toon } from "./toon.js";
const scene = createScene(canvas, {
mode: "custom", renderer: toon,
stages: [{ items: [knot, ring] }]
});
scene.setMode("ray"); // same world
scene.setMode("custom", "toon"); // your look
A breaking rename: the old names are gone, and TypeScript points at each use. The manual has the full table, old name to new.
createScene()
One function for every renderer. Was createAsciiScene().
mode: "custom"
Your renderer plugin, by id or object.
glyphRenderer
What draws ASCII’s characters. Was renderer.
ALSO IN 0.38Smoke in Ray is a 3D volumeA finer starburst for the natural lens flareMirrors reflect again in Chrome on Apple GPUs
05 — CUSTOM SHADERS · SINCE 0.37
Write the surface. Grow the fur.
Bring your own shaders. The api: 1 contract for volumes, lights, post passes, layers and lenses is now stable, and validateRayManifest() checks a manifest before it ever meets a GPU.
New, as a candidate: the surface part. Ray grows shells over your object and a few lines of WGSL decide where each strand stands and what colour it takes. No textures. Soft shadows included.
SURFACE PART / RAY
// Ray grows 24 shells over the item.
{ kind: "surface", name: "fur",
item: "creature", fn: "strands",
shells: 24, length: 0.16, gravity: 0.35 }
// Your WGSL decides every strand.
fn strands(s: FxSurfaceIn, c: FxCtx)
-> FxSurfaceOut { … }
Build a configurator for jewellery, furniture or a new device. Let people compare glass, metals and colours in the same light, from their own point of view.
Make a mascot react, a reward burst into confetti or a small browser game feel tactile. Combine illustrated rendering, live effects and physical motion.
Generate controlled variations of an inspection scene. Change lighting, materials and camera angles, then capture images and scene data for your training or evaluation pipeline.
Think: testing recognition under unfamiliar lighting.
Prototype a balance, articulation or navigation task. Drive joints, read virtual LiDAR and replay a starting state. Connect actions, observations and rewards to your own learning loop.
Run the physics API headlessly in Node.js or in the browser. Add bodies, drive joints, query sensors and restore a snapshot. Combine physical state with image capture for your own learning pipeline.
The downloadable adapter defines reset, action, observation and reward using the public physics API. Training and policy optimization stay in your stack.
PUBLIC PHYSICS API / JAVASCRIPT
import { createPhysicsWorld }
from "mote-engine/physics";
const world = createPhysicsWorld({
jointSolver: "chain"
});
// Add bodies and hinges to your world.
const checkpoint = world.snapshot();
joint.setDriveTarget(action[0]);
world.step(1 / 60);
world.raycastBatch(origin, rays, 4, distances);
const observation = [joint.angle,
joint.angularVelocity, joint.torque];
world.restore(checkpoint);
FIXED STEPS · SENSORS · SNAPSHOT / RESTORE
10 — VIRTUAL ENVIRONMENTS
Before AI sees the world. Build it one.
Create controlled scenes for computer vision experiments. Vary the light, materials and viewpoint. Capture an image. Repeat with the same scene.
SYNTHETIC VISION LABRAY / CAPTURED FRAME
CAM_01 / INSPECTIONSEED 0042
YOUR NEXT TRAINING GROUND
A new world. One seed away.
Compare three captured inspection scenes. Each seed changes the arrangement, lighting and camera.