gradientStyle()
gradientStyle()
changes the look of the sketch by selecting a different gradient from the gradients array.
gradientStyle(index)
index
: Index of desired gradient in thegradients
array
Nothing
After running the following code, currentGradient
= 'ghi'
.
let gradients = [
'abc',
'def',
'ghi'
];
gradientStyle(2);