Skip to content

艺术动画skill:35种艺术风格、9种解说语法,用代码让画动起来。

14.6 KB
Raw Blame
// 全风格样片:skill 里 35 种风格(15 原段+迁移测试 A–D 的 20 段)各一段,按年代排,用作回归测试与风格目录。
//   打开:index.html?film=gallery    渲染:render.py --film gallery    验收:qa.py --project scripts/engine --film gallery
// 每段 5 个八分音符(128 BPM ≈ 1.17s),最后一段 6 个。相邻段用「进入段」的签名转场(原 16 段沿用原片转场,A–D 组用各自配方卡里的转场;
// 每组第一段原来在片头没有进入转场,样片补了 inkBloom / redWedge / comicPanels / chiaroscuro)。
// 角标:年份严格单调,所以全片一个年份计数器连续滚动;各段沿用自己风格的字体与版式,label 写风格名。转场中点硬切新旧角标(引擎默认)。
// name 字段只给总览图/文档用(「年份+风格名」),引擎不读。
const R = 1866;
const box = (x0, y0, x1, y1, fill, stroke, lw = 4, inset = 0) => c => {
  c.save(); c.fillStyle = fill; c.fillRect(x0, y0, x1 - x0, y1 - y0);
  if (stroke) { c.strokeStyle = stroke; c.lineWidth = lw; c.strokeRect(x0 + inset, y0 + inset, x1 - x0 - 2 * inset, y1 - y0 - 2 * inset); }
  c.restore();
};
window.ERAS = [
 { id: '01_cave', name: '洞穴壁画', eighths: 5,
   counter: { year: -40000, roll: 0, x: R, y: 114, size: 84, font: 'GochiHand-400', color: '#f3ead8', spacing: 14,
     suffix: { text: 'BC', size: 44, gap: 18, dy: 0 }, label: { text: 'Cave painting', font: '38px "Kalam-700"', color: '#efe4cf', y: 178 } } },
 { id: '02_egypt', name: '古埃及壁画', eighths: 5, transition: { type: 'tiles', dur: 0.42 },
   counter: { year: -1350, roll: 0.4, x: R, y: 129, size: 100, font: 'IMFellEnglish-400', color: '#6b2318', spacing: 6,
     suffix: { text: 'BC', size: 50, gap: 14 }, label: { text: 'Egyptian wall painting', font: '34px "EBGaramond-400"', color: '#4a3424', y: 186 } } },
 { id: '03_greek', name: '古希腊黑绘陶', eighths: 5, transition: { type: 'cube', dur: 0.32 },
   counter: { year: -530, roll: 0.4, x: 1855, y: 136, size: 98, font: 'Cinzel-700', color: '#e3a066',
     box: box(1544, 42, 1888, 208, '#1b1310', '#c8743c', 3, 4),
     suffix: { text: 'BC', size: 48, gap: 14 }, label: { text: 'ATTIC BLACK-FIGURE', font: '29px "Cinzel-700"', color: '#e8b27c', x: 1855, y: 184, spacing: 2 } } },
 { id: '04_roman', name: '罗马马赛克', eighths: 5, transition: { type: 'mosaic', dur: 0.38 },
   counter: { year: 79, roll: 0.4, x: 1852, y: 132, size: 96, font: 'Cinzel-400', color: '#1d1a17',
     box: box(1607, 40, 1888, 208, '#f4ede0', '#2b2724', 4, 0),
     suffix: { text: 'AD', size: 46, gap: 18 }, label: { text: 'ROMAN MOSAIC', font: '26px "Cinzel-400"', color: '#2b2724', x: 1860, y: 182, spacing: 2 } } },
 { id: '20_dunhuang', name: '敦煌壁画', eighths: 5, transition: { type: 'apsara', dur: 0.5 },
   counter: { year: 720, roll: 0.4, x: 1852, y: 132, size: 92, font: 'LXGWWenKai-500', color: '#2a1a14', box: box(1500, 44, 1880, 204, '#e6d6b2', '#5a2414', 4, 6), suffix: { text: 'AD', size: 40, gap: 14, font: 'Cinzel-700' }, label: { text: '敦煌壁画 · 盛唐', font: '34px "LXGWWenKai-500"', color: '#8a2a1c', x: 1852, y: 184, spacing: 4 } } },
 { id: '34_shadowpuppet', name: '皮影戏', eighths: 5, transition: { type: 'lampGlow', dur: 0.4, cx: 960, cy: 470 },
   counter: { year: 1050, roll: 0.4, x: R, y: 132, size: 96, font: 'LXGWWenKai-500', color: '#7a1d12', spacing: 4, suffix: { text: 'AD', size: 40, gap: 14, font: 'Cinzel-700' }, label: { text: '皮影戏 · 北宋', font: '36px "LXGWWenKai-500"', color: '#5a2a14', y: 184, spacing: 4 } } },
 { id: '05_gothic', name: '哥特手抄本', eighths: 5, transition: { type: 'pageTurn', dur: 0.32 },
   counter: { year: 1290, roll: 0.4, x: R, y: 134, size: 100, font: 'LibreBaskerville-700', color: '#b3222b',
     label: { text: 'Gothic illumination', font: '36px "IMFellEnglish-400"', color: '#2b211a', y: 184 } } },
 { id: '06_renaissance', name: '文艺复兴', eighths: 5, transition: { type: 'godRays', dur: 0.4, cx: 560, cy: 290 },
   counter: { year: 1503, roll: 0.4, x: R, y: 142, size: 104, font: 'CormorantGaramond-500', color: '#ece0bf', spacing: 22,
     label: { text: 'HIGH RENAISSANCE', font: '30px "Cinzel-700"', color: '#e7d9b4', y: 184, spacing: 2 } } },
 { id: '32_rembrandt', name: '伦勃朗明暗法', eighths: 5, transition: { type: 'chiaroscuro', dur: 0.45, cx: 580, cy: 300 },
   counter: { year: 1642, roll: 0.4, x: R, y: 134, size: 104, font: 'CormorantGaramond-500', color: '#e9c98a', spacing: 10, label: { text: 'Rembrandt · chiaroscuro', font: '34px "IMFellEnglish-400i"', color: '#c9a467', y: 184 } } },
 { id: '17_ink', name: '水墨写意', eighths: 5, transition: { type: 'inkBloom', dur: 0.45, cx: 560, cy: 740 },
   counter: { year: 1690, roll: 0.4, x: R, y: 132, size: 100, font: 'LXGWWenKai-500', color: '#1a1612', spacing: 4, label: { text: '水墨写意 · 八大山人', font: '38px "LXGWWenKai-500"', color: '#3a2c22', y: 186, spacing: 4 } } },
 { id: '08_impressionism', name: '印象派', eighths: 5, transition: { type: 'dabs', dur: 0.28 },
   counter: { year: 1874, roll: 0.4, x: R, y: 139, size: 104, font: 'PlayfairDisplay-400i', color: '#5a4f9a',
     label: { text: 'Impressionism', font: '30px "EBGaramond-600"', color: '#6a5a9a', y: 182 } } },
 { id: '29_seurat', name: '修拉点彩', eighths: 5, transition: { type: 'pointill', dur: 0.34 },
   counter: { year: 1884, roll: 0.4, x: R, y: 134, size: 100, font: 'Marcellus-400', color: '#20306a', spacing: 6,
     label: { text: 'SEURAT · LA GRANDE JATTE', font: '27px "Marcellus-400"', color: '#7a3a2a', y: 182, spacing: 2 } } },
 { id: '09_postimp', name: '后印象派(梵高)', eighths: 5, transition: { type: 'swirl', dur: 0.28, cx: 560, cy: 340 },
   counter: { year: 1889, roll: 0.4, x: R, y: 134, size: 104, font: 'LilitaOne-400', color: '#f5d03b', shadow: { color: '#2a2a6a', x: 3, y: 4 },
     label: { text: 'Post-Impressionism', font: '34px "LilitaOne-400"', color: '#f5d03b', y: 182, shadow: { color: '#2a2a6a', x: 2, y: 3 } } } },
 { id: '19_munch', name: '蒙克表现主义', eighths: 5, transition: { type: 'screamWarp', dur: 0.5 },
   counter: { year: 1893, roll: 0.4, x: R, y: 134, size: 100, font: 'IMFellEnglish-400', color: '#f6c040', shadow: { color: 'rgba(40,10,20,.6)', x: 4, y: 4 }, label: { text: 'Munch · The Scream', font: '38px "IMFellEnglish-400i"', color: '#f8d88a', y: 184, shadow: { color: 'rgba(40,10,20,.6)', x: 2, y: 3 } } } },
 { id: '10_nouveau', name: '新艺术运动海报', eighths: 5, transition: { type: 'organic', dur: 0.24, cx: 1330, cy: 320 },
   counter: { year: 1896, roll: 0.4, x: R, y: 134, size: 96, font: 'LibreBaskerville-700', color: '#3a2a1c',
     label: { text: 'ART NOUVEAU POSTER', font: '29px "EBGaramond-600"', color: '#3a2a1c', y: 182, spacing: 3 } } },
 { id: '28_monet', name: '莫奈睡莲', eighths: 5, transition: { type: 'ripple', dur: 0.34, cx: 1000, cy: 600 },
   counter: { year: 1899, roll: 0.4, x: R, y: 136, size: 104, font: 'PlayfairDisplay-400i', color: '#3e5a86', spacing: 4, shadow: { color: 'rgba(252,248,238,1)', blur: 18, x: 0, y: 0 },
     label: { text: 'Monet · Nymphéas', font: '36px "PlayfairDisplay-400i"', color: '#4a5f8e', y: 186, shadow: { color: 'rgba(252,248,238,1)', blur: 14, x: 0, y: 0 } } } },
 { id: '36_picasso_blue', name: '毕加索蓝色时期', eighths: 5, transition: { type: 'blueBrush', dur: 0.42 },
   counter: { year: 1903, roll: 0.4, x: R, y: 136, size: 108, font: 'Caveat-600', color: '#c9d6e4', label: { text: 'Picasso · période bleue', font: '38px "Caveat-600"', color: '#9fb3cc', y: 188 } } },
 { id: '18_klimt', name: '克里姆特金色时期', eighths: 5, transition: { type: 'goldLeaf', dur: 0.5, cx: 1300, cy: 380 },
   counter: { year: 1907, roll: 0.4, x: R, y: 134, size: 100, font: 'Marcellus-400', color: '#f6dc8a', shadow: { color: 'rgba(40,24,6,.7)', x: 3, y: 4, blur: 6 }, label: { text: '克里姆特 · 金色时期', font: '36px "LXGWWenKai-500"', color: '#f3d27a', y: 186, shadow: { color: 'rgba(40,24,6,.7)', x: 2, y: 3, blur: 4 } } } },
 { id: '11_cubism', name: '立体主义', eighths: 5, transition: { type: 'shards', dur: 0.24 },
   counter: { year: 1912, roll: 0.4, x: R, y: 134, size: 98, font: 'AlfaSlabOne-400', color: '#1e1b18', spacing: 4,
     label: { text: 'CUBISM', font: '27px "AlfaSlabOne-400"', color: '#1e1b18', y: 182, spacing: 3 } } },
 { id: '12_bauhaus', name: '包豪斯', eighths: 5, transition: { type: 'bauhaus', dur: 0.2, cx: 1330, cy: 590 },
   counter: { year: 1923, roll: 0.4, x: R, y: 134, size: 104, font: 'ArchivoBlack-400', color: '#151515',
     label: { text: 'bauhaus', font: '36px "Poppins-800"', color: '#c4202b', y: 184 } } },
 { id: '22_constructivism', name: '构成主义海报', eighths: 5, transition: { type: 'redWedge', dur: 0.4 },
   counter: { year: 1924, roll: 0.4, x: R, y: 132, size: 104, font: 'Anton-400', color: '#151311',
     box: c => { c.save(); c.fillStyle = '#c8231c'; c.beginPath(); c.moveTo(1560, 46); c.lineTo(1892, 30); c.lineTo(1892, 152); c.lineTo(1560, 160); c.closePath(); c.fill(); c.restore(); },
     label: { text: 'CONSTRUCTIVISM', font: '30px "ArchivoBlack-400"', color: '#151311', y: 196, spacing: 4 } } },
 { id: '33_rubberhose', name: '橡皮管卡通', eighths: 5, transition: { type: 'irisFilm', dur: 0.4, cx: 1236, cy: 420 },
   counter: { year: 1930, roll: 0.4, x: 1858, y: 134, size: 100, font: 'Rye-400', color: '#141210', spacing: 4, box: c => { c.save(); c.fillStyle = '#efe7d2'; c.strokeStyle = '#141210'; c.lineWidth = 6; c.beginPath(); c.roundRect(1560, 44, 330, 166, 26); c.fill(); c.stroke(); c.restore(); }, label: { text: 'RUBBER HOSE', font: '34px "LilitaOne-400"', color: '#141210', x: 1858, y: 186, spacing: 2 } } },
 { id: '23_dali', name: '达利超现实', eighths: 5, transition: { type: 'melt', dur: 0.36 },
   counter: { year: 1931, roll: 0.4, x: R, y: 136, size: 104, font: 'PlayfairDisplay-700i', color: '#f6e8c8', shadow: { color: 'rgba(10,20,50,.55)', x: 5, y: 5, blur: 4 },
     label: { text: 'Surrealism', font: '34px "PlayfairDisplay-400i"', color: '#f0dcae', y: 184 } } },
 { id: '24_hopper', name: '霍珀美国现实主义', eighths: 5, transition: { type: 'sunShaft', dur: 0.34 },
   counter: { year: 1942, roll: 0.4, x: R, y: 134, size: 100, font: 'LibreBaskerville-700', color: '#f3e3b5', shadow: { color: 'rgba(20,30,25,.55)', x: 4, y: 4 },
     label: { text: 'AMERICAN REALISM', font: '27px "LibreBaskerville-400"', color: '#f0dca8', y: 182, spacing: 3 } } },
 { id: '30_matisse', name: '马蒂斯剪纸', eighths: 5, transition: { type: 'cutouts', dur: 0.36 },
   counter: { year: 1947, roll: 0.4, x: R, y: 136, size: 108, font: 'Caveat-600', color: '#111', spacing: 2,
     label: { text: 'Matisse · Jazz', font: '46px "Caveat-600"', color: '#c8242a', y: 188 } } },
 { id: '13_pop', name: '波普艺术', eighths: 5, transition: { type: 'zigzag', dur: 0.16 },
   counter: { year: 1962, roll: 0.4, x: 1852, y: 144, size: 104, font: 'Anton-400', color: '#111',
     box: c => { c.save(); c.fillStyle = '#111'; c.fillRect(1637, 40, 253, 170); c.fillStyle = '#f7e23a'; c.fillRect(1643, 46, 241, 158); c.restore(); },
     label: { text: 'POP ART', font: '30px "Anton-400"', color: '#111', x: 1852, y: 192, spacing: 1 } } },
 { id: '21_kusama', name: '草间弥生波点', eighths: 5, transition: { type: 'dotBloom', dur: 0.48, cx: 540, cy: 760 },
   counter: { year: 1965, roll: 0.4, x: R, y: 134, size: 104, font: 'Poppins-800', color: '#ffffff', shadow: { color: '#141414', x: 5, y: 5 }, label: { text: '草间弥生 · 无限波点', font: '36px "LXGWWenKai-500"', color: '#ffffff', y: 186, shadow: { color: '#141414', x: 3, y: 3 } } } },
 { id: '27_kirby', name: 'Kirby 漫画', eighths: 5, transition: { type: 'comicPanels', dur: 0.42 },
   counter: { year: 1966, roll: 0.4, x: 1858, y: 132, size: 100, font: 'Bangers-400', color: '#151313', spacing: 4,
     box: c => { c.save(); c.translate(6, 7); c.fillStyle = '#151313'; c.fillRect(1560, 38, 330, 176); c.restore();
       c.save(); c.fillStyle = '#ffe23a'; c.fillRect(1560, 38, 330, 176); c.strokeStyle = '#151313'; c.lineWidth = 6; c.strokeRect(1560, 38, 330, 176); c.restore(); },
     label: { text: 'JACK KIRBY · MARVEL', font: '34px "Bangers-400"', color: '#d8202a', x: 1858, y: 190, spacing: 2 } } },
 { id: '31_haring', name: '哈林涂鸦', eighths: 5, transition: { type: 'radiant', dur: 0.32, cx: 1000, cy: 600 },
   counter: { year: 1982, roll: 0.4, x: R, y: 136, size: 108, font: 'Kalam-700', color: '#111', spacing: 2,
     label: { text: 'KEITH HARING', font: '40px "Kalam-700"', color: '#111', y: 188, spacing: 2 } } },
 { id: '14_8bit', name: '8-bit 像素', eighths: 5, transition: { type: 'pixelate', dur: 0.12 },
   counter: { year: 1985, roll: 0.4, x: R + 4, y: 86, size: 60, font: 'PressStart2P-400', color: '#ffffff', shadow: { color: '#0b1d24', x: 4, y: 4 },
     label: { text: '8-BIT', font: '30px "PressStart2P-400"', color: '#ffffff', y: 138, shadow: { color: '#0b1d24', x: 3, y: 3 } } } },
 { id: '25_ghibli', name: '吉卜力水彩', eighths: 5, transition: { type: 'bleed', dur: 0.38, cx: 580, cy: 330 },
   counter: { year: 1988, roll: 0.4, x: R, y: 132, size: 104, font: 'Kalam-700', color: '#3f6a4a',
     label: { text: 'Ghibli-style watercolor', font: '34px "Caveat-600"', color: '#4d7a58', y: 182 } } },
 { id: '15_raytrace', name: '光追 CGI', eighths: 5, transition: { type: 'wireframe', dur: 0.14 },
   counter: { year: 1993, roll: 0.4, x: R, y: 129, size: 104, font: 'Exo2-800i', color: '#ffffff', shadow: { color: '#d23aa6', x: 5, y: 5 },
     label: { text: 'RAY-TRACED CGI', font: '30px "Exo2-800i"', gradient: ['#ffd84a', '#f08a2a'], y: 182, shadow: { color: '#7a2a7a', x: 2, y: 2 } } } },
 { id: '26_vaporwave', name: '蒸汽波', eighths: 5, transition: { type: 'vhs', dur: 0.3 },
   counter: { year: 2011, roll: 0.4, x: R, y: 130, size: 104, font: 'Exo2-800i', color: '#ffffff', shadow: { color: '#ff2fb4', x: 6, y: 5 },
     label: { text: 'VAPORWAVE', font: '32px "Righteous-400"', gradient: ['#7ff6ff', '#ff71ce'], y: 182, spacing: 7, shadow: { color: '#3a0a6a', x: 2, y: 2 } } } },
 { id: '35_shinkai', name: '新海诚光影', eighths: 5, transition: { type: 'flareSweep', dur: 0.38 },
   counter: { year: 2016, roll: 0.4, x: R, y: 134, size: 100, font: 'Poppins-600', color: '#ffffff', shadow: { color: 'rgba(40,90,150,.5)', x: 3, y: 4, blur: 4 }, label: { text: 'Makoto Shinkai light', font: '30px "Poppins-600"', color: '#eaf6ff', y: 182, shadow: { color: 'rgba(40,90,150,.5)', x: 2, y: 3 } } } },
 { id: '16_2026', name: '2026 扁平插画', eighths: 6, transition: { type: 'iris', dur: 0.183 },
   counter: { year: 2026, roll: 0.4, x: R, y: 132, size: 100, font: 'Poppins-800', color: '#232a5c',
     label: { text: 'Flat vector illustration', font: '30px "Poppins-600"', color: '#e2554e', y: 182 } } },
];