Understand animation components (primary, secondary, sound)

Topic 20 – Animation

Learning Objectives (Cambridge 9626)

By the end of this lesson students will be able to:

  • Identify the three components of an animation – primary animation, secondary animation, and sound.
  • Explain the purpose of each component and how they interact to support usability, accessibility and performance.
  • Analyse simple animation examples, classify each element as primary, secondary or sound‑based, and justify the classification.
  • Apply design guidelines (duration, easing, hierarchy, accessibility, hardware‑acceleration) when creating or evaluating animations.
  • Write a short algorithm/flow‑chart that sequences primary, secondary and sound components.
  • Relate animation design to other syllabus topics such as the system life‑cycle, emerging technologies and communications.

1. What is Animation?

In information technology, animation is the visual change of an object over time. It is employed to:

  • Provide immediate feedback to the user.
  • Guide attention toward important interface elements.
  • Enhance the aesthetic appeal and perceived quality of an application.

2. Components of Animation

2.1 Primary Animation

The primary animation is the core motion that directly conveys the intended action or state change. It is the most noticeable part of an animation sequence.

  • Typical purpose: Communicates the main interaction (e.g., opening a menu, confirming a click).
  • Typical duration: 200 ms – 500 ms for a responsive feel.
  • Easing functions (examples):
    • Ease‑in‑out cubic: cubic‑bezier(0.4, 0, 0.2, 1)
    • Ease‑out quartic: cubic‑bezier(0.25, 0.46, 0.45, 0.94)
  • Typical examples:
    • A button expands when clicked.
    • A navigation drawer slides in from the side.
    • A progress bar fills to indicate loading.

2.2 Secondary Animation

The secondary animation supports the primary animation with subtle, complementary motion. It adds realism and visual richness without competing for attention.

  • Typical purpose: Shows weight, material properties, or hierarchy.
  • Typical duration: 100 ms – 300 ms, usually starting after the primary motion begins.
  • Characteristics:
    • Subtle and brief.
    • Follows the primary animation in a logical order (e.g., a shadow lags behind a moving object).
    • Provides a sense of physical realism (bounce, overshoot, ripple).
  • Typical examples:
    • A soft bounce after a button press.
    • A ripple spreading across water when a tap is registered.
    • A slight shadow shift as an icon moves.

2.3 Sound in Animation

Audio cues reinforce visual feedback, improve accessibility and contribute to a brand’s identity.

  • Typical purpose: Confirm actions, signal transitions, create ambience.
  • Typical duration: < 250 ms to avoid distraction.
  • Types of sound cues:
    • Click or tap sounds for button activation.
    • Transition tones for page or view changes.
    • Ambient sounds that react to user actions (e.g., a “ding” when an item is added to a cart).
  • Accessibility considerations:
    • Provide a mute or volume control.
    • Respect the OS‑level prefers-reduced-motion setting – if motion is reduced, replace visual animation with a brief fade or static highlight; sound should be handled separately (e.g., muted only if the user disables audio).
    • Use consistent audio branding across the application.

3. Hardware‑Acceleration & Performance

For smooth, battery‑friendly animation the browser or operating system should be able to off‑load work to the GPU.

  • Use transform (translate, scale, rotate) and opacity for motion – these properties are GPU‑accelerated.
  • Avoid animating layout‑affecting properties such as top, left, width or height because they trigger re‑flows and are CPU‑bound.
  • Keep the number of animated layers low; each layer adds compositing cost.

3.1 Performance‑Testing Checklist

  • Open Chrome DevTools → Performance tab and record a typical interaction.
  • Check the Frames per Second (FPS)** chart – aim for ≥ 60 fps on target devices.
  • Look for “Layout” or “Paint” spikes; replace offending properties with transform/opacity.
  • Test on low‑end hardware (e.g., older smartphones, modest laptops) to ensure acceptable smoothness.
  • Measure CPU/GPU usage with the Task Manager or OS‑specific profiling tools.

4. Design Guidelines Checklist

  • Is the primary animation obvious, purposeful and timed between 200 ms – 500 ms?
  • Do secondary animations add value (weight, realism) without distracting from the primary action?
  • Is the sound brief (250 ms), context‑appropriate, and optional for users who need it muted?
  • Are easing functions consistent and appropriate for the motion type?
  • Do you respect prefers-reduced-motion and provide visual alternatives?
  • Are only GPU‑accelerated properties (transform, opacity) used for motion?
  • Is the animation tested on target devices for smoothness and low CPU/GPU usage?

4.1 Mapping Guidelines to Assessment Objectives (AO)

Guideline Relevant AO How it is demonstrated
Clear primary motion (200‑500 ms) AO1 – Knowledge & understanding Explain why the duration feels responsive.
Subtle secondary motion (100‑300 ms) AO2 – Application of knowledge Apply easing and timing to a secondary effect.
Brief, optional sound (<250 ms) AO3 – Evaluation Assess the impact on accessibility and user experience.
GPU‑accelerated properties AO4 – Design & development of solutions Implement animation using transform/opacity and test performance.
Reduced‑motion handling AO5 – Evaluation of solutions Justify alternative visual feedback for users with motion sensitivities.

5. Accessibility: Reduced‑Motion Definition & Code

Reduced motion is a user preference that asks the system to minimise or eliminate non‑essential visual movement (e.g., animations, transitions). It is typically set at the OS level and exposed to web content via the CSS media query prefers-reduced-motion.

/* Example: replace slide animation with a simple fade when reduced motion is requested */
@media (prefers-reduced-motion: reduce) {
    .panel‑enter {
        animation: fade‑in 150ms ease‑out forwards;
    }
    .panel‑leave {
        animation: fade‑out 150ms ease‑out forwards;
    }
}

/* Normal slide animation (used when motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
    .panel‑enter {
        animation: slide‑in‑right 300ms cubic-bezier(0.4,0,0.2,1) forwards;
    }
}

6. Sequencing Animation – Algorithm / Flow‑Chart Example

Below is a simple pseudo‑code algorithm that shows how primary, secondary and sound components are orchestrated.

function runInteraction() {
    // 1. Start primary animation
    startPrimaryAnimation();
    // 2. After a short delay (e.g., 50 ms) start secondary animation
    setTimeout(startSecondaryAnimation, 50);
    // 3. Play sound concurrently with primary (or after a tiny offset)
    playSoundCue();
    // 4. When primary finishes, clean‑up if needed
    onPrimaryEnd(() => {
        // optional: trigger next UI state
    });
}

In a visual flow‑chart the steps appear as:

Flow chart: Primary → (delay) → Secondary → Sound
Flow‑chart: Primary animation → (short delay) → Secondary animation → Sound cue

7. Real‑World Case Studies

7.1 Mobile App On‑boarding Flow (existing example)

  1. Step 1 – Welcome screen fades in. Classification: Primary animation
  2. Step 2 – Illustrative icon slides up slightly while a subtle shadow follows. Classification: Secondary animation
  3. Step 3 – A soft “whoosh” sound plays as the next screen slides from the right. Classification: Sound
  4. Step 4 – The “Get Started” button scales up on tap, then bounces back. Classification: Primary animation (button press) with a secondary bounce.
  5. Step 5 – If the user has enabled “Reduced Motion” in the OS, the slide transition is replaced by a quick fade, and the sound is muted. Classification: Accessibility adaptation (visual alternative + optional audio mute).

7.2 Desktop/Web Modal Dialog (new cross‑platform example)

  1. Primary animation: The modal dialog fades in and scales from 95 % to 100 % over 250 ms using cubic‑bezier(0.4,0,0.2,1).
  2. Secondary animation: The background overlay darkens slightly and a subtle “shadow‑grow” effect follows the dialog’s scaling (starts 50 ms after the dialog animation, lasts 150 ms).
  3. Sound: An optional “click‑off” tone (180 ms) plays when the user confirms the dialog; it respects the mute control.
  4. Reduced‑motion handling: When prefers-reduced-motion: reduce is detected, the dialog appears instantly with no scaling, and only the overlay opacity changes (no sound is played unless the user has explicitly enabled audio feedback).

8. Connections to Other Syllabus Topics

  • System life‑cycle: Animation design is part of the implementation and testing phases; performance testing links to the maintenance stage.
  • New & emerging technologies: Techniques such as WebGL, AR/VR, and motion‑sensing devices rely heavily on efficient, hardware‑accelerated animation.
  • Communications technology: Sound cues must consider bandwidth (e.g., using compressed audio formats) and latency, especially in web‑based applications.
  • Usability & accessibility: The animation guidelines directly support the syllabus’s focus on inclusive design.

9. Evaluation Rubric – “Good” vs. “Excessive” Animation

Criterion Good Animation Excessive / Poor Animation
Clarity Clearly indicates the intended action or state change. Motion is ambiguous or unrelated to the interaction.
Subtlety Secondary motion is brief and does not compete for attention. Too many layers of motion; visual overload.
Consistency Easing, duration and visual style are uniform across the UI. Inconsistent timing or easing creates a disjointed experience.
Performance Runs at 60 fps on target devices; uses GPU‑accelerated properties. Causes lag, jank, or high battery consumption.
Accessibility Respects reduced‑motion settings; provides mute option for sound. Ignores user preferences; sound is mandatory or motion is overwhelming.

10. Practical Example – “Add to Cart” Interaction

  1. Primary animation: The product image scales up slightly and moves into the cart icon (200 ms, ease‑in‑out cubic).
  2. Secondary animation: The cart icon bounces once and a faint shadow shift follows (150 ms, ease‑out).
  3. Sound: A soft “ding” tone (< 200 ms) plays; respects mute setting and reduced‑motion preference.

This combination confirms the action, adds a sense of weight, and remains accessible.

11. Summary

Understanding the three components of animation—primary animation, secondary animation, and sound—enables developers to create interfaces that are:

  • Functional (clear feedback and guidance).
  • Engaging (pleasant, realistic motion).
  • Accessible (respecting reduced‑motion and providing optional audio).
  • Performant (using hardware‑accelerated properties and testing on target devices).

By applying the design‑guideline checklist, the guideline‑to‑AO mapping, and the evaluation rubric, learners can analyse, classify and improve the animation quality of their own projects, fully meeting the Cambridge 9626 syllabus requirements.

Suggested diagram: Flowchart showing the sequence “Primary animation → Secondary animation → Sound” with timing annotations (e.g., 200 ms, 150 ms, < 250 ms).

Create an account or Login to take a Quiz

41 views
0 improvement suggestions

Log in to suggest improvements to this note.