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 · games and 3D
Give a game character, an NPC, 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: Wireface's own face as three.js geometry, a face drawn on the object itself, or a model's own eyes and mouth brought to life. Lit by your scene, and as many as you like.
Live demo
Pick a character, move your pointer and turn on sound. The face is rendered live with three.js, using the same animation engine as the SDK.
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)
Three ways
FaceMesh: Wireface's 468-point face, posed every frame and drawn by three.js, with the back
of a head. Lit and shadowed by your scene, seen from any side, as many as you like. For people,
creatures, aliens and crowds.
Draw a face in the object's own colours and Wireface 2D makes the drawing talk, wrapped round its
curve (wrapGeometry) and painted on its own material (paintOn). A ghost's
sheet, a pumpkin, a can.
ModelFace: a model's own eyes get lids that blink and a glint that follows you, and it
gets a mouth that lip-syncs, laid on its head. Gemini Pro finds where they go; the result is saved and
played back.
FaceScreen: a whole Wireface face drawn by its own engine as a live texture, on a monitor,
a visor or a TV, or Wireface 2D making a painting talk.
All of them 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 give a character a face, 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/sdk/three';
const face = new FaceMesh({ skin: 'sarah', 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('sarah'), { audioContext });FaceMesh on a head, a face drawn on the object
(FaceScreen, wrapGeometry, paintOn), and a model's own face
(ModelFace); and FaceScreen on screens.
On a rigged model: its own eyes blink and its new mouth talks (ModelFace, on the
head findBone() finds), while the model's own animations play underneath.
It's in the Wireface SDK, with the three.js examples. Get the SDK, add it to your project next to three.js, then follow the three.js user guide.
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.
Using Wireface with the SDK is free under the Personal Licence for personal and commercial use, such as your own website, including character creation and the optional detection API. Putting it into a product, app or service you sell or charge for, such as a SaaS product, needs a Developer Licence (freelancers, indie developers and companies with fewer than 10 employees) or, for larger companies, an Enterprise Licence. Desktop and Chat have their own licences. See licensing.