带 3D 旋转徽章的连续打卡里程碑
六边形徽章从底部边转边升起,最后正面朝前停住,屏幕边缘亮起内发光,光条向外飞散。徽章由共享 core 中的挤出实体生成,用 HTML 和 React Native SVG 渲染。
灵感来自 @BreejeAnadkat 在 X 上发布的设计由 Now In Code 从零重建
import { 3D } from "./components";
export function Example() {
const progress = useSharedValue(0);
…
export function Example() {
const progress = useSharedValue(0);
…
Agent 提示词
Add the Now In Code component "streak-milestone-with-spinning-3d-badge" to this project. The full source is attached at the end of this prompt. Put the files under components/streak-milestone-with-spinning-3d-badge/, 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月3日
- 许可证
- 无限商业项目
- 原始设计
- @BreejeAnadkat(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
每日连续打卡里程碑的深色奖励页面。一枚六边形珐琅火焰徽章从屏幕下方飞起,上升时旋转两圈并缩小到位。琥珀色光晕从底部沿两侧屏幕边缘向上蔓延,然后轻轻呼吸。徽章后方有几道短光线向外飞出。日期、“10 天连续”标题和一行说明依次淡入,白色分享按钮从下方浮起。安定之后,徽章每六秒转一整圈,边缘可见厚度和银色边框。
实现方式
共享的时间线核心分别用三条三次贝塞尔曲线驱动徽章的位置、旋转和缩放;组件使用 react-native-svg 和 expo-linear-gradient,在 requestAnimationFrame 循环上绘制全部内容。没有 3D 引擎。徽章是一个平面正面,转动时水平压缩,并加入灰色侧边条以模拟厚度;背面使用相同的图稿但不镜像。边缘光晕是带有上升前沿的竖向渐变,顶部、两侧和底部的琥珀色、橙色和红橙色调各不相同。
适用场景
- 健身与学习应用中的连续打卡、习惯或成就里程碑
- 游戏或忠诚度计划中的奖励时刻
- 不借助 3D 库实现伪三维旋转徽章的参考
依赖
react-native-svgreact-native标签
3D 旋转徽章奖章按钮深色光效辉光渐变健康健身图标霓虹科技视差习惯效率拟物3D社交弹簧错峰入场状态切换