虹彩光球开场与 goo 胶囊提示轮播
线稿 Logo 转成虹彩光球并撑满全屏,再缩成胶囊交接为白色输入框;随后 7 条 prompt 滚动切换,两颗胶囊经 goo 滤镜融合,点击展开为全屏照片卡。WebGL 与 Skia 共用一份 SDF shader。
灵感来自 the web 上的一条帖子由 Now In Code 从零重建
import { Goo } from "./components";
export function Example() {
const progress = useSharedValue(0);
…
export function Example() {
const progress = useSharedValue(0);
…
Agent 提示词
Add the Now In Code component "iridescent-orb-intro-gooey-prompt-carousel" to this project. The full source is attached at the end of this prompt. Put the files under components/iridescent-orb-intro-gooey-prompt-carousel/, 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 作品。提示词包含完整源码。开始使用
详情
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
先是落地页开场,然后是提示词选择器。黑底上,一个细线条的花朵标记变为虹彩光球,光球膨胀到充满屏幕,成为柔和的渐变,然后收缩、变色,拉长成胶囊状,最后变为白色底面,交接给白色输入框。之后滚轮或垂直滑动会在七个示例提示词之间切换。两个胶囊像液体一样重叠融合,旧的胶囊模糊并缩小消失,上方信息区的文字逐个淡入。点击输入框会把胶囊放大成全屏圆角照片卡片。照片从大比例缩放进入,一个轮廓线的手机外框出现在照片上,并带有地点名和推荐提示。关闭按钮会将其逆向还原。
实现方式
共享 JavaScript 核心保存文案、缓动函数、带 from-to、stagger 和回调的小型补间控制器、开场关键帧、着色器源码,以及 logo 圆点模型。光球是单通道片段着色器,由胶囊距离场、流动的颜色场、柔和的幽灵层和外发光构成。同一段函数体在网页预览中包装为 GLSL,在 React Native 组件中包装为 Skia runtime effect 的 SkSL。logo 由八个外圆和八个内圆通过 goo 滤镜融合而成。React Native 无法实时模糊文字,因此文字模糊在那里回退为普通透明度变化,移动端布局中也会跳过凝胶式融合。
适用场景
- AI 或助手类产品落地页的开场序列
- 激活项会放大成全屏场景的提示词或建议轮播
- 过渡到第一个输入框的品牌启动页
依赖
@shopify/react-native-skiareact-native标签
模糊过渡轮播光效辉光黏连融合渐变形变引导页滚动驱动着色器文字动画