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 — GLTF ANIMATION · NEW IN 0.47
Bones bend. Shapes breathe.
A glTF now moves the way its file says. A skinned mesh follows its skeleton, and morph targets reshape a mesh by their weights.
The bones are scene objects, so set, animate or a timeline track bends the skin. gltfTracks plays the file’s own animation, weights included, in Ray, Wireframe and ASCII.
Recorded frame by frame in Ray: one timeline plays both files’ animations, rotation tracks on the bones and a weights track on the ball.
skins
Up to four bones a vertex. The joints are objects you can move.
weights
A new timeline kind. Up to 64 shape keys a mesh.
gltfTracks()
Plays rotation, position, scale and weights channels.
ALSO IN 0.47Timeline tracks move kinematic bodies at their own speedImpulse cues fire once per crossingPicks and bounds follow the deformed mesh
06 — PUPPETS · NEW IN 0.52
Stand it up. Knock it down.
The engine’s first characters. A puppet is a figure of rigid parts, one body for each bone: it holds its pose until a hit is hard enough, then goes limp, part by part.
Declare one in a stage and its parts are ordinary objects, drawn in Ray, Wireframe and ASCII from the same bodies. limpOnImpact sets how hard a hit must be; goLimp() lets the whole figure fall.
PUPPET / MANNEQUIN · 15 PARTSRAY / RECORDED IN 0.52.0
STAGE / PUPPETS
const scene = createScene(canvas, {
physics: { scale: 1.5, jointSolver: "chain" },
stages: [{ items: [plinth], puppets: [{
id: "actor", spec: "mannequin", // 15 parts
limpOnImpact: { impulse: 6, spread: 1 }, // N·s, joints
}] }],
});
await scene.ready;
scene.item("actor.head"); // a part, an object
scene.puppet("actor").goLimp(); // all of it
Recorded frame by frame in Ray, on the scene’s stepped clock: every ball is the “Throw a ball” button’s, and a hit hard enough turns that part limp, and everything that hangs from it.
humanoid()
A mannequin of 15 parts or a dummy of 11, with a human body’s shares of the mass.
limpOnImpact
The part a hit lands on goes limp, and what hangs from it.
"actor.head"
Every part is an object: events, picks and materials name it.
ALSO IN 0.50 – 0.52Joints that break and say when they reach a limitRobots from description files, in a world or a sceneScene JSON keeps parents and groups
07 — 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
12 — 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.