Thread Kink
The deflection is a tent rather than a bell, because a string under constant tension has nowhere to put the load and meets itself in a corner.
The scene in this preview is the file shown here. The surrounding demo shell only provides context and is not part of the copied code.
"use client";
import * as React from "react";
import * as THREE from "three";
/**
* Thread Kink — a pulled string kinks, it does not bulge.
*About this effect
An interactive backdrop for a panel, a hero or a section that wants the pointer to have consequences. Nearly every version of this pulls its threads toward the cursor with a Gaussian, and the result reads as a gradient with lines painted on it, because a soft round bulge is the shape of a bell curve and not the shape of a string. A line under tension displaced at one point has nowhere to put the load — the tension is constant along its length, so the deflection is linear on both sides of the contact and the strand meets itself in a kink. That is what a plucked string looks like and what the eye already knows, so the profile here is a tent, and everything else falls out of having got that one function right: threads nearer the pointer are gripped harder, so the field gathers into a V instead of blistering, and the gathered strands take the accent so the kink reads as the place the hand is. The release is an exponential approach rather than a spring, because a string let go arrives at its rest line and does not overshoot it. Line width is divided through by the per-pixel derivative, so a strand weighs the same wherever it is and at whatever size the frame is given. It paints every pixel, so it reads the inherited text colour to decide which way round the page is and then commits — light thread on a deep ground, or ink on a pale one.
Related effects
- Orbit TilesA Fibonacci lattice for the placement and a screen-space axis for the drag, so there is no ring to close and no orientation the gesture behaves differently in.
- Aurora CurtainRays that arrive where a sampled sheet folds end-on, so no line of code decides where a ray belongs.
- Molten MirrorA four-number room sampled through a bent view direction, so every highlight is a reflection rather than a painted one.