Lip sync, three ways
Recorded lines aligned phoneme by phoneme (the lips close on every m, b and p); live audio from a microphone or a call; and streamed speech, Gemini Live conversations included.
await face.say(clip, { audioContext })
Wireface for three.js
Give a person, a robot, a ghost or a pumpkin a face that talks with real lip sync, shows what it feels, and looks at whatever you choose. It's Wireface's own face, rebuilt as three.js geometry: lit by your scene, solid from every side, and as many as you like.
Plain ES modules on three.js, Wireface core and Wireface 2D: no build step. Free for personal and non-commercial use; commercial licences for everything else.
What a face can do
It's the same animator that runs Wireface Desktop and the face at the top of this site: the blinks, breathing, gestures, expressions and lip sync, frame for frame. Here it moves three.js geometry, and your characters move with it.
Recorded lines aligned phoneme by phoneme (the lips close on every m, b and p); live audio from a microphone or a call; and streamed speech, Gemini Live conversations included.
await face.say(clip, { audioContext })
Fifteen moods for a few seconds or worn standing, states like thinking and asleep that change the eyes and posture, and expressions of your own from the rig's channels.
face.express('surprised')
Look at anything in the scene: the camera, a point, another character's head. The eyes go first and converge on it; the head turns for the rest, as a person's does.
face.gazeAt(camera)
Photo skins (any portrait, made in the browser), sculpted, cel-shaded and Wireface's glowing hologram in seven colours. Skins sweep on, wireframes cross-fade, faces burn away and come back.
face.set({ style: 'toon' })
The face brings the back of a head in its skin's colour. It tells you where its eyes, ears and crown are for hair, hats and glasses, and gives ears and hands its own skin.
face.head.add(hat)
Put it on a glTF model's head bone: the face's nods and turns are added on top of your animations, so a character can wave, dance and talk at once.
attachFace(findBone(robot, /head/i), face)
Two ways
Wireface core's 468-point face, posed every frame and drawn by three.js: lit and shadowed by your scene, seen from any side, and as many as you like in your one renderer. For people, creatures, aliens, robots, crowds.
A whole Wireface face, drawn by its own engine as a live texture: core's hologram with its bloom on a monitor or a visor, or Wireface 2D making a painting talk. For anything that's a screen.
Both answer to the same methods, so a character doesn't need to know which it has.
The cast
Each one is a short file showing one way to put a face on a head, and all of them are on one stage in the demo: click anyone to hear them, and the rest turn to look.
For developers
import { FaceMesh, attachFace } from '@wireface/three';
const face = new FaceMesh({ skin: 'mei', size: 0.27 });
attachFace(character.head, face); // it nods and sways the head
face.gazeAt(camera); // eyes first, then the head
face.express('happy');
await face.say(await face.clip('mei'), { audioContext });
On a rigged model: findBone() finds the head, attachFace() puts the face
on it, and the model's own animations play underneath.
It sits beside Wireface core and Wireface 2D, which it runs on:
git clone https://github.com/compsmart/wireface-core core
git clone https://github.com/compsmart/wireface-2d 2d
git clone https://github.com/compsmart/wireface-threejs threejs
cd threejs && npm install && npm start # http://127.0.0.1:5175/demo/See it for real
Eleven characters on one stage, in your browser. Click anyone to hear their line, change their looks and their skins, and watch the others turn to look.
Free for personal and non-commercial use. Building it into a product? See pricing.