This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Marc Krenn
Posted Nov 05 - Read on Facebook

Hey Frameristos,

Finally had some time to fix, clean up and wrap my solution for
Black Ray's problem (https://www.facebook.com/groups/framerjs/permalink/752983684828705/) into a module:

"Utils.randomND(from,to,deviation,mean,amplitude)" returns a "Normally Distributed" random number - think Bell-Curve - where some numbers are more likely to be returned than others. Please see and play around with the provided randomNDExample.

Live Demo: http://share.framerjs.com/735sihwa9db4/
Github: https://github.com/marckrenn/framer-randomND

Probs to Chris Camargo, Jordan Robert Dobson and stackoverflow’s user5084.

5 Comments

Marc Krenn

A reworked version of this function (Utils.randomNumberbiased) is now part of the "ease"-Module: https://github.com/marckrenn/framer-ease

Koen Bok

Wow this is really cool. I'm a sucker for math like this.

Andrew Nalband

Awesome!

Marc Krenn

Thanks! I've updated the module to handle larger offsets better. I'd say it's pretty robust now :)

Jonathon Toon

cc Jérôme Cukier

Read the entire post on Facebook