✨ 会倾斜、能翻转的 3D 镭射卡片——《999 个小技巧,让你 Vibe 的产品更有质感》018 今天分享六种镭射卡片的材质预设:Prism、Rainbow、Pearl、Sparkle、Chrome 和 Etched,适用于门票、分享卡片、购买凭据等场景。 另附一条 Prompt,可将你产品中的卡片改造为同类效果,直接复制即可 ⬇️ 实现这类效果,有以下几个要点: 1. 倾斜:卡片随指针方向倾斜,最大角度为 12°,指针离开时轻微回弹;无人操作时,卡片保持轻微晃动。 2. 镭射层:叠加在卡片底色之上,越靠近光点,亮度越高。 3. 高光与亮边:高光以光点为中心向外扩散;亮边仅在靠近光点的一段被照亮,若隐若现。 4. 视差层次:窗口内的元素分布在不同深度,卡片转动时各层相对错开,呈现真实的三维空间感。 5. 厚度:点击卡片可翻转至背面,翻转时卡片略微抬起,露出 10px 的厚度。
枯白啃设计

图标设计师 / 设计工程师

Prompt(1/5) Prompt Turn a card in my product into a holographic card: it tilts toward the pointer in 3D, a foil finish and a glare follow the light across it, the artwork inside has depth, it sways a little when left alone, and (if I want) it turns over on click to show its back, with a visible edge. Build it inside my code and design system; do not change what the card says or does. Every value in this prompt is a recommendation, not a requirement. Sections 1 to 7 give a full set that works together (the "Standard" values, tested in a demo); section 9 gives presets around them. I choose; you build what I choose. First look at my product (section 0). Then ask me these one at a time. For each, show the options in a short list with their key values, mark the recommended one, and wait for my answer; I may pick an option, change single values, or give my own: 1. Which card: the one element that stands for status or ownership (a member or loyalty card, a ticket or pass, a badge or achievement, a profile or collectible card, a plan tier). Holographic effects lose their meaning when everything shines, so one card per screen. 2. Finish: one of the six in section 3 (Prism recommended), several to choose from (for tiers or rarity), or my brand colors (then derive the base, foil, glare, rim and edge from them and show me the values). 3. Feel: Quiet, Standard (recommended) or Lively (section 9), or my own tilt angle, springs and sway. 4. Interactions: tilt toward the pointer (on), the idle sway (on), turning over on click (needs a back: say what goes on it, such as a QR code or terms), tilting with the phone's motion on mobile (off; needs permission on iOS). 5. If it turns over: the thickness (Thin, Standard recommended, Thick) and the flip spring (section 9). 6. Depth: which parts of the card's artwork get their own layer, and how deep (None, Subtle, Standard recommended; section 9). 7. Background: leave the page behind the card as it is (recommended for most products), or add the slow fluid behind it (section 7). Then sum up my choices with their values in one table, propose how you will build it on my platform (section 8 is a starting point), with the cost and any fallback, and wait for my go-ahead. 0. Start from what exists - Find the card: its component, size, corner radius, artwork and content, where it sits, and what is around it. Check whether a back already exists (terms, a code, details). - Find how the screen draws (DOM, a native view tree, a GPU renderer), the platform version range, whether there is a dark mode, and how pointer and touch input reach the card. - Tell me in a few lines what you found before asking. 1. Tilt and light (Standard) - With the pointer at (fx, fy) in 0..1 across the card, nx = fx * 2 - 1 and ny = fy * 2 - 1, the target is rotateY = nx * 12deg and rotateX = -ny * 12deg. Perspective 1600px on the card's parent. - The tilt follows its target on a spring, so it overshoots a little when the pointer leaves: acceleration = 140 * (target - angle) - 15 * velocity, per second. - The light sits where the pointer is (lx = fx * 100%, ly = fy * 100%) and follows on a spring without overshoot (stiffness 160, damping 2 * sqrt(160) ≈ 25.3). With no pointer on the card, it rests up and to the left (34%, 22%), like a lamp in the room. - Hover strength `on` goes from 0 to 1 while the pointer is on the card, easing at 1 - exp(-7 * dt) per frame; it brightens the foil and the glare. - Left alone, the card sways as if held: rotateX = 2.2deg * sin(0.9t + 0.6) + 0.8deg * sin(2.3t), rotateY = 3.2deg * sin(0.7t) + 0.9deg * sin(1.9t + 1.2), t in seconds, and the light moves with it (lx = 34% + rotateY * 3, ly = 22% - rotateX * 3). - Touch: dragging on the card tilts it the same way (touch-action: none on the card only). Phone motion, if chosen, maps the device's tilt to the same target, clamped to the same angles. - The shadow under the card: a blurred ellipse (black at 60%, blur 24px, 84% of the card's width, 70px tall, 30px below it) that slides away from the side that lifts: x = -rotateY * 1.8px, y = rotateX * 1.2px. 2. The layers of a face, back to front - Art: the card's own base color or picture. - Foil: the finish (section 3), blended over the art, brightest near the light. - Print: everything printed on the card (text, logo, artwork window), above the foil so it stays readable.
登录并发表评论

评论 · 0