candycore/candy-flip 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

candy-flip

CandyFlip

CI codecov Packagist Version License PHP

demo

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固