rGradient function
returns a rounded, length n
array of Vector3 colours. colours are between color1
and color2
, and are spaced according to the easing function easeFn
.
Implementation
List<List<num>> rGradient(
Function ease, num n, List<num> color1, List<num> color2) =>
gradient(ease, n, color1, color2)
.map((color) => color.map((c) => c.round()).toList())
.toList();