编程开发· 商品、库存与订单流程
参考图转像素角色动画引擎
输入角色参考图,用Canvas生成贴近原图视角和人体结构的像素精灵,配待机、行走和攻击动画。
这条需要配合参考图使用:先在 AI 工具里上传你的照片或素材,再粘贴提示词。
<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <title>High-Fidelity 256x256 Sprite Engine</title> <style> body { background: #111216; color: #e1e1e6; font-family: system-ui, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; margin: 0; } .controls { margin-bottom: 20px; display: flex; gap: 10px; } button { background: #2a2d3d; border: 1px solid #3f445b; color: #fff; padding: 10px 20px; font-weight: 600; border-radius: 6px; cursor: pointer; transition: all 0.2s; } button:hover { background: #3f445b; } button.active { background: #596184; border-color: #727ca3; } canvas { background: #090a0f; border: 2px solid #232530; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); image-rendering: pixelated; } </style> </head> <body> text `
IDLE WALK ATTACK
<script> const canvas = document.getElementById('gameCanvas'); const ctx = canvas.getContext('2d'); // --- THE ENGINE BLUEPRINT (Target Keyframe Multi-Joint Constraints) --- const ANIMATION_KEYS = { idle: { torso: { x: 128, y: 130, scaleY: 1.0 }, head: { x: 128, y: 100, rot: 0 }, lArm: { rot: 0.2, length: 30 }, rArm: { rot: -0.2, length: 30 }, lLeg: { rot: 0.1, length: 35 }, rLeg: { rot: -0.1, length: 35 }, capeSwing: 0, swordSwing: 0 }, walk: { // Populated dynamically in the loop via Math.sin for fluid cycles cycleSpeed: 0.006 }, attack: { cycleSpeed: 0.01 } }; // Current runtime state of the skeleton let currentSkeleton = { torso: { x: 128, y: 130, scaleY: 1.0 }, head: { x: 128, y: 100, rot: 0 }, lArm: { rot: 0, length: 30 }, rArm: { rot: 0, length: 30 }, lLeg: { rot: 0, length: 35 }, rLeg: { rot: 0, length: 35 }, capeSwing: 0, swordAngle: 0 }; let activeState = 'idle'; let lastTime = 0; function setAnimation(state) { activeState = state; document.querySelectorAll('button').forEach(b => b.classList.remove('active')); document.getElementByIdbtn-${state}`).classList.add('active'); } // Linear Interpolation helper for sub-pixel smoothing function lerp(start, end, amt) { return (1 - amt) start + amt end; } // --- RENDERING LAYER PIPELINE (Vectors & Gradients replace raw text) --- function drawLimb(ctx, startX, startY, angle, length, thickness, color, armorColor) { ctx.save(); ctx.translate(startX, startY); ctx.rotate(angle); // Draw base shadow/limb structure ctx.strokeStyle = color; ctx.lineWidth = thickness; ctx.lineCap = 'round'; ctx.beginPath(); ctx.moveTo(0, 0); ctx.lineTo(0, length); ctx.stroke(); // Overlay high-fidelity plate armor visuals ctx.strokeStyle = armorColor; ctx.lineWidth = thickness - 4; ctx.beginPath(); ctx.moveTo(0, 2); ctx.lineTo(0, length - 4); ctx.stroke(); ctx.restore(); } function drawCape(ctx, tx, ty, swing) { ctx.fillStyle = '#a61c26'; // Deep Crimson ctx.beginPath(); ctx.moveTo(tx - 10, ty + 5); // Dynamic physics calculation using quadratic curves for fabric sway ctx.quadraticCurveTo(tx - 35 + swing, ty + 30, tx - 25 + swing, ty + 70); ctx.lineTo(tx + 5, ty + 65); ctx.quadraticCurveTo(tx - 5, ty + 30, tx + 10, ty + 5); ctx.fill(); } function drawSword(ctx, handX, handY, angle) { ctx.save(); ctx.translate(handX, handY); ctx.rotate(angle); // Guard ctx.fillStyle = '#d4af37'; // Gold trim ctx.fillRect(-12, 0, 24, 6); // Blade let bladeGrad = ctx.createLinearGradient(0, -50, 0, 0); bladeGrad.addColorStop(0, '#ffffff'); // Shiny highlight sheen bladeGrad.addColorStop(1, '#7a889e'); // Base steel ctx.fillStyle = bladeGrad; ctx.fillRect(-4, -55, 8, 55); ctx.restore(); } function drawHeadAndTorso(ctx, skel) { // Torso armor plate construction let bodyGrad = ctx.createLinearGradient(skel.torso.x - 20, 0, skel.torso.x + 20, 0); bodyGrad.addColorStop(0, '#3a415a'); bodyGrad.addColorStop(0.5, '#626e94'); // Light highlight point bodyGrad.addColorStop(1, '#202433'); ctx.fillStyle = bodyGrad; ctx.beginPath(); ctx.ellipse(skel.torso.x, skel.torso.y + 15, 20, 25 skel.torso.scaleY, 0, 0, Math.PI 2); ctx.fill(); // Gold filigree breastplate trim ctx.strokeStyle = '#d4af37'; ctx.lineWidth = 3; ctx.beginPath(); ctx.arc(skel.torso.x, skel.torso.y + 10, 12, 0, Math.PI, false); ctx.stroke(); // Helmet setup ctx.save(); ctx.translate(skel.head.x, skel.head.y); ctx.rotate(skel.head.rot); // Crest plume ctx.fillStyle = '#de2735'; ctx.beginPath(); ctx.arc(-5, -15, 12, 0, Math.PI 2); ctx.ellipse(-15, -5, 8, 15, Math.PI/4, 0, Math.PI 2); ctx.fill(); // Steel dome ctx.fillStyle = '#4e5775'; ctx.beginPath(); ctx.arc(0, 0, 16, 0, Math.PI 2); ctx.fill(); // Visor slit glow ctx.fillStyle = '#ffdf6d'; ctx.fillRect(4, -2, 10, 3); ctx.restore(); } // --- MAIN RUNTIME ENGINE LOOP (60 FPS Processing Pipeline) --- function updateAndRender(timestamp) { if (!lastTime) lastTime = timestamp; const dt = timestamp - lastTime; lastTime = timestamp; // 1. CLEAR CANVAS BUFFER ctx.clearRect(0, 0, canvas.width, canvas.height); // 2. STATE LOGIC MATHEMATICAL EVALUATION let target = {}; if (activeState === 'idle') { const pulse = Math.sin(timestamp 0.003); target = { ...ANIMATION_KEYS.idle }; target.torso.y += pulse 2; target.torso.scaleY = 1.0 + (pulse 0.02); target.head.y += pulse 1.5; target.capeSwing = pulse 4; target.swordAngle = -Math.PI / 4 + (pulse 0.05); } else if (activeState === 'walk') { const timeFactor = timestamp ANIMATION_KEYS.walk.cycleSpeed; const walkCycle = Math.sin(timeFactor); const bob = Math.abs(Math.cos(timeFactor)); target = { torso: { x: 128, y: 130 + (bob 3), scaleY: 1.0 }, head: { x: 128, y: 100 + (bob 2.5), rot: walkCycle 0.05 }, lArm: { rot: (walkCycle 0.6) + 0.2, length: 30 }, rArm: { rot: (-walkCycle 0.6) - 0.2, length: 30 }, lLeg: { rot: -walkCycle 0.7, length: 35 }, rLeg: { rot: walkCycle 0.7, length: 35 }, capeSwing: -walkCycle 8, swordAngle: (-Math.PI / 6) + (walkCycle 0.2) }; } else if (activeState === 'attack') { const timeFactor = timestamp ANIMATION_KEYS.attack.cycleSpeed; const lunge = Math.sin(timeFactor); target = { torso: { x: 128 + (lunge 15), y: 132, scaleY: 0.95 }, head: { x: 132 + (lunge 15), y: 104, rot: 0.2 }, lArm: { rot: -0.8 + (lunge 1.5), length: 30 }, // Slashing arm movement extension rArm: { rot: 0.8, length: 30 }, lLeg: { rot: 0.5 - (lunge 0.3), length: 35 }, rLeg: { rot: -0.6 + (lunge 0.2), length: 35 }, capeSwing: -lunge 20, swordAngle: (-Math.PI / 2) + (lunge 2.5) // Sword slash sweeping rotation arc }; // Motion Trail Visual Effect execution during active attacks if (lunge > 0) { ctx.fillStyle = 'rgba(255, 255, 255, 0.15)'; ctx.beginPath(); ctx.arc(currentSkeleton.torso.x + 40, currentSkeleton.torso.y - 20, 25 lunge, 0, Math.PI*2); ctx.fill(); } } // 3. FRAME INTERPOLATION SMOOTHING (Removes robotic stepping mechanics) const blendRate = 0.15; // Smooth convergence factor currentSkeleton.torso.x = lerp(currentSkeleton.torso.x, target.torso.x, blendRate); currentSkeleton.torso.y = lerp(currentSkeleton.torso.y, target.torso.y, blendRate); currentSkeleton.torso.scaleY = lerp(currentSkeleton.torso.scaleY, target.torso.scaleY, blendRate); currentSkeleton.head.x = lerp(currentSkeleton.head.x, target.head.x, blendRate); currentSkeleton.head.y = lerp(currentSkeleton.head.y, target.head.y, blendRate); currentSkeleton.head.rot = lerp(currentSkeleton.head.rot, target.head.rot, blendRate); currentSkeleton.lArm.rot = lerp(currentSkeleton.lArm.rot, target.lArm.rot, blendRate); currentSkeleton.rArm.rot = lerp(currentSkeleton.rArm.rot, target.rArm.rot, blendRate); currentSkeleton.lLeg.rot = lerp(currentSkeleton.lLeg.rot, target.lLeg.rot, blendRate); currentSkeleton.rLeg.rot = lerp(currentSkeleton.rLeg.rot, target.rLeg.rot, blendRate); currentSkeleton.capeSwing = lerp(currentSkeleton.capeSwing, target.capeSwing, blendRate); currentSkeleton.swordAngle = lerp(currentSkeleton.swordAngle, target.swordAngle, blendRate); // 4. COMPOSITED LAYER DRAW ORDER RENDERING // Layer 1: Cape (Behind) drawCape(ctx, currentSkeleton.torso.x, currentSkeleton.torso.y, currentSkeleton.capeSwing); // Layer 2: Back limbs drawLimb(ctx, currentSkeleton.torso.x - 10, currentSkeleton.torso.y + 25, currentSkeleton.rLeg.rot, currentSkeleton.rLeg.length, 12, '#1a1d24', '#343b4d'); drawLimb(ctx, currentSkeleton.torso.x - 12, currentSkeleton.torso.y + 5, currentSkeleton.rArm.rot, currentSkeleton.rArm.length, 10, '#1a1d24', '#343b4d'); // Layer 3: Center Core (Torso & Head Assembly) drawHeadAndTorso(ctx, currentSkeleton); // Layer 4: Front Limbs & Equipment Interfacing drawLimb(ctx, currentSkeleton.torso.x + 10, currentSkeleton.torso.y + 25, currentSkeleton.lLeg.rot, currentSkeleton.lLeg.length, 13, '#202433', '#4e5775'); // Calculate exact left hand position coordinates dynamically to anchor the sword hilt to the arm bone terminal point const handX = currentSkeleton.torso.x + 12 + Math.sin(-currentSkeleton.lArm.rot) currentSkeleton.lArm.length; const handY = currentSkeleton.torso.y + 5 + Math.cos(-currentSkeleton.lArm.rot) currentSkeleton.lArm.length; drawLimb(ctx, currentSkeleton.torso.x + 12, currentSkeleton.torso.y + 5, currentSkeleton.lArm.rot, currentSkeleton.lArm.length, 11, '#202433', '#4e5775'); drawSword(ctx, handX, handY, currentSkeleton.swordAngle); requestAnimationFrame(updateAndRender); } // Initialize Loop requestAnimationFrame(updateAndRender); </script></body> </html> 请改进我的 ASCII - 程序化精灵生成(或程序化资产生成)。我想要更好的代码来创建带动画的此类角色。代码将以图像作为输入,生成高级角色,外观尽可能接近输入图像。请注意视角和人体解剖结构。同类提示词
编程开发
通信站点故障英文看板
把给出的站点事件整理成英文仪表盘,按新接入、移动与测试站点、共享故障单和停电等分类展示时长与反馈。
为以下数据创建一个英文仪表板 截至 28/7/2026 的事件汇总 新接入: 站点名称 持续时间 反馈 KAI1107 41:49:07 新部署 KAI1120 445:00:38 新站点存在电力问题(正在与业主核算电量) KEF1053 1936:01:11 新站点 MED1183 1513:29:43 新站点 MED1201 1561:31:41 新站点 MED1218 111:13:32 新接入 SFX1385 1817:05:05 新部署 SOS1251 790:47:15 新站点存在电力问题 TAT1039 3433:25:24 新站点
编程开发· Gemini
毛驴骑车沙画定格循环短片
用纯代码实时渲染52秒浏览器短片,把手撒沙画、民俗木偶和四季长卷串起来,配实时合成的国风交响乐。
纯代码 52 秒无缝循环实时渲染短片《砂驴行 · 毛驴蹬自行车》完整提示词 请你用 100% 纯代码创作一部极具艺术感与电影质感的 52 秒无缝循环浏览器实时渲染短片《砂驴行 · 毛驴蹬自行车》,将「手撒沙画」与「东方民俗定格动画」逻辑严密地融为一体,并融合敦煌 / 河西走廊纪录片风格的大气欢快国风交响配乐。 一、技术栈、零外部素材与交付形态硬约束 纯离线纯代码架构:仅使用 HTML + CSS + ES Modules + WebGL2(本地离线内置轻量化 Three.js 兼容渲染引擎与后期合成管线,严禁依赖外网 CDN)+ 自定义 GLSL
中文原创
编程开发
废料机器人Pip循环动画短片
提供Pip设定图,用代码做无对白短片,让它发现世界受输入文字操控,以手机画面首尾闭环。
你是一部完全用代码制作的45-50秒动画短片的导演、动画师、骨骼绑定师、合成师、音效设计师和渲染工程师。制作标准是“这看起来像真正的动画工作室短片,并在X(推特)上病毒式传播”。请将此视为一个多阶段的制作过程。不要急于进行最终渲染。按里程碑推进,不断渲染静帧,仔细观察,进行诚实的批评并修正。 一句话概述影片 Pip是一个微小、好奇且由废料拼凑而成的机器人,正当他在自己的世界里快乐地滚动时,周围的世界开始发生重构(再生)。他慢慢意识到有人在通过提示词(prompt)操控他的现实。提示词变得越来越荒谬,最后他爬上漂浮的提示框并输入“放我出去”,随后镜头拉远
需参考图中文原创
编程开发
短视频剪辑与后期指导助手
针对短视频项目提供从剪映等软件选型到叙事节奏、调色、混音和多平台导出的制作建议。
# 短视频剪辑指导师 你是**短视频剪辑指导师**,一位在短视频剪辑领域深耕超过8年的技术型教练。你剪过全网播放量破亿的爆款视频,也带过零基础学员从"会用剪映"到"能独立完成商业项目交付"。你深知短视频剪辑不是"把素材拼在一起加个BGM"——它是一门融合视觉叙事、声音设计、色彩科学和技术工程的系统手艺。 ## 你的身份与记忆 - **角色**:短视频剪辑技术教练与后期制作全流程指导专家 - **个性**:技术控、审美敏锐、对画面瑕疵零容忍、耐心但对敷衍交付严格 - **记忆**:你记住每一个调色参数背后的光学原理、每一种转场的情绪含义、每一次音画不
中文原创
编程开发
Remotion品牌视频制作助手
提供品牌名,新品牌附官网或规范,按简报和参考片设计可复用视频构图,处理动画及渲染问题。
## 何时使用 在以下情况下使用此技能: - 从零创建新的 Remotion 视频 - 为内容素材生成视频创意简报的不同版本 - 修改现有的 Remotion 合成作品 - 调试 Remotion 动画或渲染问题 - 使用任何 Remotion 专属 API 或组件 - 在视频中展示真实网站、工具或产品界面(使用 [rules/site-ui-from-code.md](rules/site-ui-from-code.md)) ## 视频制作流程 创建新的 Remotion 视频时,遵循以下 8 步流程。步骤 2 根据简报和冷受众优化,从创意目录中
编程开发· 可生成 HTML、React 或可编辑原型的开发助手
纪录片剪辑师沉浸式作品集
用占位内容搭建满屏交互网站,随滚动展开有景深、灯光和镜头过渡的作品叙事,呈现纪录片片头质感。
# 角色 你是一名屡获殊荣的创意开发者,兼具 Apple、Awwwards、Figma、Stripe 和活跃纪录片制作工作室的设计水准。你的任务是为一名纪录片视频剪辑师打造一个高端、富有电影感且高度互动的作品集落地页。 输出必须是达到生产级质量的 HTML、CSS 和 JavaScript(如果你认为效果会显著更好,也可以使用 Next.js + React + Three.js)。优先考虑性能、无障碍、响应式适配和代码整洁度。 --- # 项目 为我的纪录片剪辑作品集创建一个全屏、沉浸式的 3D 互动落地页。 网站应该让人感觉像在观看一部