Files
js-util/dist/CSSRandom.js
T
sugoidogo 4fe053c324
Release / release (push) Successful in 2m6s
clean up project for use with npm install
2025-12-15 19:48:56 -08:00

8 lines
258 B
JavaScript

/**
* On import, sets the global css variable `--random` to `Math.random()` before each draw
* @module CSSRandom
*/
(function CSSRandom() {
document.documentElement.style.setProperty('--random', Math.random())
requestAnimationFrame(CSSRandom)
})()