Frontory

Open code, practice, and notes →

Download source with English comments · for reading

Three.js · 17 Clip Animation

Series contents · Technology map

Stage: Animation, Instancing, and Render Passes · Editable example · Storage ID: threejs-step-17

Goals and learning outcomes

Prerequisites

Prerequisite concepts: Control State, Static Scenes. Prepare the result files and observation notes from unit 16.

Key concepts and explanations

Mixer Time

AnimationMixer.update accepts delta in seconds. Passing milliseconds unchanged makes animation run too fast.

Clips and Actions

AnimationClip holds keyframe data, while an action holds playback state. Multiple actions may affect the same model.

Practice setup

First read the execution-scope guidance on the example screen. The following environment is for extending the assignment in a separate project. Implement it yourself in an HTML and ES module project served by a separate local HTTP development server. Pin three and addons to the same installed version and record it.

The linked example is a starting point. It does not implement every task below. Complete work beyond its supported scope in a separate project.

Practice tasks

  1. Prepare day-17.js and index.html in the external exercise project. Display the clip list from a local glb containing animation in an HTML select.
  2. Play it with mixer.clipAction, and connect timeScale and a stop button.
  3. Save the output under the 1 input condition, then run again under the 0.5 condition. Expected: The same clip plays at half speed. Compare with the actual screen and logs, and record the actual result and reasons for any differences in day-17-notes.md.

Variables to observe

VariableBaselineChangeExpected change / hypothesis
timeScale10.5The same clip plays at half speed.

Predictions in this table are not measured results. Change one condition at a time and record why the actual result differs.

Completion criteria

Self-check

  1. Can clip data and actions each be reused?
  2. What needs cleanup besides stopAllAction when replacing a scene?

Official references

Linked example and execution scope

Example source · Runtime environments and limits

Runs a procedurally created AnimationClip and AnimationMixer. Extend glTF clip-list loading in an external project with GLTFLoader.

Source code and records are not overwritten automatically. Resetting an existing example also preserves your notes.

Next learning

Previous: Orbit Controls and On-Demand Rendering · Next: Transparency and Depth

Open code, practice, and notes →