-
Notifications
You must be signed in to change notification settings - Fork 0
0I Drawing gradients to the canvas
Luis Murillo Baltodano edited this page Sep 4, 2020
·
6 revisions
gradient {
x Number
y Number
radious Number > 0
colors []CanvasColorString
}
render(myGradientObject).gradient()
preset(({size, draw, clear, c, render}) => {
size()
const myGradientObject = {
x: c.width / 2,
y: c.height / 2,
radious: c.width / 2,
colors: ['#cc2b5e', '#753a88']
}
draw(() => {
clear()
render(myGradientObject).gradient()
})
})