sometimesBy
  1. probability
  2. function

Randomly applies the given function by the given probability. Similar to someCyclesBy

s("hh*8").sometimesBy(.4, x=>x.speed("0.5"))
parametertype
probability
a number between 0 and 1
function
  • function
the transformation to apply
mentioned in (1)