随语音变化的 Mesh 渐变助手
浅蓝灰、薄荷与奶油色的 mesh 渐变缓慢流动,用户说话或助手朗读时变快并翻折出锐利色片。底部磨砂药丸依次显示 Hold to talk、Listening、Thinking,问句与答句在上方逐词淡入。
灵感来自 @desugar_64 在 X 上发布的设计由 Now In Code 从零重建
import { Mesh } from "./components";
export function Example() {
const progress = useSharedValue(0);
…
export function Example() {
const progress = useSharedValue(0);
…
Agent 提示词
Add the Now In Code component "voice-reactive-mesh-gradient-assistant" to this project. The full source is attached at the end of this prompt. Put the files under components/voice-reactive-mesh-gradient-assistant/, install the listed dependencies with `npx expo install`, and render it on a route I can open. Keep the timing and easing values documented in the source comments. Replace the sample copy and artwork with content from my app, or leave placeholders and list what I still need to supply. === Source files are attached here for paid plans ===
Pro 作品。提示词包含完整源码。开始使用
详情
- 平台
- iOS、Android
- 依赖
- Expo SDK 54+
- 权限
- Pro
- 更新于
- 2026年11月18日
- 许可证
- 无限商业项目
- 原始设计
- @desugar_64(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
一个语音助手界面,淡蓝灰色的渐变在整个屏幕上缓慢流动。用户说话或助手回答时,流动加快,并出现锐利的折叠色块。底部一个白色模糊胶囊依次显示“Hold to talk”、“Listening”和“Thinking”,其填充在不透明与半透明之间渐变。用户的问题以无衬线字体逐词淡入胶囊上方,助手的回答以衬线字体在顶部逐词淡入,每句话作为一个整体淡出。脚本约二十七秒并循环,包含关于周末计划的两个问题和两个回答。
实现方式
背景是贝塞尔面片组成的网格渐变,在 Oklab 色彩空间中进行 Catmull-Rom 颜色插值,由 CPU 进行细分,并通过 Skia 的 vertices API 绘制。没有使用着色器。面片算法是一个已发布的开源网格渐变绘制器的 JavaScript 移植版;褶皱来自于控制点随语音能量移动时面片之间的重叠。文字先整句放置,再在原位逐词显示。字体通过 expo-font 加载,requestAnimationFrame 循环驱动时间线。
适用场景
- 背景随音频强度变化的语音助手或聊天界面
- 无需视频或着色器即可使用柔和色域的英雄区背景
- 包含分阶段的聆听与思考状态的按住说话交互
依赖
@shopify/react-native-skiaexpo-fontreact-native标签
AI 助手声波可视化模糊过渡流体渐变浅色长按柔和治愈文字动画语音助手