Docs/Efectos

Time Trail

MIT

An Echo-style temporal trail — whatever moves sheds a smooth, decaying long-exposure ghost trail (frame-difference Motion mode works on opaque images and video; Alpha mode trails a shape's coverage), with optional zoom-feedback tunnels and rainbow light-painting

Cargando shader…

Ajústalo

0.06
0.6
1
1
0
0
1

Instalación

Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-time-trail.json

Crea components/bastard/ShaderTimeTrail.tsx e instala shaders. Más opciones

Uso

Demo.tsx
1import ShaderTimeTrail from '@/components/bastard/ShaderTimeTrail';
2
3export default function Demo() {
4 return (
5 <ShaderTimeTrail
6 trailSource="motion"
7 motionThreshold={0.06}
8 trailLength={0.6}
9 diffusion={1}
10 trailOpacity={1}
11 trailBlend="normal"
12 driftX={0}
13 driftY={0}
14 zoom={1}
15 tintMode="none"
16 />
17 );
18}

Props

PropTipoPor defectoDescripción
trailSource'motion' | 'alpha'"motion"Source
motionThresholdnumber0.06Motion Threshold
trailLengthnumber0.6Trail Length
diffusionnumber1Diffusion
trailOpacitynumber1Trail Opacity
trailBlend'normal' | 'add' | 'screen' | 'multiply' | 'overlay' | 'softLight' | 'hardLight' | 'darken' | 'lighten' | 'colorDodge' | 'colorBurn' | 'linearBurn' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity'"normal"Blend
driftXnumber0Drift X
driftYnumber0Drift Y
zoomnumber1Zoom
tintMode'none' | 'color' | 'rainbow'"none"Tint Mode

Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.

Créditos

Basado en Time Trail · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.