I’m Sam from ThreeDee. We made Business Bull, a free rigged character with 52 ARKit facial blendshapes. Here’s a small example for anyone trying morph targets in three.js. The smile has separate left and right targets, so you can drive both corners of the mouth with one slider or change just one for a crooked grin.
Here’s the range input:
<label>Smile <input id="smile" type="range" min="0" max="1" step="0.01" value="0"></label>
Once GLTFLoader has loaded the character, run this in the load callback. The example assumes your scene already renders in an animation loop.
const slider = document.querySelector('#smile');
gltf.scene.traverse(mesh => {
const targets = mesh.morphTargetDictionary;
if (targets?.mouthSmileLeft == null || targets.mouthSmileRight == null) return;
slider.addEventListener('input', () => {
const smile = slider.valueAsNumber;
mesh.morphTargetInfluences[targets.mouthSmileLeft] = smile;
mesh.morphTargetInfluences[targets.mouthSmileRight] = smile;
});
});
To try it with the same character, download Business Bull from ThreeDee and choose the blue-shirt GLB. The same setup works with jawOpen if you want to try a single target next.
