Skip to content

three-procedural-locomotionProcedural human locomotion for Three.js

Walks, runs, turns, crouches, jumps and goes to a point over any ground, without baked animations. Everything is computed every frame from a speed and a heading.

Loading…

Quick example ​

ts
import { createProceduralHuman, mixamoMapping } from 'three-procedural-locomotion';

const human = createProceduralHuman({
  model: gltf.scene,      // humanoid model with a skeleton
  mapping: mixamoMapping, // which bone is each part of the body
  ground: [floorMesh],    // what counts as ground
  preset: 'athletic',     // optional: walking style
});

human.moveTo(point, { run: true });                 // go to a point…
human.targetSpeed = 1.2; human.targetHeading = 0.5; // …or continuous control (m/s, rad)
human.jump();

// every frame
human.update(dt);

Read the introduction and the user guide, or open the lab to see it move and tune every parameter live.

Released under the MIT License.