[oden] Finish colors and cleanup
This commit is contained in:
parent
2322493efd
commit
ab91fcfc53
3 changed files with 33 additions and 5 deletions
|
|
@ -11,6 +11,31 @@ export function cls(r: number, g: number, b: number) {
|
|||
core.cls(r, g, b);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the current drawing color. This is the fill color for shapes that have
|
||||
* both stroke and fill.
|
||||
*
|
||||
* @param r - The red component of the color, from 0 to 1.
|
||||
* @param g - The green component of the color, from 0 to 1.
|
||||
* @param b - The blue component of the color, from 0 to 1.
|
||||
* @param a - The alpha (transparency) of the color, from 0 (transparent) to 1 (opaque)
|
||||
*/
|
||||
export function color(r: number, g: number, b: number, a: number = 1) {
|
||||
core.color(r, g, b, a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the current stroke color, for shapes that have a stroke.
|
||||
*
|
||||
* @param r - The red component of the color, from 0 to 1.
|
||||
* @param g - The green component of the color, from 0 to 1.
|
||||
* @param b - The blue component of the color, from 0 to 1.
|
||||
* @param a - The alpha (transparency) of the color, from 0 (transparent) to 1 (opaque)
|
||||
*/
|
||||
export function stroke(r: number, g: number, b: number, a: number = 1) {
|
||||
core.stroke(r, g, b, a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a message to the console.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue