Skip to content

Shenrui-Ma/video-regen-recipes / templates/drawing-process/svg-redraw-comparison

svg-redraw-comparison

Unverified

用参考图制作高精度 SVG 临摹绘制过程视频,交付纯 SVG 网页、独立 SVG 和原图对照 MP4。禁止 Canvas、位图嵌入与外链,按构图、线稿、固有色、阴影、高光、细节重放;横图上下、竖图左右合成。

FileKindSize
LICENSEother1.1 KB
LICENSES.mdmarkdown998 B
README.mdmarkdown2.5 KB
SKILL.mdskill md3.8 KB
assets/manifest.jsonconfig320 B
assets/reference.pngbinary2.7 MB
examples/demo.htmlother30.1 KB
examples/foundations.svgother597.0 KB
examples/preview.mp4binary3.2 MB
examples/redraw.svgother15.6 MB
examples/regions.jsonconfig6.7 KB
examples/validation.jsonconfig2.1 KB
profile.jsonconfig2.2 KB
prompts/author-original.prompt.txtmarkdown1.2 KB
prompts/redraw.prompt.txtmarkdown1.2 KB
references/validation.mdmarkdown1.2 KB
references/workflow.mdmarkdown5.0 KB
scripts/_contours.pyscript1.3 KB
scripts/_regions.pyscript1.2 KB
scripts/_validate_svg.pyscript1.5 KB
scripts/build_demo.pyscript5.9 KB
scripts/clean_png.pyscript2.1 KB
scripts/export_video.cjsscript6.1 KB
scripts/package_demo.pyscript3.4 KB
scripts/trace_reference.pyscript5.0 KB
sources.mdmarkdown1.7 KB
tests/check_player.cjsscript3.9 KB
tests/test_pipeline.pyscript4.2 KB
web/load-art.jsscript3.2 KB
web/player.cssother738 B
web/player.jsscript2.3 KB

web/player.js

View on GitHub
const total=40,drawEnd=36;
const clamp=n=>Math.max(0,Math.min(1,n));
const sketch=document.getElementById('construction');
const flats=[...document.querySelectorAll('.flat-step')],ink=[...document.querySelectorAll('.ink-step')],groups=[...document.querySelectorAll('.paint-step')];
const phases={shadow:[14,23],highlight:[23,28],detail:[28,36]};
for(const [phase,band] of Object.entries(phases)){
 const items=groups.filter(e=>e.dataset.stage===phase);items.forEach((e,i)=>{e.dataset.start=band[0]+(band[1]-band[0])*.90*i/items.length;e.dataset.span=.1*(band[1]-band[0]);});
}
let time=0,playing=false,origin=0;
function opacity(e,n){const value=String(n);if(e.style.opacity!==value)e.style.opacity=value;}
function renderAt(t){time=Math.max(0,Math.min(total,t));
 opacity(sketch,clamp(time/2)*(1-clamp((time-5)/3)));
 ink.forEach((e,i)=>opacity(e,clamp((time-(2+i*.48))/.75)*(1-clamp((time-33)/3))));
 flats.forEach((e,i)=>opacity(e,clamp((time-(8+i*.38))/.8)*(1-clamp((time-35)/1))));
 groups.forEach(e=>opacity(e,clamp((time-Number(e.dataset.start))/Number(e.dataset.span))));
 document.getElementById('slider').value=time;document.getElementById('stamp').textContent=time.toFixed(1)+' / '+total+' 秒';
 document.getElementById('phase').textContent=time<2?'构图定位':time<8?'线稿':time<14?'固有色':time<23?'阴影':time<28?'高光':'细节与完成';
 return {time,total,complete:time>=drawEnd};
}
function tick(now){if(!playing)return;renderAt((now-origin)/1000);if(time>=total){playing=false;document.getElementById('play').textContent='播放';return;}requestAnimationFrame(tick);}
document.getElementById('play').onclick=()=>{playing=!playing;if(playing){origin=performance.now()-(time>=total?0:time)*1000;requestAnimationFrame(tick);}document.getElementById('play').textContent=playing?'暂停':'播放';};
document.getElementById('reset').onclick=()=>{playing=false;document.getElementById('play').textContent='播放';renderAt(0);};
document.getElementById('final').onclick=()=>{playing=false;document.getElementById('play').textContent='播放';renderAt(total);};
document.getElementById('slider').oninput=e=>{playing=false;document.getElementById('play').textContent='播放';renderAt(Number(e.target.value));};
window.replay={renderAt,duration:total};renderAt(total);document.body.dataset.ready='true';
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall