# Recorte en rizo

Al acortar el final de un plano, los siguientes ocupan el hueco. Al alargarlo, se desplazan hacia delante y aumenta la duración total.

## Cómo probarlo

Con B seleccionado, pulsa −1 s dos veces. C pasa de empezar en el segundo 7 al 5 y el montaje baja de 10 a 8 segundos.

## Detalles de la interacción

A y B admiten de 1 a 6 segundos cada uno. El inicio de cada clip equivale a la suma de las duraciones anteriores y el total suma los tres clips.

## Controles por plataforma

- iOS · Elige A o B y arrastra su borde rojo. Pulsa −1 s o +1 s para ajustar la duración de segundo en segundo.
- Android · Elige A o B y arrastra su borde rojo. Pulsa −1 s o +1 s para ajustar la duración de segundo en segundo.
- PC · Elige A o B y arrastra su borde final, o enfócalo y usa las flechas izquierda y derecha. También puedes pulsar −1 s o +1 s.

## Dónde usarlo

Ajustar el montaje conservando los cortes consecutivos.

## Instrucciones de implementación

> Al recortar el final de un clip, desplaza los clips posteriores la misma cantidad. Conserva su duración y mantén los cortes sin huecos.

## Fuentes y créditos

[Adobe Premiere · Perform ripple edits](<https://helpx.adobe.com/premiere/desktop/edit-projects/trim-clips/perform-ripple-edits.html>)

## Ejemplo en HTML

Guarda el siguiente código en un archivo HTML y ábrelo en tu navegador. Puedes usar el ejemplo sin conexión.

```html
<!doctype html>
<html lang="es" 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>해안 필름 조각</title>
<style>
*{box-sizing:border-box}:root{color-scheme:light;font:15px/1.4 system-ui,sans-serif;color:#252e32;background:#f0ede5}body{margin:0;min-height:100svh;display:grid;align-content:center;padding:clamp(10px,2.5vw,24px)}main{width:100%;max-width:700px;margin:auto;min-width:0}header,.top,.controls,.selection,.report{display:flex;align-items:center;gap:8px;flex-wrap:wrap}header,.top{justify-content:space-between}h1{font-size:clamp(23px,4vw,34px);line-height:1.1;letter-spacing:-.055em;margin:0 0 9px}header small,.top{font-weight:680;font-size:11px;letter-spacing:.07em}.monitor{background:#26343b;padding:9px 12px 12px;border-radius:9px;color:#fff5d9}.screen{display:block;width:100%;height:clamp(82px,20vh,136px);margin-top:6px;border-radius:3px;background:#f3bc7f}.screen .shotB,.screen .shotA{display:none}.screen[data-shot="0"] .shotA,.screen[data-shot="1"] .shotB{display:inline}
.editor{padding:9px 0 0}.ruler,.track{position:relative;width:100%}.ruler{height:17px;color:#675d50;font:11px ui-monospace,monospace}.ruler span{position:absolute;transform:translateX(-50%)}.ruler span:first-child{transform:none}.ruler span:last-child{transform:translateX(-100%)}.track{height:53px;touch-action:pan-y;background:repeating-linear-gradient(90deg,#c6c5b9 0 1px,transparent 1px 6.25%),#dbdbd0;border:1px solid #b5b5a7;border-radius:5px}.clip{position:absolute;top:4px;bottom:4px;display:grid;align-content:center;padding-left:5px;overflow:hidden;border-radius:4px;border:1px solid #ffffff55;font:bold 14px ui-monospace,monospace;cursor:pointer;transition:left 230ms ease,width 230ms ease}.clip i{position:absolute;inset:auto 4px 3px;height:3px;background:repeating-linear-gradient(90deg,#ffffff9c 0 3px,transparent 3px 9px)}.clip[data-k="0"]{color:#132e38;background:#81b3b2}.clip[data-k="1"]{color:#492d1c;background:#dfab74}.clip[data-k="2"]{color:#27283d;background:#aaacd0;cursor:default}.clip[aria-pressed="true"]{box-shadow:inset 0 0 0 2px #2b3d37}#edge{position:absolute;top:0;bottom:0;width:16px;transform:translateX(-50%);background:transparent;border:0;cursor:ew-resize;padding:0;touch-action:none;transition:left 230ms ease}#edge::before{content:"";position:absolute;inset:0 6px;background:#8a3b27;border-radius:2px}#edge::after{content:"";position:absolute;width:12px;height:8px;left:2px;top:-3px;background:#8a3b27;clip-path:polygon(0 0,100% 0,100% 45%,50% 100%,0 45%)}.track.dragging *{transition:none!important}.report{gap:10px;margin-top:5px;font:600 12px/1.32 ui-monospace,monospace;color:#505b58}.controls{margin-top:10px;justify-content:space-between}.selection,.trim{display:flex;flex-wrap:wrap;align-items:center;gap:6px}button.control{font:600 13px system-ui,sans-serif;color:#293a37;background:#f9f5eb;border:1px solid #a69b86;border-radius:5px;min-height:38px;padding:7px 10px;cursor:pointer}button.control[aria-pressed=true]{background:#304945;color:white;border-color:#304945}button:disabled{opacity:.42;cursor:default}button:focus-visible{outline:3px solid #e17743;outline-offset:2px}p{margin:7px 0 0;color:#4e514a;font-size:13px}.motion-reduced .clip,.motion-reduced #edge{transition:none}@media(prefers-reduced-motion:reduce){.clip,#edge{transition:none}}@media(max-width:400px){.controls{gap:6px}.selection,.trim{gap:4px}button.control{padding:6px 8px}.top{font-size:10px}.track{height:47px}}
</style></head><body><main><header><h1 data-t="title"></h1><small data-t="label"></small></header>
<section class="monitor"><div class="top"><span id="sceneTitle"></span><span id="total" aria-live="polite"></span></div>
<svg class="screen" data-shot="1" viewBox="0 0 620 130" preserveAspectRatio="xMidYMid slice" role="img" id="screen">
 <g class="shotA"><path fill="#eebf9a" d="M0 0h620v130H0z"/><circle fill="#fff0b9" cx="395" cy="32" r="21"/><path fill="#548b94" d="M0 66q65-15 124 0t124 0t124 0t124 0t124 0v64H0z"/><path fill="#336879" d="M0 85q40-19 79-1t79 0t79 0t79 0t79 0t79 0t79 0t79 0v46H0z"/><path fill="none" stroke="#b7e0d3" stroke-width="3" d="M22 92q31-10 66 0m42 11q36-10 70 0m85-16q26-9 57 1m108 17q37-12 89-1"/></g>
 <g class="shotB"><path fill="#f4be89" d="M0 0h620v130H0z"/><circle cx="380" cy="35" r="22" fill="#fce9ae"/><path fill="#8ca7a0" d="m0 79 78-26 66 17 53-18 90 23 115-16 98 15 120-32v88H0z"/><path fill="#58858a" d="M0 87q75-12 160 1t170 0t170 0t120-4v46H0z"/><path fill="#374f50" d="m172 120 37-25 33-11 32 3 21 9 47 12 20 22H151z"/><path fill="#f2e2c0" d="m236 86 6-40h13l6 40z"/><path fill="#b76541" d="m240 62 1-7h15l1 7z"/><path fill="#314650" d="M240 40h17v8h-17zm-4 1 12-9 13 9zm9 44v-9h5v9z"/><path fill="none" stroke="#b7cec2" stroke-width="2" d="m38 104 58-1m317 1 50-1m55-10 56-2"/></g>
</svg></section><section class="editor"><div class="ruler" aria-hidden="true"><span>0s</span><span style="left:25%">4</span><span style="left:50%">8</span><span style="left:75%">12</span><span style="left:100%">16s</span></div>
<div class="track" id="track"><button type="button" class="clip" data-k="0">A<i></i></button><button type="button" class="clip" data-k="1">B<i></i></button><span class="clip" data-k="2">C<i></i></span><button type="button" id="edge"></button></div>
<div id="report" class="report" aria-live="polite"></div>
<div class="controls"><div class="selection"><button type="button" class="control" id="selectA" data-t="selectA"></button><button type="button" class="control" id="selectB" data-t="selectB"></button></div>
<div class="trim"><button type="button" class="control" id="shorten">−1 s</button><button type="button" class="control" id="extend">+1 s</button><button type="button" class="control" id="reset" data-t="reset"></button></div></div><p id="hint" data-t="hint"></p></section></main><script>
'use strict';
const copy={
ko:{title:'해안 필름 조각',label:'리플 트림',total:'전체',A:'밀려오는 파도',B:'섬의 등대',C:'항구의 갈매기',selectA:'A 편집',selectB:'B 편집',reset:'원래 길이',edge:'선택한 클립의 끝. 좌우 방향키로 1초씩 조절',shorten:'선택 클립 1초 줄이기',extend:'선택 클립 1초 늘리기',hint:'A나 B를 골라 끝 손잡이를 끌거나 −1 s를 누르세요. 뒤 클립이 함께 이동합니다.'},
en:{title:'Coastal film strips',label:'RIPPLE TRIM',total:'Total',A:'Incoming tide',B:'Island lighthouse',C:'Harbour gulls',selectA:'Edit A',selectB:'Edit B',reset:'Restore lengths',edge:'End of selected clip. Left and right arrows adjust one second',shorten:'Shorten selected clip by one second',extend:'Extend selected clip by one second',hint:'Select A or B and drag its end handle, or press −1 s. The following clips move with it.'},
es:{title:'Fotogramas de la costa',label:'RECORTE EN RIZO',total:'Total',A:'Marea creciente',B:'Faro de la isla',C:'Gaviotas del puerto',selectA:'Editar A',selectB:'Editar B',reset:'Restaurar',edge:'Final del clip seleccionado. Las flechas cambian un segundo',shorten:'Acortar el clip un segundo',extend:'Alargar el clip un segundo',hint:'Elige A o B y arrastra su borde final o pulsa −1 s. Los clips posteriores se desplazan.'},
'zh-Hans':{title:'海岸胶片剪辑',label:'波纹修剪',total:'总长',A:'涌来的海浪',B:'岛上灯塔',C:'港口海鸥',selectA:'编辑 A',selectB:'编辑 B',reset:'恢复时长',edge:'所选片段末端，左右方向键每次调整一秒',shorten:'将所选片段缩短一秒',extend:'将所选片段延长一秒',hint:'选择 A 或 B，拖动末端手柄或按 −1 s。后面的片段随之移动。'}
};
const params=new URLSearchParams(location.search),suggested=params.get('lang')||document.documentElement.lang;
const language=Object.hasOwn(copy,suggested)?suggested:'ko',t=copy[language];document.documentElement.lang=language;document.title=t.title;
if(params.get('reduce')==='1')document.documentElement.classList.add('motion-reduced');
document.querySelectorAll('[data-t]').forEach(x=>x.textContent=t[x.dataset.t]);
const track=document.getElementById('track'),clips=Array.from(document.querySelectorAll('.clip')),edge=document.getElementById('edge'),screen=document.getElementById('screen');
const shorten=document.getElementById('shorten'),extend=document.getElementById('extend'),a=document.getElementById('selectA'),b=document.getElementById('selectB');
const names=['A','B','C'],span=16;let lengths=[3,4,3],active=1,drag=null;
function render(){
  let pos=0;const ranges=[];for(let i=0;i<3;i++){
    const clip=clips[i];clip.style.left=(100*pos/span)+'%';clip.style.width=(100*lengths[i]/span)+'%';clip.dataset.start=String(pos);clip.dataset.duration=String(lengths[i]);
    ranges.push(names[i]+' '+pos+'–'+(pos+lengths[i])+'s');if(i<2){clip.setAttribute('aria-pressed',String(active===i));clip.setAttribute('aria-label',t[i===0?'selectA':'selectB']+' · '+t[names[i]]);}
    pos+=lengths[i];
  }
  const start=active===0?0:lengths[0];edge.style.left=(100*(start+lengths[active])/span)+'%';edge.setAttribute('aria-label',t.edge);
  track.dataset.total=String(pos);track.dataset.active=String(active);screen.dataset.shot=String(active);screen.setAttribute('aria-label',t[names[active]]);
  document.getElementById('sceneTitle').textContent=names[active]+' / '+t[names[active]];
  document.getElementById('total').textContent=t.total+' · '+pos+' s';
  document.getElementById('report').replaceChildren(...ranges.map(s=>{const el=document.createElement('span');el.textContent=s;return el;}));
  a.setAttribute('aria-pressed',String(active===0));b.setAttribute('aria-pressed',String(active===1));
  shorten.disabled=lengths[active]===1;extend.disabled=lengths[active]===6;
}
function edit(value){lengths[active]=Math.max(1,Math.min(6,value));render();}
function select(i){active=i;render();}
a.onclick=()=>select(0);b.onclick=()=>select(1);clips[0].onclick=a.onclick;clips[1].onclick=b.onclick;
shorten.onclick=()=>edit(lengths[active]-1);extend.onclick=()=>edit(lengths[active]+1);shorten.setAttribute('aria-label',t.shorten);extend.setAttribute('aria-label',t.extend);
document.getElementById('reset').onclick=()=>{lengths=[3,4,3];active=1;render();};
edge.addEventListener('keydown',e=>{if(e.key==='ArrowLeft'||e.key==='ArrowRight'){e.preventDefault();edit(lengths[active]+(e.key==='ArrowLeft'?-1:1));}});
edge.addEventListener('pointerdown',e=>{if(e.button!==0)return;drag={x:e.clientX,length:lengths[active],id:e.pointerId,width:track.clientWidth};edge.setPointerCapture(e.pointerId);track.classList.add('dragging');});
edge.addEventListener('pointermove',e=>{if(drag&&drag.id===e.pointerId)edit(drag.length+Math.round((e.clientX-drag.x)/drag.width*span));});
edge.addEventListener('lostpointercapture',()=>{drag=null;track.classList.remove('dragging');});
render();
</script></body></html>
```
