← 返回
开发者工具 中文

Horse Sticker Maker

Create and deploy a festive Chinese New Year (Year of the Horse 2026) animated GIF sticker maker web app. Use when the user wants to generate custom horse-th...
创建并部署一款喜庆的2026年马年春节动态GIF贴纸制作网页应用,用于生成自定义马年主题贴纸
jiafar
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 1,171
下载
💾 7
安装
1
版本
#latest

概述

Horse Sticker Maker

Generate a web app that creates custom animated GIF stickers for Chinese New Year (Year of the Horse 2026).

What It Does

  • Users input custom blessing text (1-8 chars)
  • Client-side Canvas renders a 240px animated GIF with:
  • Red gradient background with gold sparkle particles
  • 6-frame gold horse galloping animation (transparent PNG)
  • User's custom text in gold calligraphy at top
  • "立马加薪" bottom text with color-cycling effect
  • Output is WeChat sticker compatible (≤500KB, 240px)

Quick Start

  1. Copy the template project:

```bash

cp -r /assets/horse-blessing-template ./horse-blessing

cd horse-blessing

npm install

```

  1. Run locally:

```bash

npm run dev

# Open http://localhost:3000/sticker

```

  1. Deploy to Vercel:

```bash

vercel --prod --yes

```

Project Structure

horse-blessing/
├── app/
│   ├── page.tsx          # Main page (AI-generated blessing with poem)
│   ├── sticker/page.tsx  # Sticker maker (Canvas GIF generator)
│   ├── api/generate/     # AI poem + image generation API
│   ├── api/sticker/      # Sticker API
│   └── layout.tsx        # Root layout (red theme)
├── public/
│   ├── horse-frame-[1-6].png  # 6-frame transparent gold horse
│   ├── horse-transparent.png  # Static horse fallback
│   └── gif.worker.js          # gif.js web worker
├── package.json
└── tailwind.config.ts

Key Technical Details

GIF Generation (Client-Side)

  • Uses gif.js loaded via CDN (Script from next/script)
  • 18 frames (6 horse frames × 3 cycles), 85ms delay per frame
  • Canvas size: 240×240px for WeChat sticker compatibility
  • Horse frames loaded as Image elements, drawn via drawImage

Horse Frame Assets

  • 6 transparent PNG frames in public/horse-frame-[1-6].png
  • Generated via AI image model, backgrounds removed with sharp
  • Removal technique: pixels with R>210, G>210, B>210 → alpha=0

Customization Points

  • Bottom text: Edit '立马加薪' in sticker/page.tsx
  • GIF size: Change const size = 240 (keep ≤240 for WeChat)
  • Frame count: Change const frames = 18
  • Horse images: Replace public/horse-frame-*.png
  • Background: Modify the radial gradient colors
  • Sparkle count: Adjust sparkle array size (default 30)

WeChat Sticker Compatibility

  • Max 500KB file size
  • Max 240px recommended dimension
  • GIF format required
  • Save → WeChat chat → emoji panel → "+" → select from gallery

Dependencies

{
  "next": "^14.0.0",
  "react": "^18.2.0",
  "react-dom": "^18.2.0",
  "sharp": "latest",
  "gif-encoder-2": "^1.0.5",
  "html2canvas-pro": "^1.6.7"
}

External CDN: gif.js@0.2.0 (loaded at runtime for client-side GIF encoding)

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 07:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 66 📥 179,872
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,739
ai-intelligence

Amazon Scraper

jiafar
高性能容器化 Amazon 爬虫(Docker + playwright-extra + Stealth 插件),可绕过 Amazon 头检检测,支持 Amazon BSR、搜索结果等。
★ 6 📥 3,145