Skip to content

Utils.modulate can use an array to clamp#471

Open
florianpeninon wants to merge 1 commit intokoenbok:masterfrom
florianpeninon:utils-modulate-double-limit
Open

Utils.modulate can use an array to clamp#471
florianpeninon wants to merge 1 commit intokoenbok:masterfrom
florianpeninon:utils-modulate-double-limit

Conversation

@florianpeninon
Copy link
Copy Markdown

A simple tweak I've been using to create some common UI effect (PTR on a header, expandable header with some kind of overdrag).

Utils.modulate can use boolean or an array of two booleans as limit value.

Utils.modulate(value, [fromLow, fromHigh], [toLow, toHigh], [limitLow, limitHigh])

Example: https://framer.cloud/OduGh/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant