JavaScript30 day 16: CSS text shadow mouse move effect

Today’s challenge was to animate the text-shadow of a word. offsetX, affsetY and a bit of maths was all that was needed.

Notes

const width = hero.offSetWidth;
const height = hero.offsetHeight;

becomes:

const { offsetWidth: width, offsetHeight: height } = hero;

The source is available at github and the live version is here.