Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 9.4 — Morph Targets and Skinning
3D Web · Example 2 of 2

Three foxes: the wrong clone and the right one

Left: the original. Middle (x = 0): clone(). Right: SkeletonUtils.clone(), the only one that runs. The middle fox is not drawn where it was placed. Fox credits: Topic 9.3.

Morph targets blend a mesh between stored shapes. Skinning bends a mesh with a skeleton of bones. You animate both, and see what goes wrong when a skinned mesh is cloned the wrong way.

Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.

Ready for more? This phase has 6 hands-on exercises with automatic checks.

Practice questions

Write the code in the editor, run it, then open the model answer to compare.

01

Make three independent foxes that play different clips.

02

A mesh has morph targets added after it was created. Make morphTargetInfluences available.

Explain it without notes

01

When would you use a morph target and when a skeleton?

02

Why does a skinned mesh made with object.clone() appear in the wrong place?

Three foxes: the wrong clone and the right one
Press Run to see the page.
idle

Console

Nothing logged yet.

Expected console output

clone() shares the original's bones:            true
SkeletonUtils.clone has bones of its own:        true
tail bone z, original / clone() / SkeletonUtils: -0.054 -0.054 0.258
is a fox drawn at...
  x = -1.2 original             yes
  x =    0 clone()              no (background)
  x =  1.2 SkeletonUtils.clone  yes