title
A prototype
body{ background:#222; } .mouse { width: 50px; height:50px; background-color:white; position:fixed; }
const d = document, b = d.body limitDistance = 500, autoPlayTime = 1000 const draggable = document.querySelector('.mouse'); let lastMove = 0; function updateMouse (x, y) { draggable.style.left = x+"px" draggable.style.top = y+"px" } function render (a) { const noiseX = (noise.simplex3(2, 0, a*0.00008) + 1) / 2; const noiseY = (noise.simplex3(10, 0, a*0.00008) + 1) / 2; const x = noiseX * innerWidth; const y = noiseY * innerHeight; updateMouse(x, y); requestAnimationFrame(render); } requestAnimationFrame(render);
snap
save
new
fork
download
html
css
js
output
gallery
config
➚ link to output
➚ snap player
font size
live reload
snap mode
layout
⤷ switch
★ info and code