MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / getAttr

Function getAttr

src/content/TextAnimations/TextPressure/TextPressure.jsx:11–14  ·  view source on GitHub ↗
(distance, maxDist, minVal, maxVal)

Source from the content-addressed store, hash-verified

9};
10
11const getAttr = (distance, maxDist, minVal, maxVal) => {
12 const val = maxVal - Math.abs((maxVal * distance) / maxDist);
13 return Math.max(minVal, val + minVal);
14};
15
16const debounce = (func, delay) => {
17 let timeoutId;

Callers 1

animateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected