REFERENCE
- Gallery page: https://magpui.com/en/i/particle-body-heart-rate-screen-090705
- First frame (image): https://dnioievkvxejjbxgwvko.supabase.co/storage/v1/object/public/media/particle-body-heart-rate-screen-090705/shot.jpg
- Clip (mp4): https://dnioievkvxejjbxgwvko.supabase.co/storage/v1/object/public/media/particle-body-heart-rate-screen-090705/clip.mp4
- Original post: https://x.com/serhandesign/status/2118018677840712138 by @serhandesign
Before building, download the first frame and look at it. If ffmpeg is available, download the clip and extract frames (ffmpeg -i clip.mp4 -vf fps=2 frame-%02d.png), then study the motion frame by frame. Match what you see; the text below describes it, the frames are the truth.
BUILD: A mobile heart-rate detail screen. The top two thirds show a human torso and head made of thousands of tiny pale particles on black, slowly shimmering, with a 3D heart in the chest made of dense red particles that beats at the measured rate and turns gently as the user drags. Below it, a dark rounded card shows the resting heart rate in large numerals ("72 BPM"), a status line ("Calm and steady") and a dot-matrix ECG strip whose lit red dots trace the heartbeat and scroll left in sync with the pulse. It should feel calm, clinical and alive, like looking at your own heartbeat through a scanner.
DESIGN SYSTEM: Mobile frame 390x844 pt, background #000000 with a very subtle red radial glow behind the heart (#3A0A12 at 35%). Top bar: back arrow left, title "My heart" centered (17 px, medium, #FFFFFF), delete and expand icons right, 20 px icons in #E6E6E6. Body particles: 1-1.5 px points, #C9C9D6 at 25-60% opacity, density higher on the silhouette edges to read the shoulders and neck. Heart particles: 1.5-2 px points, #E5263D to #FF4D5E with additive blending and a soft bloom. Stats card: 16 px side margin, radius 32 px, fill #1A1A1C, padding 24 px. A pill label above the card edge ("Resting heart rate", 13 px, #BDBDBD, fill #232325, radius 999 px, 1 px border #2E2E31) with a small red heart icon. Value: 56 px, semibold, #FFFFFF, tabular numerals; unit "BPM" 15 px #8C8CFF. Status 20 px semibold #FFFFFF; helper 14 px #9A9A9F. ECG strip: grid of 24 x 7 dots, 5 px dots, 14 px pitch, idle dots #3A2A35, lit dots #E5263D, the current beat dot slightly larger (7 px) and brighter. Bottom pill: "Today, 9:41 · 15 s reading", 13 px, #BDBDBD on #232325.
MOTION: Heartbeat: at 72 BPM (833 ms per beat) the heart particle mass scales 1 to 1.08 in 120 ms with cubic-bezier(0.3, 0, 0.2, 1), then a smaller second bump 1.03 at 260 ms, back to 1 by 600 ms; particle brightness peaks with each beat. Idle shimmer: every body particle drifts on a slow noise field (amplitude 1-2 px, period 4-6 s) and its opacity flickers by +/-20%. Drag: horizontal drag rotates the heart around Y up to +/-35 deg with inertia (spring stiffness 120, damping 20); body particles near the cursor scatter outward 6-10 px and ease back in 600 ms. ECG: the lit dot pattern shifts one column left every 70 ms; on each beat a QRS spike pattern (rising 4-5 dots tall) enters from the right. Number change: digits roll vertically 220 ms cubic-bezier(0.22, 1, 0.36, 1).
SECTIONS: Parts: status bar, top bar, particle body, particle heart, glow layer, stats card (pill label, value, status, helper, ECG dot grid), reading timestamp pill. States: idle (beating), dragging (heart rotating, particles scattering), measuring (ECG fills in from empty), done.
IMPLEMENTATION: React Three Fiber with a single THREE.Points for the body (sample points from a torso silhouette mesh or a depth image) and another for the heart (sample a heart model or SDF), custom shader material for size, opacity flicker and additive blending; drive the beat with a uniform from the BPM value. The card and ECG are plain DOM: the ECG dot grid in CSS grid or a small canvas. Keep particle count around 15k-25k on mobile and cap devicePixelRatio at 2. prefers-reduced-motion: stop the shimmer and scatter, keep a gentle 1 to 1.03 beat, and freeze the ECG scrolling. Icons are real buttons with focus rings; the value has an aria-live region.
ADAPT TO THE PROJECT: Reuse the project's existing design tokens, components and fonts; map colors to the closest existing tokens. Never copy logos, brand names, photos or illustrations from the original; use placeholders and your own geometry for the body and heart.
SUCCESS CHECK:
- The heart visibly pulses at the displayed BPM and the ECG dots spike in sync with each beat.
- Dragging rotates the heart and scatters nearby body particles, which settle back smoothly.
- The screen holds 60 fps on a mid-range phone and respects prefers-reduced-motion.