candycore/candy-flip
最新稳定版本:v0.2.0
Composer 安装命令:
composer create-project candycore/candy-flip
包简介
ASCII GIF viewer — port of namzug16/gifterm on the SugarCraft stack.
README 文档
README
CandyFlip
ASCII GIF viewer on the SugarCraft stack — port of namzug16/gifterm. Decodes a .gif on disk via ext-gd, downsamples each frame to a configurable cell grid, and renders the animation into the terminal as ANSI-coloured Unicode block-glyphs at a configurable framerate.
composer require sugarcraft/candy-flip candy-flip my-animation.gif # solid-block preset (default) candy-flip my-animation.gif density # ASCII luminance ramp
Keys
| Key | Action |
|---|---|
Space |
Pause / resume |
← |
Step back one frame |
→ |
Step forward one frame |
d |
Toggle solid ↔ density preset |
q / Esc |
Quit |
Architecture
| File | Role |
|---|---|
Decoder |
Reads the GIF, locates per-frame image-descriptor offsets, hands each frame to GD, downsamples to a cell grid, returns a list of {@see Frame}. |
Frame |
Pure value — 2-D RGB grid in cell coordinates. |
Renderer |
ANSI emitter. Two presets: solid (24-bit █ blocks) or density (luminance ramp). |
Player |
SugarCraft Model — index + paused + preset state. Cmd::tick(...) schedules frame advance. |
TickMsg |
Frame-tick message produced by the Cmd. |
The decoder caps at 256 frames so a runaway file can't OOM the runtime; pause + manual step are always available even on long animations.
Test
composer install vendor/bin/phpunit
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-07
