Skip to content

A toolbox of film styles made in code for Claude Code: 66 ready to use, and your own. Each style is a style prompt plus a demo film made entirely in code by Claude Opus 5.5, with no video model. By Lemomo. · 一套用代码做片的风格工具箱:66 种现成风格,也能做出你自己的

1.1 KB
Raw Blame
// Page entry: read content.json (swap content with ?content=content_alt.json) → model → film
import { loadModel } from './engine/holo.js';
import { makeFilm } from './film.js';
const cv = document.getElementById('c'), g = cv.getContext('2d');
const Q = new URLSearchParams(location.search);
await Promise.all(['300', '400', '500', '600'].map(w => document.fonts.load(`${w} 40px Rajdhani`)).concat([document.fonts.load('20px ShareTechMono')]));
const get = async (u, d) => { try { const r = await fetch(u); return r.ok ? await r.json() : d; } catch { return d; } };
const C = await get(Q.get('content') || 'content.json');
const model = await loadModel(C.model);
const dur = await get(`${Q.get('voices') || 'voices'}/dur.json`, {});
const film = makeFilm(C, model, dur);
window.DUR = film.TL.DUR;
window.TL = film.TL;
window.EV = film.events();
window.SUBS = film.subs();
window.TIMELINE = film.timeline();
const scene = Q.get('scene');
if (scene) { const F = await import('./frames.js'); window.render = t => F[scene](g, t); }
else window.render = t => film.render(g, t, { nosub: Q.has('nosub') });
window.READY = true;