Starting workshop

This commit is contained in:
Devine Lu Linvega
2019-07-25 12:30:35 +09:00
parent 0cf6403f03
commit 2bad8c3568
2 changed files with 83 additions and 6 deletions

View File

@@ -93,6 +93,10 @@ function Library (ronin) {
ronin.surface.fill(rect, color)
return rect
}
this.gradient = (line, colors = ['white', 'black']) => {
return ronin.surface.linearGradient(line.a.x, line.a.y, line.b.x, line.b.y, colors)
}
this.clear = (rect = this.frame()) => { // Clears a rect.
ronin.surface.clear(rect)
@@ -144,12 +148,6 @@ function Library (ronin) {
return getComputedStyle(el).getPropertyValue(`--${variable}`)
}
// Gradients
this.gradient = (line, colors = ['white', 'black']) => {
return ronin.surface.linearGradient(line.a.x, line.a.y, line.b.x, line.b.y, colors)
}
// Pixels
this.pixels = (rect, fn, q) => {