# Animating on twos

Two cameras share six cut-paper drawings. Over 12 frames the left gull completes two wingbeats. The right gull holds each drawing twice and completes one.

## Try it

Press Next frame twice. The first three drawings read A, B, C on the left and A, A, B on the right.

## Interaction details

One reel lasts 12 frames with 150 ms between exposures. The last frame wraps to the first. With reduced motion, Previous and Next frame advance one exposure at a time.

## Platform controls

- iOS · Tap Next frame repeatedly and compare the highlighted drawing letters on both rows of the sheet.
- Android · Tap Next frame repeatedly and compare the highlighted drawing letters on both rows of the sheet.
- PC · Tab to Previous or Next frame and press Enter or Space to compare the two rows at the same frame.

## Where to use it

Plan an exposure sheet for cutout or hand-drawn animation and choose how long to hold each drawing.

## Implementation prompt

> Build a 12-frame exposure sheet with two rows using the same six paper gull drawings in order. Change the first drawing every frame and the second every other frame. Mark the current frame and drawing in both rows.

## Sources and credits

[Krita · Animation Timeline](<https://docs.krita.org/en/reference_manual/dockers/animation_timeline.html>)

## Standalone HTML

Save the code below as an HTML file and open it in your browser. The example works offline.

```html
<!doctype html>
<html lang="en" data-motion-locales="inline"><head><script>if(new URLSearchParams(location.search).get('reduce')==='1')document.documentElement.classList.add('motion-reduced');</script><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>종이 갈매기 촬영대 · MotionLab</title>
<style>
*{box-sizing:border-box}:root{color-scheme:light;font:15px/1.4 system-ui,sans-serif;color:#3b3532;background:#f4e9db}body{margin:0;min-height:100svh;display:grid;align-content:center;padding:clamp(10px,2.6vw,24px)}main{width:min(100%,685px);margin:auto}header{display:flex;align-items:end;justify-content:space-between;gap:4px 12px;flex-wrap:wrap;margin-bottom:9px}h1{font:700 clamp(21px,4vw,31px)/1.15 Georgia,serif;letter-spacing:-.025em;margin:0}header small{color:#645950;font-weight:650}
.rig{border:1px solid #514c48;border-radius:6px;overflow:hidden;background:#303631;color:#fff5d9}.windows{display:grid;grid-template-columns:1fr 1fr;gap:2px;background:#343c37}.viewport{min-width:0;background:#344742}.viewport:nth-child(2){background:#4d4033}.cam{padding:6px 9px;font:650 12px/1.25 system-ui,sans-serif;display:flex;align-items:center;justify-content:space-between;gap:4px}.cam output{font:700 13px Georgia,serif}.viewport svg{width:100%;height:auto;display:block}.sheet{padding:7px 10px 10px}.strip{display:grid;grid-template-columns:28px repeat(12,minmax(0,1fr));gap:2px;align-items:center;margin-top:3px}.strip b{font:650 11px/1 system-ui,sans-serif}.cell{text-align:center;background:#52584c;color:#f9f3da;border:1px solid #767b6b;border-radius:2px;font:650 12px/1.36 ui-monospace,monospace}.cell.hold{background:#474d42;border-style:dashed}.cell.current{background:#ffe4ac;color:#473725;border-color:#ffe9b6}
.tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:9px}button{font:650 13px/1.2 system-ui,sans-serif;cursor:pointer;color:#3e3d32;background:#fff8e9;border:1px solid #aa9f8c;border-radius:5px;min-height:38px;padding:6px 11px}button:focus-visible{outline:3px solid #2b6258;outline-offset:2px}#play{background:#344d46;color:#fff6db;border-color:#344d46}.meter{margin-left:auto;font:650 12px system-ui,sans-serif;color:#5d5344;font-variant-numeric:tabular-nums}.hint{font-size:13px;color:#5e5245;margin:7px 0 0}.defs{position:absolute;overflow:hidden;width:0;height:0}
@media(min-width:600px) and (max-height:560px){body{padding:8px 16px}main{width:min(100%,650px)}}@media(max-width:420px){.cam{padding:5px;font-size:10px}.strip{gap:1px;grid-template-columns:21px repeat(12,minmax(0,1fr))}.sheet{padding:4px 5px 7px}.cell{font-size:10px}.tools{gap:5px}button{padding:5px 9px}}
</style></head><body><main><header><h1 data-t="title"></h1><small data-t="tech"></small></header>
<svg class="defs" aria-hidden="true" focusable="false"><defs id="art"><pattern id="fiber" width="11" height="13" patternUnits="userSpaceOnUse"><path d="m1 2 3 1m3 6 2-1" fill="none" stroke="#fff5d0" stroke-width=".55" opacity=".3"/></pattern>
<g id="sea"><path d="M0 111q24-5 53 1t52 1q40-8 73-3t62-3v22H0Z" fill="#617a73"/><path d="M0 116q35-6 64 1t61 0q27-6 58-3t57-6v21H0Z" fill="#405d57"/><path d="m9 120 17-1m74 3 24-2m46-3 13-1" fill="none" stroke="#c5c4a3" opacity=".8"/><rect width="240" height="129" fill="url(#fiber)"/></g></defs></svg>
<div id="rig" class="rig" role="group" aria-describedby="hint"><div class="windows">
<div class="viewport"><div class="cam"><span data-t="ones"></span><output id="poseOne"></output></div><svg viewBox="0 0 240 129" aria-hidden="true"><rect width="240" height="129" fill="#9bbab3"/><circle cx="35" cy="29" r="13" fill="#efdeab"/><use href="#sea"/><use id="one"/></svg></div>
<div class="viewport"><div class="cam"><span data-t="twos"></span><output id="poseTwo"></output></div><svg viewBox="0 0 240 129" aria-hidden="true"><rect width="240" height="129" fill="#d5b797"/><circle cx="35" cy="29" r="13" fill="#f8e4b3"/><use href="#sea"/><use id="two"/></svg></div></div>
<div class="sheet"><div class="strip" id="stripOne"><b>×1</b></div><div class="strip" id="stripTwo"><b>×2</b></div></div></div>
<div class="tools"><button id="prev" data-t="prev"></button><button id="next" data-t="next"></button><button id="play" data-t="play"></button><span class="meter"><span data-t="frame"></span> <output id="frame"></output> / 12</span></div>
<p id="hint" class="hint" data-t="hint"></p></main><script>
const copy={
 ko:{title:'종이 갈매기 촬영대',tech:'스톱모션 노출표',ones:'한 프레임씩',twos:'두 프레임씩',prev:'이전 칸',next:'다음 칸',play:'한 바퀴 재생',pause:'멈춤',frame:'프레임',hint:'다음 칸을 눌러 보세요. 왼쪽은 매 프레임 다음 그림으로 넘어가고, 오른쪽은 한 그림을 두 칸씩 유지합니다.'},
 en:{title:'The paper gull reel',tech:'Stop-motion exposure sheet',ones:'On ones',twos:'On twos',prev:'Previous',next:'Next frame',play:'Play one reel',pause:'Pause',frame:'Frame',hint:'Step through the reel. The left bird changes drawing every frame. The right bird holds each drawing for two frames.'},
 es:{title:'El vuelo de papel',tech:'Hoja de exposición',ones:'A unos',twos:'A doses',prev:'Anterior',next:'Siguiente',play:'Reproducir una vuelta',pause:'Pausar',frame:'Fotograma',hint:'Avanza por la tira. A la izquierda cambia el dibujo en cada fotograma. A la derecha se mantiene durante dos fotogramas.'},
 'zh-Hans':{title:'纸海鸥摄影台',tech:'定格动画摄影表',ones:'一拍一',twos:'一拍二',prev:'上一格',next:'下一格',play:'播放一圈',pause:'暂停',frame:'画格',hint:'逐格前进。左边每格换一张画，右边每张画连续保留两格。'}
};
const params=new URLSearchParams(location.search),requested=params.get('lang')||document.documentElement.lang;
const lang=Object.hasOwn(copy,requested)?requested:'ko',t=copy[lang];document.documentElement.lang=lang;document.title=t.title+' · MotionLab';for(const el of document.querySelectorAll('[data-t]'))el.textContent=t[el.dataset.t];
const get=id=>document.getElementById(id),ns='http://www.w3.org/2000/svg';
function add(parent,name,attrs){const n=document.createElementNS(ns,name);for(const [k,v] of Object.entries(attrs))n.setAttribute(k,v);parent.append(n);return n;}
// Six cut-paper silhouettes. Both cameras draw from these same six physical drawings.
const poses=[
 [[96,66],[75,49],[67,14],[88,32],[111,57]],
 [[96,65],[64,55],[43,29],[73,40],[112,57]],
 [[96,65],[61,67],[29,61],[62,55],[113,58]],
 [[96,66],[57,81],[34,96],[75,80],[114,60]],
 [[96,67],[73,91],[64,109],[90,86],[114,61]],
 [[96,66],[77,73],[60,77],[81,66],[113,58]]
];
poses.forEach((wing,i)=>{
 const g=add(get('art'),'g',{id:'pose'+i});
 const offset=[1,0,-2,-3,-1,1][i];g.setAttribute('transform','translate(9 '+offset+')');
 const rear=wing.map(([x,y])=>[x+11,y*.82+10]);
 add(g,'polygon',{points:rear.join(' '),fill:'#8c9180',stroke:'#616957','stroke-width':.8});
 add(g,'path',{d:'M63 66 45 72 72 75 83 79Q100 83 123 74l17-9q6-2 11-1l-6-4q-8-10-17-4l-13 8q-13 1-24-1Z',fill:'#fff3d0',stroke:'#5d5c4e','stroke-width':1.15});
 add(g,'polygon',{points:wing.join(' '),fill:'#f8e8bd',stroke:'#625d50','stroke-width':1.1,'stroke-linejoin':'round'});
 add(g,'polygon',{points:[wing[1],wing[2],wing[3],[wing[1][0]+10,wing[1][1]+1]].join(' '),fill:'#62685c'});
 add(g,'path',{d:'m144 60 13 4-11 1Z',fill:'#b77a41',stroke:'#765536','stroke-width':.7});add(g,'circle',{cx:139,cy:59,r:1.45,fill:'#303b33'});
});
const names='ABCDEF',ones=[],twos=[];
function cells(parent,nodes,hold){for(let i=0;i<12;i++){const e=document.createElement('span');e.className='cell'+(hold&&i%2?' hold':'');e.textContent=names[(hold?Math.floor(i/2):i)%6];parent.append(e);nodes.push(e);}}
cells(get('stripOne'),ones,false);cells(get('stripTwo'),twos,true);
let frame=0,token=0,playing=false;
const media=matchMedia('(prefers-reduced-motion: reduce)'),reduced=()=>params.get('reduce')==='1'||document.documentElement.classList.contains('motion-reduced')||media.matches;
function draw(n){
 frame=(n+12)%12;const a=frame%6,b=Math.floor(frame/2);get('one').setAttribute('href','#pose'+a);get('two').setAttribute('href','#pose'+b);
 get('poseOne').textContent=names[a];get('poseTwo').textContent=names[b];get('frame').textContent=String(frame+1).padStart(2,'0');
 for(const row of [ones,twos])row.forEach((cell,i)=>cell.classList.toggle('current',frame===i));
 get('rig').dataset.frame=frame+1;get('rig').dataset.poses=names[a]+names[b];
}
function stop(){clearTimeout(token);playing=false;get('play').textContent=t.play;get('rig').dataset.playing='false';}
function sync(){if(reduced())stop();get('play').hidden=reduced();}
function step(amount){stop();draw(frame+amount);}
get('prev').onclick=()=>step(-1);get('next').onclick=()=>step(1);
get('play').onclick=()=>{if(playing||reduced()){stop();return;}playing=true;get('play').textContent=t.pause;get('rig').dataset.playing='true';let left=12;
 function advance(){if(reduced()||!playing){stop();return;}draw(frame+1);if(--left)token=setTimeout(advance,150);else stop();}
 token=setTimeout(advance,150);};
media.addEventListener('change',sync);new MutationObserver(sync).observe(document.documentElement,{attributes:true,attributeFilter:['class']});
window.addEventListener('pagehide',stop);document.addEventListener('visibilitychange',()=>{if(document.hidden)stop();});
stop();sync();draw(0);
</script></body></html>
```
