Skip to content

Exaggeration

Push a motion past realistic so it's clear at a glance.

Edit this page

Realistic motion often looks flat on screen. Exaggeration pushes each pose further from rest (bigger eyes, a deeper crouch, a higher jump) so the idea is clear at a glance. It’s a dial, not a switch: a game might want 1.8 and a banking app 0.5.

Now showing: ExaggerationOpen the Exaggeration demo on its own page (opens in a new tab)
Show the demo's source

The complete page: it loads toon.css and toon.js, plus demo-theme.js (theme colors), demo-runtime.js (gives the demo its own clock) and, for the characters, cast.js.

<!doctype html>
<html lang="en" data-style="saturday">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>10 · Exaggeration — toon</title>
<link rel="stylesheet" href="../src/toon.css">
<link rel="stylesheet" href="demo.css">
<style>
body { font-size: 15px; line-height: 1.5; max-width: var(--demo-max-width); margin: 2rem auto; padding: 0 1rem; }
canvas { display: block; width: 100%; height: 340px; margin: var(--space-sm) 0; cursor: pointer; }
</style>
</head>
<body>
<h1>Exaggeration</h1>
<p>Push poses past realism so the idea is clear at a glance. One slider drives both modules: the canvas poses
go through <code>exaggerate()</code> and the CSS reads <code>--toon-exaggeration</code>.</p>
<label>Exaggeration <input id="ex" type="range" min="0" max="2.5" step="0.05" value="1"> <output id="out">1</output></label>
<canvas id="c" style="cursor:pointer" role="img" aria-label="Loop stands still. On a take, Loop squints, then shoots upward with huge eyes before settling back; the slider sets how exaggerated the take is."></canvas>
<p class="demo-try"><button type="button" class="demo-act" id="act">Do the take</button> Drag the slider, then press <i>Do the take</i> or click the canvas.</p>
<script src="../src/toon.js"></script>
<script src="demo-theme.js"></script>
<script src="cast-shapes.js"></script>
<script src="cast.js"></script>
<script src="demo-runtime.js"></script>
<script>
ToonDemos.register('10-exaggeration', (document, Toon, DemoTheme) => {
const T = DemoTheme; // design tokens, live (see demo-theme.js)
const { createStage, ticker, poses, ease, exaggerate, withSquash, groundShadow } = Toon;
const stage = createStage(document.getElementById('c'));
const { ctx } = stage;
const ex = document.getElementById('ex'), out = document.getElementById('out');
ex.oninput = () => { document.documentElement.style.setProperty('--toon-exaggeration', ex.value); out.textContent = ex.value; };
const REST = { sy: 1, eye: 1, y: 0, brow: 0 };
const take = [ // a classic cartoon "take"
{ at: 0, pose: REST },
{ at: 0.18, pose: { sy: 0.8, eye: 0.5, y: 0, brow: 4 } }, // anticipation squint
{ at: 0.3, pose: { sy: 1.35, eye: 1.8, y: 45, brow: -10 }, ease: ease.outBack }, // the take
{ at: 0.7, pose: { sy: 1.25, eye: 1.7, y: 35, brow: -9 } }, // moving hold
{ at: 1, pose: REST, ease: ease.outElastic },
];
let pose = REST, playing = false;
const act = () => {
if (playing) return; playing = true;
poses(take, { duration: 1600, onUpdate: p => (pose = p) }).then(() => (playing = false));
};
stage.canvas.addEventListener('click', act);
document.getElementById('act').addEventListener('click', act);
stage.loop(() => {
const k = +ex.value, H = 130, x = stage.width / 2, ground = stage.height - 40;
// [EXAGGERATION] amplify each pose's distance from rest
const sy = Math.max(0.3, exaggerate(pose.sy, k, 1)), eye = Math.max(0.15, exaggerate(pose.eye, k, 1));
const y = pose.y * k, brow = pose.brow * k;
stage.clear();
ctx.fillStyle = T.ground; ctx.fillRect(0, ground, stage.width, 40);
ctx.fillStyle = T.groundLine; ctx.fillRect(0, ground, stage.width, 2);
groundShadow(ctx, x, ground, 34, y, { maxHeight: 200 });
const mood = eye > 1.25 ? 'surprised' : eye < 0.8 ? 'focused' : 'neutral'; // squint → take → settle
withSquash(ctx, x, ground - H / 2 - 4 - y, { sx: 1 / sy, sy }, c =>
Cast.draw(c, 'loop', { x: 0, y: 0, h: H, fill: T.secondary, ink: T.ink, bg: T.surface, mood, noWink: true,
eyeScale: Math.max(0.6, Math.min(2.2, mood === 'surprised' ? eye / 1.25 : 1)) }), { x: 0, y: H / 2 + 4 });
});
});
</script>
</body>
</html>

Set --toon-exaggeration on a container to scale every squash, height, swing and wind-up inside it. This snippet runs as-is:

<link rel="stylesheet" href="toon.css">
<!-- --toon-exaggeration scales every preset inside. -->
<div id="dial" style="--toon-exaggeration:1;
--toon-height:70px; display:grid; gap:16px">
<div style="display:grid; justify-items:center;
padding-top:150px">
<div class="toon-bounce" style="width:48px;
height:48px; border-radius:50%;
background:var(--toon-color)"></div>
<div class="toon-shadow toon-bounce-shadow"
style="width:56px; height:12px"></div>
</div>
<button class="toon-press toon-anticipate"
type="button">Hover and press me</button>
</div>
<label>Exaggeration <input id="ex" type="range" min="0"
max="2" step="0.1" value="1" aria-valuetext="1 times">
<output id="out">×1</output></label>
<script>
// 0 is no deformation, 1 the default, 2 twice as far.
const ex = document.getElementById('ex');
ex.oninput = () => {
document.getElementById('dial').style
.setProperty('--toon-exaggeration', ex.value);
document.getElementById('out').textContent = `×${ex.value}`;
ex.setAttribute('aria-valuetext', `${ex.value} times`);
};
</script>

Drag the slider below, then hover over or press the button. At 0 nothing deforms; at 2 everything goes twice as far:

Now showing: CSS exaggerationOpen the CSS exaggeration demo on its own page (opens in a new tab)

Every preset multiplies its squash, height and swing by --toon-exaggeration, so one value tunes a whole product. For fixed levels, use the .toon-subtle (0.5) and .toon-exaggerate (1.8) modifiers instead.

This take (a cartoon double take of surprise) runs as-is. The key poses go through samplePoses(), then exaggerate() pushes each value away from its rest value by the slider’s amount.

  • Exaggerate the important beat, not every frame. In a take, the surprise pose gets the big push and everything else stays readable.
  • Stay consistent. Pick one exaggeration level per product or scene; mixing levels feels accidental.
  • Clamp the results. High factors can turn a scale negative or push a shape off the canvas. The snippet keeps the height scale at 0.3 or more.
  • Exaggerate in time, too. ease.overshoot() and ease.elastic() fly past the target before settling, which reads as extra energy without bigger poses.

The demo also shows anticipation: the squint before the take makes the jump land harder.

For every option, see the Canvas exaggerate function and the CSS custom properties.