spite/ccapture.js

A library to capture canvas-based animations at a fixed framerate

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 49 minutes ago
Added to GitGenius on September 18th, 2026
Created on September 3rd, 2012
Open Issues & Pull Requests: 0 (+0)
GitHub issues: Enabled
Number of forks: 402
Total Stargazers: 3,766 (+0)
Total Subscribers: 68 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 36.8 hours
Mean response time: 680.0 days
90th percentile: 2810.2 days
Tracked items: 74

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 0
New in 7 days: 0
Closed in 7 days: 0
Avg open age: N/A days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (4)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

CCapture.js is a library to capture canvas-based animations at a fixed framerate.

The library solves the problem of recording smooth, deterministic video from animations that render at variable speeds. It works by replacing the browser's internal clock with a virtual clock that advances only when a frame is captured, decoupling animation timing from wall-clock time. This means an animation that takes two seconds to render a single frame will still produce a video at your specified framerate—30fps, 60fps, 240fps, or any rate you choose. The library is built from two composable pieces: TimeWarp, which controls time by hooking performance.now, requestAnimationFrame, setTimeout, setInterval, Date, and media currentTime; and FrameWrap, which handles canvas capture, applies motion blur, and feeds frames to pluggable encoders. CCapture combines both for a complete recording solution.

Developers should choose this tool when they need to export canvas animations as video files with guaranteed smooth playback regardless of render performance. It suits generative art, data visualizations, and any canvas-based animation where deterministic output matters more than real-time interaction. The library offers a minimal API—a single capture call inside an existing render loop—requiring no restructuring of animation code. It supports multiple output formats through pluggable encoders and includes built-in motion blur. The README distinguishes this as a ground-up rewrite of an earlier version, featuring ES modules, WebCodecs support, GPU motion blur, and async/await patterns.

The project shows active maintenance with regular commits addressing bug fixes and feature improvements. Development includes responsiveness to user-reported issues with timely resolution. The codebase maintains comprehensive documentation covering setup, API usage, and migration from earlier versions. TypeScript declarations are included for full type-checking support without requiring separate type packages.