// AI 海报模板库 —— 设计尺寸 1080×1440(3:4 通用朋友圈/小红书/电商比例) // 模板 = 背景(纯色/线性渐变) + 图层列表(文字/图片/色块),加载后进入画布编辑: // 支持改文字(内容/字号/颜色/粗细/对齐)、换图片(上传/AI生成)、拖动移动、增删图层、导出 PNG。 export interface PosterTextShadow { color: string; blur: number; y: number } export interface PosterTextLayer { type: 'text'; text: string; x: number; y: number; w: number; size: number; color: string; weight?: number; align?: 'left' | 'center' | 'right'; lineHeight?: number; // 倍数,默认 1.25 italic?: boolean; shadow?: PosterTextShadow; rot?: number; // 旋转角度(度,绕图层中心,可为负) } export interface PosterImageLayer { type: 'image'; x: number; y: number; w: number; h: number; radius?: number; rot?: number; // 旋转角度(度) src?: string; // 当前图片(上传或 AI 生成后写入) prompt?: string; // AI 生成默认提示词 } export interface PosterShapeLayer { type: 'shape'; shape: 'rect' | 'ellipse'; x: number; y: number; w: number; h: number; fill: string; radius?: number; opacity?: number; rot?: number; // 旋转角度(度) } export type PosterLayer = PosterTextLayer | PosterImageLayer | PosterShapeLayer; export interface PosterBg { color?: string; angle?: number; stops?: { c: string; p: number }[]; } export interface PosterTemplate { id: string; name: string; category: string; w: number; h: number; bg: PosterBg; layers: PosterLayer[]; } export const POSTER_W = 1080; export const POSTER_H = 1440; export const POSTER_CATS = [ { id: 'hot', name: '热门' }, { id: 'promo', name: '促销' }, { id: 'festival', name: '节日' }, { id: 'event', name: '活动' }, { id: 'food', name: '美食' }, { id: 'edu', name: '教育' }, { id: 'school', name: '校园' }, { id: 'sport', name: '健身' }, { id: 'recruit', name: '招聘' }, { id: 'birthday', name: '生日' }, { id: 'redbook', name: '封面' }, ]; const tx = (text: string, x: number, y: number, w: number, size: number, color: string, o: Partial = {}): PosterTextLayer => ({ type: 'text', text, x, y, w, size, color, weight: 700, align: 'center', lineHeight: 1.25, ...o }); const im = (x: number, y: number, w: number, h: number, prompt = '', o: Partial = {}): PosterImageLayer => ({ type: 'image', x, y, w, h, radius: 24, prompt, ...o }); const sh = (shape: 'rect' | 'ellipse', x: number, y: number, w: number, h: number, fill: string, o: Partial = {}): PosterShapeLayer => ({ type: 'shape', shape, x, y, w, h, fill, ...o }); const solid = (color: string): PosterBg => ({ color }); const grad = (angle: number, c1: string, c2: string): PosterBg => ({ angle, stops: [{ c: c1, p: 0 }, { c: c2, p: 1 }] }); const mk = (id: string, name: string, category: string, bg: PosterBg, layers: PosterLayer[]): PosterTemplate => ({ id, name, category, w: POSTER_W, h: POSTER_H, bg, layers }); export const POSTER_TEMPLATES: PosterTemplate[] = [ // ---------------- 促销 ---------------- mk('shuang11', '双11狂购节', 'promo', grad(135, '#ff2d55', '#ff9500'), [ sh('ellipse', 640, 60, 420, 420, 'rgba(255,255,255,0.13)'), sh('ellipse', -60, 240, 300, 300, 'rgba(255,255,255,0.10)'), tx('双11狂购节', 50, 380, 980, 140, '#ffffff', { weight: 900 }), tx('全场5折起 · 满300减50', 50, 570, 980, 56, '#ffe082'), sh('rect', 340, 668, 400, 96, '#ffd60a', { radius: 48 }), tx('限时抢购 手慢无', 340, 686, 400, 44, '#c62828'), im(90, 830, 900, 430, '双11电商促销商品堆头,礼盒购物袋红色节日氛围,电商海报', { radius: 28 }), tx('活动时间:11月1日 - 11月11日', 50, 1300, 980, 40, '#ffffff', { weight: 400 }), ]), mk('d618', '618年中大促', 'promo', grad(120, '#0052ff', '#00c6ff'), [ tx('618年中大促', 50, 290, 980, 150, '#ffffff', { weight: 900 }), tx('跨店每满300减50', 50, 490, 980, 60, '#ffd60a', { weight: 900 }), im(140, 640, 800, 560, '618蓝色科技感电商商品展示,礼盒光效,促销banner', { radius: 32 }), sh('rect', 340, 1258, 400, 92, '#ffd60a', { radius: 46 }), tx('立即抢购', 340, 1274, 400, 44, '#0052ff'), ]), mk('qingcang', '清仓大甩卖', 'promo', solid('#ffd60a'), [ tx('清仓大甩卖', 50, 230, 980, 170, '#d32f2f', { weight: 900 }), tx('全场1折起', 50, 450, 980, 110, '#111111', { weight: 900 }), tx('数量有限 售完即止', 50, 610, 980, 48, '#333333'), im(120, 740, 840, 460, '工厂清仓甩卖商品堆头,衣服鞋帽纸箱,黄色促销海报', { radius: 24 }), sh('ellipse', 380, 1250, 320, 170, '#d32f2f'), tx('速抢', 380, 1298, 320, 56, '#ffffff', { weight: 900 }), ]), mk('kaixin', '新店开业', 'promo', grad(135, '#e53935', '#ff7043'), [ sh('ellipse', -100, -80, 420, 420, 'rgba(255,255,255,0.12)'), tx('新店开业', 50, 320, 980, 165, '#ffffff', { weight: 900 }), tx('全场8折 · 进店有礼', 50, 540, 980, 60, '#ffe082'), im(120, 700, 840, 480, '新店铺开业花篮与门头,喜庆红色氛围,开业典礼照片', { radius: 24 }), tx('地址:XX路88号 · 电话:138-0000-0000', 50, 1270, 980, 42, '#ffffff', { weight: 400 }), ]), // ---------------- 节日 ---------------- mk('chunjie', '新春快乐', 'festival', grad(135, '#c62828', '#ff8f00'), [ sh('ellipse', 390, 130, 300, 300, 'rgba(255,213,79,0.92)'), tx('2026', 390, 226, 300, 72, '#c62828', { weight: 900 }), tx('新春快乐', 50, 520, 980, 190, '#ffd54f', { weight: 900, shadow: { color: 'rgba(120,0,0,0.45)', blur: 24, y: 8 } }), tx('万事如意 · 阖家幸福 · 财源广进', 50, 770, 980, 52, '#ffffff', { weight: 700 }), im(140, 900, 800, 400, '中国春节红灯笼与梅花,喜庆新年氛围摄影', { radius: 24 }), tx('恭祝全市人民 新年大吉', 50, 1350, 980, 46, '#ffe0b2', { weight: 400 }), ]), mk('zhongqiu', '中秋团圆', 'festival', grad(160, '#1a237e', '#6a1b9a'), [ tx('中秋佳节', 50, 250, 980, 175, '#ffd54f', { weight: 900 }), tx('月圆人团圆', 50, 455, 980, 70, '#ffffff'), im(190, 620, 700, 700, '满月夜空,金色月亮特写,中秋节深蓝色氛围', { radius: 350 }), tx('但愿人长久 千里共婵娟', 50, 1372, 980, 44, '#c5cae9', { weight: 400 }), ]), mk('shengdan', '圣诞快乐', 'festival', solid('#2e7d32'), [ tx('圣诞快乐', 50, 230, 980, 175, '#ff5252', { weight: 900, shadow: { color: 'rgba(0,0,0,0.35)', blur: 18, y: 6 } }), tx('Merry Christmas', 50, 440, 980, 54, '#ffffff', { weight: 400, italic: true }), im(140, 570, 800, 550, '圣诞树彩灯装饰,温暖圣诞夜氛围', { radius: 24 }), sh('rect', 330, 1185, 420, 100, '#ff5252', { radius: 50 }), tx('圣诞好礼8折', 330, 1207, 420, 44, '#ffffff'), tx('12月24日 - 12月26日', 50, 1340, 980, 40, '#c8e6c9', { weight: 400 }), ]), mk('yuandan', '元旦快乐', 'festival', grad(135, '#0d47a1', '#00acc1'), [ tx('元旦快乐', 50, 300, 980, 165, '#ffffff', { weight: 900 }), tx('2026 新年新气象', 50, 510, 980, 64, '#b3e5fc'), im(120, 680, 840, 470, '跨年城市夜空烟花,蓝色新年氛围摄影', { radius: 24 }), tx('愿所有美好如期而至', 50, 1240, 980, 54, '#ffffff', { weight: 700 }), tx('Happy New Year', 50, 1345, 980, 40, '#b3e5fc', { weight: 400, italic: true }), ]), // ---------------- 活动 ---------------- mk('choujiang', '幸运大抽奖', 'event', grad(135, '#6a1b9a', '#e91e63'), [ sh('ellipse', 340, 110, 400, 400, 'rgba(255,255,255,0.15)'), tx('抽', 340, 205, 400, 200, '#ffd60a', { weight: 900 }), tx('幸运大抽奖', 50, 580, 980, 150, '#ffffff', { weight: 900 }), tx('100%中奖 · 最高赢免单', 50, 770, 980, 60, '#ffd60a'), im(140, 900, 800, 380, '抽奖转盘与紫色礼盒,霓虹活动海报背景', { radius: 24 }), sh('rect', 340, 1320, 400, 90, '#ffd60a', { radius: 45 }), tx('立即参与', 340, 1338, 400, 44, '#6a1b9a'), ]), mk('fenxiang', '行业分享会', 'event', solid('#263238'), [ sh('rect', 80, 110, 12, 130, '#00acc1'), tx('行业干货分享会', 130, 118, 870, 72, '#80deea', { align: 'left', weight: 700 }), tx('时间:11月20日 14:00\n地点:市图书馆 · 报告厅', 80, 320, 920, 44, '#b0bec5', { align: 'left', weight: 400, lineHeight: 1.6 }), im(80, 560, 920, 540, '讲师舞台演讲分享会现场,PPT大屏,专业会议照片', { radius: 16 }), sh('rect', 80, 1180, 920, 180, 'rgba(0,172,193,0.18)', { radius: 20 }), tx('限额50名 · 报名免费', 120, 1244, 840, 46, '#80deea', { align: 'left', weight: 700 }), ]), mk('huiyuan', '会员日', 'event', solid('#ff6f00'), [ tx('会员日', 50, 280, 980, 180, '#ffffff', { weight: 900 }), tx('每月8日 双倍积分', 50, 510, 980, 66, '#ffe0b2'), im(190, 660, 700, 560, '橙色暖调会员积分礼品展示,电商会员日配图', { radius: 28 }), tx('更有会员专属价等你来抢', 50, 1280, 980, 48, '#ffffff', { weight: 700 }), ]), // ---------------- 美食 ---------------- mk('huoguo', '招牌火锅', 'food', solid('#b71c1c'), [ tx('沸腾火锅', 50, 230, 980, 160, '#ffd54f', { weight: 900 }), tx('麻辣鲜香 · 越煮越有味', 50, 430, 980, 56, '#ffffff'), im(110, 580, 860, 560, '红油火锅翻滚特写,辣椒花椒热气腾腾,美食摄影', { radius: 24 }), tx('进店消费满100送50', 50, 1220, 980, 52, '#ffd54f', { weight: 900 }), tx('地址:美食街A12 · 11:00-次日02:00', 50, 1340, 980, 40, '#ffcdd2', { weight: 400 }), ]), mk('naicha', '新品奶茶', 'food', grad(135, '#fce4ec', '#f8bbd0'), [ tx('新品上市', 50, 270, 980, 150, '#ad1457', { weight: 900 }), tx('招牌奶茶 第二杯半价', 50, 470, 980, 64, '#880e4f'), im(160, 640, 760, 560, '粉色系珍珠奶茶饮品摄影,清新甜品海报', { radius: 28 }), sh('ellipse', 390, 1250, 300, 160, '#ad1457'), tx('尝鲜去', 390, 1292, 300, 46, '#ffffff', { weight: 900 }), ]), mk('shaokao', '深夜烧烤', 'food', solid('#171717'), [ tx('深夜烧烤', 50, 250, 980, 150, '#ff9100', { weight: 900 }), tx('串串香 · 啤酒畅饮', 50, 450, 980, 58, '#ffffff'), im(100, 600, 880, 540, '炭火烧烤羊肉串特写,火光油亮,夜市美食摄影', { radius: 20 }), tx('营业至凌晨2点 · 到店送烤串5串', 50, 1220, 980, 46, '#ffab40', { weight: 700 }), tx('XX路夜市3号摊', 50, 1330, 980, 38, '#9e9e9e', { weight: 400 }), ]), // ---------------- 教育 ---------------- mk('shuxi', '暑期班招生', 'edu', grad(135, '#00695c', '#26a69a'), [ tx('暑期班招生', 50, 280, 980, 150, '#ffffff', { weight: 900 }), tx('名额有限 · 报名立减500', 50, 480, 980, 60, '#b2dfdb'), im(130, 640, 820, 470, '学生在明亮教室上课,教育培训宣传照', { radius: 24 }), sh('rect', 290, 1200, 500, 100, '#ffd60a', { radius: 50 }), tx('免费试听一节课', 290, 1222, 500, 44, '#00695c'), tx('咨询电话:400-000-0000', 50, 1345, 980, 40, '#b2dfdb', { weight: 400 }), ]), mk('kaixue', '开学季特惠', 'edu', solid('#1565c0'), [ tx('开学季', 50, 260, 980, 170, '#ffd60a', { weight: 900 }), tx('学费立减500元', 50, 470, 980, 76, '#ffffff', { weight: 900 }), tx('再送开学大礼包', 50, 610, 980, 50, '#bbdefb'), im(150, 740, 780, 430, '书本文具开学用品摆拍,蓝色清爽背景', { radius: 24 }), sh('rect', 340, 1260, 400, 96, '#ffd60a', { radius: 48 }), tx('马上报名', 340, 1280, 400, 44, '#1565c0'), ]), mk('chongci', '考试冲刺营', 'edu', solid('#283593'), [ tx('考试冲刺营', 50, 250, 980, 140, '#ffd54f', { weight: 900 }), tx('30天高效提分计划', 50, 450, 980, 64, '#ffffff'), im(120, 610, 840, 470, '学生夜晚书桌台灯下复习,学习氛围照片', { radius: 24 }), tx('一对一辅导 · 名师划重点', 50, 1160, 980, 50, '#c5cae9'), sh('rect', 300, 1270, 480, 96, '#ffd54f', { radius: 48 }), tx('预约免费测评', 300, 1290, 480, 44, '#283593'), ]), // ---------------- 健身 ---------------- mk('jianshen', '健身年卡', 'sport', solid('#1b1b1b'), [ tx('年卡特惠', 50, 250, 980, 160, '#c6ff00', { weight: 900 }), tx('¥1999/年 限时开抢', 50, 460, 980, 72, '#ffffff', { weight: 900 }), im(100, 620, 880, 500, '健身房力量训练场景,深色调硬核健身摄影', { radius: 24 }), tx('私教体验课×3 免费送', 50, 1210, 980, 50, '#c6ff00', { weight: 700 }), tx('24小时营业 · 全城连锁', 50, 1330, 980, 38, '#9e9e9e', { weight: 400 }), ]), mk('yujia', '瑜伽体验课', 'sport', grad(160, '#80cbc4', '#e0f2f1'), [ tx('瑜伽体验课', 50, 280, 980, 140, '#00695c', { weight: 900 }), tx('新客免费 · 零基础友好', 50, 470, 980, 58, '#004d40'), im(140, 640, 800, 520, '瑜伽垫上的女性拉伸,明亮工作室清新氛围', { radius: 28 }), tx('每周六上午 10:00', 50, 1240, 980, 48, '#00695c', { weight: 700 }), tx('扫码预约 限前50名', 50, 1335, 980, 42, '#00897b', { weight: 400 }), ]), // ---------------- 招聘 ---------------- mk('gaoxin', '高薪招聘', 'recruit', solid('#0d1b2a'), [ sh('rect', 0, 0, 1080, 12, '#00e5ff'), tx('高薪招聘\n期待你加入', 80, 170, 920, 110, '#ffffff', { align: 'left', weight: 900, lineHeight: 1.35 }), tx('前端工程师 / 产品经理 / 运营', 80, 510, 920, 48, '#4dd0e1', { align: 'left', weight: 700 }), tx('13薪 · 五险一金 · 弹性工作 · 年度体检', 80, 630, 920, 44, '#90a4ae', { align: 'left', weight: 400 }), im(80, 770, 920, 430, '现代互联网公司开放办公区,团队协作照片', { radius: 16 }), sh('rect', 80, 1300, 460, 92, '#00e5ff', { radius: 46 }), tx('投递简历', 80, 1319, 460, 40, '#0d1b2a'), ]), mk('mendi', '门店招聘', 'recruit', solid('#ffd60a'), [ tx('门店招聘', 50, 270, 980, 160, '#111111', { weight: 900 }), tx('店员 / 收银 / 导购', 50, 480, 980, 64, '#b71c1c', { weight: 900 }), tx('月薪4500-8000 · 包吃住', 50, 610, 980, 52, '#111111'), im(140, 740, 800, 420, '明亮便利店门店员工微笑服务照片', { radius: 24 }), sh('rect', 300, 1250, 480, 100, '#b71c1c', { radius: 50 }), tx('电话:138-0000-0000', 300, 1274, 480, 44, '#ffffff', { weight: 900 }), ]), // ---------------- 生日 ---------------- mk('shengri', '生日快乐', 'birthday', grad(135, '#f8bbd0', '#f48fb1'), [ tx('生日快乐', 50, 260, 980, 170, '#ad1457', { weight: 900 }), tx('愿你所求皆如愿', 50, 465, 980, 56, '#880e4f'), im(170, 630, 740, 560, '粉色生日蛋糕蜡烛气球,生日派对摄影', { radius: 32 }), sh('ellipse', 380, 1250, 320, 160, '#ad1457'), tx('许愿时刻', 380, 1292, 320, 46, '#ffffff', { weight: 900 }), ]), mk('zhousui', '宝宝周岁', 'birthday', grad(135, '#fff9c4', '#ffe0b2'), [ tx('周岁快乐', 50, 250, 980, 150, '#ef6c00', { weight: 900 }), tx('宝宝成长纪念', 50, 450, 980, 56, '#e65100'), im(160, 620, 760, 560, '抓周物品与宝宝生日布置,暖黄色温馨照片', { radius: 32 }), tx('健康快乐 平安长大', 50, 1280, 980, 48, '#bf360c', { weight: 700 }), ]), // ---------------- 封面/宣传 ---------------- mk('ganhuo', '干货分享封面', 'redbook', solid('#f7f7f7'), [ sh('rect', 70, 90, 340, 92, '#ff2442', { radius: 46 }), tx('干货分享', 70, 111, 340, 42, '#ffffff', { weight: 900 }), tx('5个让效率翻倍\n的办公神器', 70, 240, 940, 96, '#111111', { align: 'left', weight: 900, lineHeight: 1.4 }), tx('收藏 = 用到', 70, 530, 940, 40, '#888888', { align: 'left', weight: 400 }), im(70, 640, 940, 640, '干净留白的桌面办公好物平铺摄影,小红书封面风格', { radius: 24 }), tx('关注我 持续分享实用工具', 70, 1350, 940, 36, '#999999', { align: 'left', weight: 400 }), ]), mk('qiye', '企业宣传', 'redbook', grad(135, '#004d40', '#00897b'), [ tx('企业宣传', 50, 300, 980, 150, '#ffffff', { weight: 900 }), tx('专业 · 高效 · 值得信赖', 50, 500, 980, 56, '#b2dfdb'), im(110, 660, 860, 520, '现代企业办公大楼玻璃幕墙蓝天,商务摄影', { radius: 20 }), tx('成立10年 · 服务客户10000+', 50, 1250, 980, 46, '#80cbc4', { weight: 700 }), sh('rect', 340, 1345, 400, 76, 'rgba(255,255,255,0.92)', { radius: 38 }), tx('了解更多', 340, 1363, 400, 36, '#004d40', { weight: 700 }), ]), // ---------------- 校园(学校/老师/学生) ---------------- mk('jiaoshijie', '教师节快乐', 'school', grad(135, '#ff8f00', '#ffd54f'), [ sh('ellipse', 660, 70, 380, 380, 'rgba(255,255,255,0.16)'), tx('教师节快乐', 50, 330, 980, 150, '#ffffff', { weight: 900, shadow: { color: 'rgba(180,80,0,0.4)', blur: 20, y: 6 } }), tx('三尺讲台 · 一生耕耘', 50, 540, 980, 56, '#fff3e0', { weight: 700 }), im(140, 670, 800, 470, '老师在黑板前讲课,明亮温暖教室,教师节主题摄影', { radius: 24 }), sh('rect', 340, 1195, 400, 96, '#c62828', { radius: 48 }), tx('感恩有您', 340, 1217, 400, 44, '#ffd54f'), tx('9月10日 · 致敬每一位恩师', 50, 1345, 980, 40, '#fff8e1', { weight: 400 }), ]), mk('kaixue1', '开学第一课', 'school', grad(120, '#1565c0', '#42a5f5'), [ tx('开学第一课', 50, 260, 980, 150, '#ffd60a', { weight: 900 }), tx('新学期 · 新起点 · 新目标', 50, 470, 980, 54, '#ffffff', { weight: 700 }), im(130, 620, 820, 480, '黑板与书本开学场景,粉笔字新学期,明亮教室', { radius: 24 }), sh('rect', 300, 1180, 480, 100, '#ffd60a', { radius: 50 }), tx('收心启航 立即返校', 300, 1206, 480, 44, '#1565c0'), tx('XX学校 9月1日正式上课', 50, 1340, 980, 40, '#bbdefb', { weight: 400 }), ]), mk('jiazhanghui', '家长会通知', 'school', solid('#1a237e'), [ sh('rect', 0, 0, 1080, 14, '#ffd60a'), tx('家长会通知', 60, 130, 960, 130, '#ffffff', { align: 'left', weight: 900 }), tx('时间:本周六 09:00\n地点:三年级(2)班教室\n主讲:班主任 王老师', 60, 350, 960, 46, '#c5cae9', { align: 'left', weight: 400, lineHeight: 1.7 }), im(60, 660, 960, 430, '教室家长会现场,课桌整齐排列,明亮校园教室', { radius: 16 }), sh('rect', 60, 1170, 480, 96, '#ffd60a', { radius: 48 }), tx('敬请准时出席', 60, 1193, 480, 44, '#1a237e'), tx('XX小学 三年级(2)班 家委会', 60, 1330, 960, 38, '#90a4ae', { align: 'left', weight: 400 }), ]), mk('yundonghui', '秋季运动会', 'school', grad(135, '#d32f2f', '#ff7043'), [ sh('ellipse', -80, 180, 320, 320, 'rgba(255,255,255,0.12)'), tx('秋季运动会', 50, 300, 980, 165, '#ffd54f', { weight: 900 }), tx('激情飞扬 · 超越自我', 50, 520, 980, 56, '#ffffff', { weight: 700 }), im(120, 660, 840, 470, '学校操场红色跑道与运动健儿,运动会场景', { radius: 24 }), sh('rect', 340, 1200, 400, 96, '#ffffff', { radius: 48 }), tx('报名参赛', 340, 1224, 400, 44, '#d32f2f'), tx('10月16日 · 学校操场', 50, 1345, 980, 40, '#ffe0b2', { weight: 400 }), ]), mk('biyeji', '毕业季', 'school', grad(160, '#0d47a1', '#26c6da'), [ tx('毕业快乐', 50, 250, 980, 175, '#ffffff', { weight: 900, shadow: { color: 'rgba(0,40,90,0.45)', blur: 22, y: 8 } }), tx('愿你前程似锦 · 顶峰相见', 50, 470, 980, 54, '#b3e5fc', { weight: 700 }), im(190, 620, 700, 640, '学士帽抛向蓝天,毕业季庆祝,青春校园', { radius: 32 }), tx('2026届 · 青春不散场', 50, 1350, 980, 42, '#e1f5fe', { weight: 400 }), ]), mk('shezhaoxin', '社团招新', 'school', grad(135, '#8e24aa', '#ff6d00'), [ tx('社团招新', 50, 270, 980, 170, '#ffffff', { weight: 900 }), tx('百团大战 · 就等你来', 50, 490, 980, 58, '#ffe0b2', { weight: 700 }), im(140, 640, 800, 470, '大学生社团活动,街舞音乐绘画丰富多彩,校园招新', { radius: 28 }), sh('ellipse', 370, 1180, 340, 170, '#ffd60a'), tx('加入我们', 370, 1228, 340, 48, '#6a1b9a', { weight: 900 }), tx('本周五中午 · 食堂广场', 50, 1380, 980, 38, '#ffffff', { weight: 400 }), ]), mk('biaozhang', '优秀学生表彰', 'school', solid('#fff8e1'), [ sh('rect', 36, 36, 1008, 1368, '#c62828'), sh('rect', 60, 60, 960, 1320, '#fff8e1'), tx('光荣榜', 50, 170, 980, 150, '#c62828', { weight: 900 }), tx('优秀学生表彰', 50, 370, 980, 96, '#d32f2f', { weight: 900, rot: -4 }), tx('张同学 · 李同学 · 王同学\n品学兼优 · 全面发展', 140, 570, 800, 52, '#5d4037', { weight: 700, lineHeight: 1.8 }), im(240, 810, 600, 380, '金色奖杯与奖状证书特写,表彰大会氛围', { radius: 20 }), tx('XX学校 教务处', 50, 1270, 980, 44, '#8d6e63', { weight: 400 }), ]), mk('ertongjie', '快乐六一', 'school', grad(135, '#00bcd4', '#8bc34a'), [ tx('快乐六一', 50, 270, 980, 165, '#ffffff', { weight: 900, shadow: { color: 'rgba(0,90,110,0.35)', blur: 18, y: 6 } }), tx('阳光自信 · 快乐成长', 50, 485, 980, 54, '#e0f7fa', { weight: 700 }), im(160, 630, 760, 550, '小学校园儿童欢笑庆祝,彩色气球彩带,六一儿童节', { radius: 32 }), sh('ellipse', 390, 1230, 300, 160, '#ff5722'), tx('6·1', 390, 1272, 300, 62, '#ffffff', { weight: 900 }), tx('XX小学 庆六一文艺汇演', 50, 1395, 980, 36, '#ffffff', { weight: 400 }), ]), mk('kaoshi', '考试加油', 'school', solid('#b71c1c'), [ sh('ellipse', 340, 90, 400, 400, 'rgba(255,213,79,0.92)'), tx('必胜', 340, 210, 400, 150, '#b71c1c', { weight: 900 }), tx('考试加油', 50, 560, 980, 165, '#ffd54f', { weight: 900 }), tx('以梦为马 · 不负韶华', 50, 780, 980, 54, '#ffffff', { weight: 700 }), im(140, 900, 800, 350, '学生伏案复习试卷书本特写,台灯下奋斗场景', { radius: 20 }), sh('rect', 300, 1300, 480, 96, '#ffd60a', { radius: 48 }), tx('金榜题名', 300, 1324, 480, 44, '#b71c1c'), ]), mk('dushuyue', '书香校园读书月', 'school', grad(160, '#4e342e', '#8d6e63'), [ tx('书香校园', 50, 260, 980, 160, '#ffe0b2', { weight: 900 }), tx('读书月 · 阅读分享活动', 50, 470, 980, 52, '#ffffff', { weight: 700 }), im(130, 620, 820, 480, '图书馆书架与学生阅读,温暖木质色调,书香氛围', { radius: 24 }), sh('rect', 290, 1170, 500, 96, '#ffe0b2', { radius: 48 }), tx('每天阅读30分钟', 290, 1194, 500, 44, '#4e342e'), tx('主办:语文教研组 · 11月', 50, 1330, 980, 40, '#d7ccc8', { weight: 400 }), ]), // ---------------- 更多促销/节日/活动/美食 ---------------- mk('miaosha', '限时秒杀', 'promo', solid('#111111'), [ tx('限时秒杀', 50, 260, 980, 170, '#ff1744', { weight: 900 }), tx('前100名 · 1元抢', 50, 480, 980, 72, '#ffffff', { weight: 900 }), im(80, 660, 580, 520, '爆款商品抢购堆头,红黑配色电商海报', { radius: 24 }), sh('ellipse', 700, 660, 320, 320, 'rgba(255,23,68,0.88)'), tx('1元', 700, 755, 320, 120, '#ffffff', { weight: 900, rot: -8 }), tx('每晚8点准时开抢', 50, 1260, 980, 52, '#ff8a80', { weight: 700 }), tx('活动截止:11月30日', 50, 1350, 980, 38, '#9e9e9e', { weight: 400 }), ]), mk('shuang12', '双12年终盛典', 'promo', grad(135, '#4a148c', '#e91e63'), [ sh('ellipse', 620, 50, 440, 440, 'rgba(255,255,255,0.12)'), tx('双12年终盛典', 40, 340, 1000, 130, '#ffffff', { weight: 900 }), tx('年终好价 · 全场包邮', 50, 530, 980, 58, '#ffd60a', { weight: 900 }), im(140, 670, 800, 470, '双12紫色电商促销礼盒堆头,霓虹光效', { radius: 28 }), sh('rect', 340, 1210, 400, 96, '#ffd60a', { radius: 48 }), tx('立即抢购', 340, 1234, 400, 44, '#4a148c'), tx('12月12日 0点开抢', 50, 1350, 980, 40, '#f3e5f5', { weight: 400 }), ]), mk('muri', '母亲节快乐', 'festival', grad(160, '#ec407a', '#f8bbd0'), [ tx('母亲节快乐', 50, 280, 980, 160, '#ffffff', { weight: 900, shadow: { color: 'rgba(150,20,60,0.35)', blur: 18, y: 6 } }), tx('时光不老 · 母爱永恒', 50, 490, 980, 54, '#fce4ec', { weight: 700 }), im(170, 640, 740, 540, '粉色康乃馨花束特写,母亲节温馨氛围', { radius: 32 }), sh('ellipse', 380, 1225, 320, 150, '#ad1457'), tx('感恩有你', 380, 1265, 320, 46, '#ffffff', { weight: 900 }), tx('5月第二个星期日', 50, 1395, 980, 36, '#ffffff', { weight: 400 }), ]), mk('zhounian', '门店周年庆', 'event', grad(135, '#bf360c', '#ff6d00'), [ tx('三周年庆', 50, 290, 980, 175, '#ffd54f', { weight: 900 }), tx('感恩回馈 · 全场5折', 50, 520, 980, 60, '#ffffff', { weight: 900 }), im(130, 670, 820, 460, '店铺周年庆气球拱门与礼盒,喜庆橙红色', { radius: 24 }), sh('rect', 300, 1195, 480, 100, '#ffffff', { radius: 50 }), tx('进店即送礼品', 300, 1222, 480, 44, '#bf360c'), tx('活动3天 · 11月20-22日', 50, 1345, 980, 40, '#ffe0b2', { weight: 400 }), ]), mk('waimai', '外卖满减', 'food', solid('#ff6f00'), [ tx('外卖满减', 50, 250, 980, 165, '#ffffff', { weight: 900 }), tx('满25减12 · 满40减20', 50, 465, 980, 62, '#ffe0b2', { weight: 900 }), im(140, 630, 800, 470, '外卖餐盒美食打包俯拍,橙色暖调餐饮摄影', { radius: 28 }), sh('ellipse', 700, 1140, 300, 160, '#b71c1c'), tx('立减', 700, 1184, 300, 50, '#ffd54f', { weight: 900 }), tx('扫码下单 · 30分钟送达', 50, 1350, 980, 44, '#ffffff', { weight: 700 }), ]), mk('kafei', '咖啡新品', 'food', solid('#3e2723'), [ tx('新品拿铁', 50, 250, 980, 160, '#ffab40', { weight: 900 }), tx('第二杯半价', 50, 450, 980, 66, '#ffffff', { weight: 900 }), im(150, 610, 780, 560, '咖啡拉花拿铁特写,木质桌面暖光,咖啡馆氛围', { radius: 32 }), tx('每日现磨 · 门店限量', 50, 1250, 980, 48, '#ffe0b2', { weight: 700 }), tx('活动时间:11:00 - 18:00', 50, 1350, 980, 38, '#bcaaa4', { weight: 400 }), ]), mk('meishijie', '美食嘉年华', 'food', grad(135, '#e65100', '#ffb300'), [ sh('ellipse', -70, 240, 300, 300, 'rgba(255,255,255,0.14)'), tx('美食嘉年华', 50, 300, 980, 155, '#ffffff', { weight: 900 }), tx('全场5折 · 吃货狂欢', 50, 510, 980, 58, '#fff3e0', { weight: 900 }), im(130, 660, 820, 470, '各类美食拼盘俯拍,烤串甜品饮品,热闹美食节', { radius: 24 }), sh('rect', 340, 1200, 400, 96, '#b71c1c', { radius: 48 }), tx('5折开吃', 340, 1224, 400, 44, '#ffd54f'), tx('本周六日 · 中心广场', 50, 1345, 980, 40, '#ffffff', { weight: 400 }), ]), ]; // 背景快捷预设(画布"背景"区一键切换) export const BG_PRESETS: { name: string; bg: PosterBg }[] = [ { name: '中国红', bg: grad(135, '#c62828', '#ff8f00') }, { name: '活力橙', bg: grad(135, '#ff6d00', '#ffb300') }, { name: '科技蓝', bg: grad(120, '#0052ff', '#00c6ff') }, { name: '魅紫', bg: grad(135, '#6a1b9a', '#e91e63') }, { name: '森绿', bg: grad(135, '#00695c', '#26a69a') }, { name: '樱花粉', bg: grad(135, '#f8bbd0', '#f48fb1') }, { name: '暗夜黑', bg: solid('#171717') }, { name: '奶油白', bg: solid('#f7f7f7') }, ];