Random Utils
Wrappers around Remotion’s seeded random function for common use cases.
Functions
Section titled “Functions”randomFloat(seed, min, max)
Section titled “randomFloat(seed, min, max)”Returns a floating-point number between min and max.
const opacity = randomFloat(index, 0.5, 1);randomInt(seed, min, max)
Section titled “randomInt(seed, min, max)”Returns an integer between min and max (inclusive).
const count = randomInt(index, 1, 10);anyElement(seed, array)
Section titled “anyElement(seed, array)”Returns a random element from an array.
const color = anyElement(index, ["red", "blue", "green"]);