粒子图标变形的代理选择器
张开的手掌浮在斜向光带里,掌心上方是由约 1000 个闪光粒子组成的图标。切换标签时粒子散开,新图标从左下角扫掠重组。光带用 SkSL,粒子用 Skia drawAtlas 绘制。
灵感来自 @agispas 在 X 上发布的设计由 Now In Code 从零重建
import { Piece } from "./components";
export function Example() {
const progress = useSharedValue(0);
…
export function Example() {
const progress = useSharedValue(0);
…
Agent 提示词
Add the Now In Code component "particle-icon-morph-agent-selector" to this project. The full source is attached at the end of this prompt. Put the files under components/particle-icon-morph-agent-selector/, 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月4日
- 许可证
- 无限商业项目
- 原始设计
- @agispas(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
一个用于选择专用助手的深色引导页。在手形底座上方,一个闪烁的粒子图标在浮动:旅行用飞机、理财用钱包、家庭用房子,分别呈冰蓝色、暖金色和柔和的紫粉色。切换到其他标签时,粒子从旧图标飞向新图标并重新组合,同时药丸形选中指示滑到新标签,标签文字变色。一道倾斜的光束掠过屏幕,图标周围的空气随之染色。点击当前激活的标签会打开一张卡片,包含计数器、关闭按钮、描述、三个要点以及一个“Choose”按钮。选择后会打开确认页,显示对勾和“Choose another”链接。
实现方式
共享核心保存测量后的布局、助手表、状态机(select、next、previous、open、close、confirm、back)、演示脚本、UI 动画值和粒子。每个图标的轮廓上采样一千个粒子,并带有一定散布。粒子沿三次贝塞尔路径飞行,起始时间随机,并有短暂的扫动;飞行中途切换时会从当前位置重新开始。Skia 从图集绘制粒子,包括小而亮的点和较大的柔光,光束使用着色器。React Native 每帧记录一个 Skia Picture,界面使用视图和 react-native-svg,横向滑动使用 PanResponder。字体通过 expo-font 传入。
适用场景
- 引导页上选择角色、助手或方案
- 一个英雄图标需要在选项间变形的分类选择器
- 在 Skia 中实现矢量形状之间粒子变形的参考
依赖
@shopify/react-native-skiareact-native-svgreact-native标签
AI 助手深色光效辉光形变引导页粒子着色器状态切换滑动手势标签页