The robot
A rigged robot from a glTF file, with two eyes and no mouth. Give it a face: lids that blink over its own eyes, glints that follow you, and a mouth that lip-syncs. Then ask Sprocket to dance, wave or jump, and it does.
It finds the eyes it already has, and where a mouth should go.
Loading...
Sprocket has an act tool for its animations: ask it to dance, or just chat, and it moves when it feels like it.
ModelFace rigs a model's own face from where its features are: lids over its eyes, glints, and a mouth laid on its head. The model's animations play underneath, and the face's nods are added on top.
import { ModelFace, findBone } from '@wireface/sdk/three';
const robot = (await new GLTFLoader().loadAsync(url)).scene;
const face = new ModelFace({ ...features,
head: findBone(robot, /^head$/i) }); // lids, glints, a mouth
face.gazeAt(camera);
// its own animations, through an AnimationMixer as usual
mixer.clipAction(clips.Dance).play();