Skip to content

siegerts/skill-canvas-video / creating-canvas-video-animations

creating-canvas-video-animations

Verified

Creates animated video content using HTML5 Canvas and JavaScript. Generates self-contained HTML files with canvas-based animations that can be previewed in a browser and exported to MP4 using Puppeteer and FFmpeg. Use when the user wants to create animated videos, motion graphics, promotional clips, tutorial animations, or any visual content rendered frame-by-frame on canvas.

FileKindSize
ARCHITECTURE.mdmarkdown2.9 KB
ELEMENTS.mdmarkdown3.3 KB
EXPORT.mdmarkdown1.4 KB
HTML-TEMPLATE.mdmarkdown2.0 KB
PLATFORMS.mdmarkdown3.7 KB
SKILL.mdskill md5.0 KB
TIMELINE.mdmarkdown1.6 KB
scripts/export.jsscript3.5 KB

HTML-TEMPLATE.md

View on GitHub
# HTML Template

Use this template as-is. Adapt the font paths and animation class name per project.

```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Animation Title</title>
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            background: #000;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            overflow: hidden;
        }
        #canvas { display: block; }
    </style>
</head>
<body>
    <canvas id="canvas" width="1920" height="1080"></canvas>

    <script src="js/animation.js"></script>
    <script>
        // Load custom fonts before starting (if any)
        const fontBold = new FontFace('MyFont', 'url(fonts/Bold.otf)', { weight: '700' });
        const fontLight = new FontFace('MyFont', 'url(fonts/Light.otf)', { weight: '300' });
        Promise.all([fontBold.load(), fontLight.load()]).then(fonts => {
            fonts.forEach(f => document.fonts.add(f));
            const canvas = document.getElementById('canvas');
            const animation = new MyAnimation(canvas);
            animation.start();
            window.animation = animation; // Required for export script
            document.addEventListener('keydown', e => {
                if (e.key === 'r') animation.restart();
                if (e.key === ' ') { e.preventDefault(); animation.isPlaying ? animation.stop() : animation.start(); }
            });
        });
    </script>
</body>
</html>
```

## Key points

- Canvas dimensions set in HTML attributes (not CSS) — this is the actual pixel resolution
- MUST expose `window.animation` — the export script depends on it
- For vertical: change canvas to `width="1080" height="1920"`
- If no custom fonts, skip the FontFace loading and start immediately

## Keyboard shortcuts

- `Space` — play/pause
- `R` — restart
- `F` — toggle face cam zone overlay (if applicable)
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