惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
IT之家
IT之家
S
Secure Thoughts
WordPress大学
WordPress大学
P
Palo Alto Networks Blog
小众软件
小众软件
V
Visual Studio Blog
V
V2EX
人人都是产品经理
人人都是产品经理
AWS News Blog
AWS News Blog
美团技术团队
Jina AI
Jina AI
宝玉的分享
宝玉的分享
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
SegmentFault 最新的问题
T
Tailwind CSS Blog
腾讯CDC
The Cloudflare Blog
The Hacker News
The Hacker News
Webroot Blog
Webroot Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
CXSECURITY Database RSS Feed - CXSecurity.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 【当耐特】
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
Lohrmann on Cybersecurity
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
罗磊的独立博客
Cisco Talos Blog
Cisco Talos Blog
博客园 - 司徒正美
月光博客
月光博客
J
Java Code Geeks
V2EX - 技术
V2EX - 技术
有赞技术团队
有赞技术团队
AI
AI
G
GRAHAM CLULEY
C
Cybersecurity and Infrastructure Security Agency CISA
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 叶小钗
S
Securelist
T
Threat Research - Cisco Blogs
C
Cisco Blogs

Codrops

The Craft Behind Memorable Digital Experiences: Inside Unseen Studio | Codrops ZERO: The Engineering Behind a Defiant Interactive Narrative | Codrops Meet the Speakers of the First Three.js Conference | Codrops The Architecture Behind Trionn: Coordinating GSAP, Three.js, Lenis, and Web Audio | Codrops Where Stories Become Interactive Worlds: How makemepulse Brings Ideas to Life Across Web, XR, and Beyond | Codrops The Sleepers: Creating an Atmospheric WebGL Experience with Lightweight Techniques Building an Interactive Wave Propagation Cube Grid with Three.js | Codrops Ten Years Away: Designing an Interactive Comic for Studio375’s Tenth Anniversary | Codrops Building a Scroll-Driven 3D Gallery Using a Blender Camera Path with Three.js and GSAP | Codrops From Years of Client Work to a Next.js + Sanity Starter Kit | Codrops Sculpting a Digital Athlete: Capturing Stefanos Tsitsipas Beyond the Court | Codrops Building Persistent Page Transitions with WebGPU and Vanilla JavaScript | Codrops Inside Bisous: Designing an Editorial Experience for Cinematic CGI | Codrops Engineering the Web Experience Behind Shopify’s Spring ’26 Edition: Everywhere | Codrops Shaping Stories into Experience: The Work of Kevin Lam | Codrops Testing What Users Actually See with Vitest and Chromatic | Codrops Podium: Building a Website Where Running Becomes Storytelling | Codrops Designing Beyond the Surface: How DashDigital Turns Complexity into Clarity | Codrops Creative Entrepreneurship: Designing the Machine | Codrops Exploring 3D Image Rotations on Scroll | Codrops Always Building, Always Learning: Cyd Stumpel’s Journey Through the Modern Web | Codrops Designing A Better Lou: Reducing Cognitive Load Through Design, Content, and Systems | Codrops Sketching the Impossible: A 3D Portfolio Built Without a Single 3D Model | Codrops Building Horeca: Advanced Motion Design in Webflow Without the Performance Trade-Offs | Codrops Building an Interactive Digital Stamp Collection with Shaders, Postcards, and Playful Inspection | Codrops No Two Paths Alike: Inside San Rita’s Approach to Digital Experiences | Codrops The Making of the New Lesse Studio Website: Clarity, Performance, and Intentionality | Codrops Creating a Thumbnail Flow Animation with GSAP MotionPath | Codrops Forging Her Own Path: Houmahani Kane’s Journey in Creative Development | Codrops Beaucoup and the Pursuit of Memorable Experiences | Codrops The Future of Emotional Technology: Comfort Websites for Growth and Self-Awareness | Codrops The Never Ending Story: Building a Seamless Infinite Scroll Experience with GSAP & Lenis | Codrops Whooshes, Snaps and Shaders: Adrien Vanderpotte and the Feeling of the Interface | Codrops Building a Scroll-Driven 3D Cube Gallery in Webflow with GSAP | Codrops Creating Scroll-Driven SVG Map Animations with GSAP | Codrops Made With Gsap: Building a Fun Gravity-Based Mouse Trail | Codrops 80s Business Tech and Seamless Scene Transitions: Inside Shader.se’s Scroll-Driven WebGPU Pipeline | Codrops Merlin: The Code Boutique Turning Motion Into Digital Magic | Codrops Designing Ourselves: The New Obys Identity and Website | Codrops Exploring the HTML-in-Canvas Proposal | Codrops Le:mma Studio: Building the Feeling Behind the Screen | Codrops From Shader Uniforms to Clip-Path Wipes: How GSAP Drives My Portfolio | Codrops Reverse-Engineering Claude AI’s Mascot Animations with SVG and GSAP | Codrops Akaru: Crafting Precision-Driven Digital Experiences | Codrops Designing Against the Gallery: A Two-Year Journey to a Layered Portfolio Experience | Codrops Between Human and Machine: Sofia Papadopoulou’s Approach to Augmented Creativity | Codrops More Than a Portfolio: Building a Scroll-Driven 3D World with Something to Say | Codrops Rhumb Studio: Small but Mighty, Shaped by Curiosity | Codrops Susurrus: Crafting a Cozy Watercolor World with Three.js and Shaders | Codrops Building 4WIDE: Turning Distortion, Blur, and Motion into a Coherent Experience | Codrops A Playful Clip Menu with GSAP’s easeReverse | Codrops False Earth: From WebGL Limits to a WebGPU-Driven World | Codrops Interactive Storytelling for the Web: Building Immersive Stories with Timelines, 3D, and Layered Scenes | Codrops The Art of Complex Motion: Corentin Bernadou’s World of Shaders and Experimentation | Codrops They Call Me Giulio: The Making of a Cinematic Cyberpunk Portfolio | Codrops Lusion: Where Digital Craft Meets Ambitious Experimentation | Codrops The Exat Microsite: Pushing a Typography Showcase to New Creative Extremes | Codrops A Single DM, a First SOTD, and the Start of Chanh M. Ho’s Creative Journey | Codrops Creating Custom Page Transitions in Astro with Barba.js and GSAP | Codrops R—K ’26: The Thinking and Code Behind a Portfolio Led by Presence | Codrops Building the Maxima Therapy Website: React, GSAP, and Dabbling with AI | Codrops Where Engineering Meets Craft: Edoardo Lunardi’s Obsession with the Details | Codrops Animating 160,000 Cubes in Three.js to Visualize Dithering | Codrops Arnaud Rocca’s Portfolio: From a GSAP-Powered Motion System to Fluid WebGL | Codrops Where Confidence Needs No Decoration: The Malvah.Studio Story | Codrops Motion Highlights #17 | Codrops
Magnetic Commerce: Building the Dash Creative Website | Codrops
By Dash · 2026-07-21 · via Codrops

A rebrand had been on the cards for a while. We wanted something that helped us stand out. Not just look different, but own what we actually do.

That process led to a simple concept: magnetic commerce. Great digital experiences do more than inform. They draw people in. That idea shaped our new logo, with part of the D pulled inward as if by magnetic force. The emblem became the starting point for almost every design decision that followed.

Once we had that asset rendered as a rotating 3D object, the cursor interaction came naturally. The logo should behave like its concept. Drag the cursor over it and it pulls. That one detail set the tone for how we’d think about motion across the rest of the site.

The other early decision was to let iOS design inform how we handle cards and CTAs. We designed project cards as a deliberate nod towards iOS notifications: familiar, tactile, a little unexpected in context. The brand guidelines were strict. That constraint turned out to be useful. It stopped decisions from drifting and pushed us toward something more considered.

In total the project ran for a few months. The concept landed relatively quickly. Getting the content right and the animations properly refined in development: that’s where the time went.

Figma for design. The brand guidelines were tightly defined, and Figma kept everything systematic (type, spacing, components) without getting in the way of iteration.

Webflow for the build. Our own site is built on Webflow, and it made sense to use it as a proof of what’s possible on the platform for prospective clients. Most interactions live inside Webflow’s animation system.

GSAP for the parts Webflow’s native interactions couldn’t reach, particularly the more precise cursor-driven behaviours and sequencing.

Custom WebGL for the hero background. That one couldn’t live anywhere else.

The Hero Background: Distorting a Live Surface

The hero background started with a straightforward idea: use a fullscreen video as a texture and distort it in response to cursor movement. The goal was to make the background feel responsive without becoming distracting.

One thing was important from the start. We didn’t want the effect to behave like a simple ripple centred on the cursor. Instead, the distortion should continue in the direction of movement, giving the impression that the surface is being pulled rather than simply reacting to a hover state.

The Approach

The effect is implemented entirely in a fragment shader. Instead of layering effects over the video, the shader remaps the video’s texture coordinates directly. The cursor defines the area of influence, while the movement direction controls how the distortion propagates. A damped sine function generates the wave that drives the displacement.

The configurable values are defined once and passed into the renderer:

const SETTINGS = {
  radius: 0.41,
  amplitude: 0.082,
  frequency: 13,
  speed: 0.98,
  carry: 6,
  stagger: 12,
  centerPower: 2,
  verticalDampPower: 2.2,
  motionGain: 220,
  speedDecay: 0.86,
};

The geometry consists of a single fullscreen quad:

const vertices = new Float32Array([
  -1, -1, 0, 0,
   1, -1, 1, 0,
  -1,  1, 0, 1,
  -1,  1, 0, 1,
   1, -1, 1, 0,
   1,  1, 1, 1,
]);

The distortion itself happens in the fragment shader:

float maskFn(vec2 uv) {
  vec2 d = uv - uMouseSm;
  d.x *= uAspect;
  float dist = length(d);
  return pow(smoothstep(uRadius, uRadius - uSoft, dist), uCenterPow);
}

float wave = sin(
  d.y * uFreq +
  dot(d, dir) * uCarry +
  uTime * uSpeed +
  d.y * uStagger
);

d += dir * (wave * amp * maskFn(uv) * damp);

The result is an effect that responds to cursor movement without behaving like a simple hover interaction. The distortion carries momentum in the direction of travel before gradually settling.

Motion Direction and Persistence

Before values are passed to the shader, the interaction state is smoothed and decayed on the JavaScript side:

motionTarget *= SETTINGS.speedDecay;
const mappedMotion = Math.min(motionTarget * SETTINGS.motionGain, 1);

motion += (mappedMotion - motion) * SETTINGS.momentum;
dirSm.x += (dirTarget.x - dirSm.x) * SETTINGS.dirSmooth;
dirSm.y += (dirTarget.y - dirSm.y) * SETTINGS.dirSmooth;

This persistence prevents the effect from stopping as soon as the cursor does. Instead, the distortion gradually loses momentum before returning to its resting state, making the interaction feel more continuous and less mechanical.

Visual Restraint

The aim was to add movement to the hero without competing with the content. The effect sits behind the typography, adding depth while keeping the text easy to read.

The influence field uses a soft falloff rather than a hard edge, avoiding the look of a spotlight around the cursor. Vertical damping also limits how far the wave spreads, giving the distortion a more directional shape instead of expanding evenly in every direction.

The rest of the hero is deliberately simple: a black background, a full-bleed video, and the shader applied directly to the texture. Keeping everything else minimal helps keep the focus on the interaction itself.

Architecture

The structure is fairly simple.

<section id="us-sine-bg" class="hero-sine-bg">
  <video id="bgvid" class="hero-sine-bg__video" muted playsinline autoplay loop></video>
</section>

The setup consists of a hero container, a hidden video element used as the texture source, and a WebGL canvas layered above it.

From there, the renderer performs five main tasks:

  1. Prepare the video source and wait for playback.
  2. Initialise the WebGL renderer and compile the shaders.
  3. Track pointer movement and smooth the interaction state.
  4. Upload the current video frame to the GPU each frame.
  5. Render a single fullscreen pass.

The renderer doesn’t rely on a scene graph, post-processing pipeline, or additional geometry. It works with a single texture, a fullscreen quad, and a pair of shaders, making it straightforward to integrate into a production site.

Frame uploads are only performed once the video is ready:

if (video.readyState >= 2) {
  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video);
}

rafId = requestAnimationFrame(renderFrame);

The implementation keeps the render loop lightweight. Interaction values are smoothed over time, the shader only remaps UV coordinates, the canvas is limited to the hero section, and rendering doesn’t begin until the video is ready.

The same approach can be reused with different video sources, distortion profiles, or sections of a site without changing the overall structure.

Reflections

The final result feels much closer to what we wanted the site to communicate. The technical implementation came together relatively quickly. Most of the time was spent refining the motion, editing the content, and making sure both worked together.

One of the biggest challenges was knowing when to stop adding. Small adjustments to timing, easing, and copy often had more impact than introducing new effects.

Looking back, the main thing we’d approach differently is the reliance on cursor interaction. The experience changes significantly on touch devices, so that’s something we’d consider earlier in the design process rather than adapting later.

Overall, the project reinforced an idea that shaped the rebrand from the beginning: interaction works best when it supports the concept rather than drawing attention to itself.