Updated library
This commit is contained in:
parent
b81c30be48
commit
3e9cb56089
10
README.md
10
README.md
@ -37,6 +37,7 @@ npm start
|
|||||||
- `(stroke ~shape)` Strokes a shape.
|
- `(stroke ~shape)` Strokes a shape.
|
||||||
- `(fill ~rect)` Fills a shape.
|
- `(fill ~rect)` Fills a shape.
|
||||||
- `(clear ~rect)` Clears a rect.
|
- `(clear ~rect)` Clears a rect.
|
||||||
|
- `(concat ...items)`
|
||||||
- `(add ...args)` Adds values.
|
- `(add ...args)` Adds values.
|
||||||
- `(sub ...args)` Subtracts values.
|
- `(sub ...args)` Subtracts values.
|
||||||
- `(mul ...args)` Multiplies values.
|
- `(mul ...args)` Multiplies values.
|
||||||
@ -60,7 +61,7 @@ npm start
|
|||||||
- `(or a b ...rest)` Returns true if at least one condition is true.
|
- `(or a b ...rest)` Returns true if at least one condition is true.
|
||||||
- `(map fn arr)`
|
- `(map fn arr)`
|
||||||
- `(filter fn arr)`
|
- `(filter fn arr)`
|
||||||
- `(reduce fn arr ~acc)`
|
- `(reduce fn arr acc)`
|
||||||
- `(len item)` Returns the length of a list.
|
- `(len item)` Returns the length of a list.
|
||||||
- `(first arr)` Returns the first item of a list.
|
- `(first arr)` Returns the first item of a list.
|
||||||
- `(last arr)` Returns the last
|
- `(last arr)` Returns the last
|
||||||
@ -72,7 +73,7 @@ npm start
|
|||||||
- `(frame)` Returns a rect of the frame.
|
- `(frame)` Returns a rect of the frame.
|
||||||
- `(center)` Returns a position of the center of the frame.
|
- `(center)` Returns a position of the center of the frame.
|
||||||
- `(scale rect w h)`
|
- `(scale rect w h)`
|
||||||
- `(resize w h)` Resizes the canvas to target w and h, returns the rect.
|
- `(resize w h ~fit)` Resizes the canvas to target w and h, returns the rect.
|
||||||
- `(rescale w h)` Rescales the canvas to target ratio of w and h, returns the rect.
|
- `(rescale w h)` Rescales the canvas to target ratio of w and h, returns the rect.
|
||||||
- `(crop rect)`
|
- `(crop rect)`
|
||||||
- `(clone a b)`
|
- `(clone a b)`
|
||||||
@ -84,12 +85,15 @@ npm start
|
|||||||
- `(echo ...args)`
|
- `(echo ...args)`
|
||||||
- `(str ...args)`
|
- `(str ...args)`
|
||||||
- `(open path)` Imports a graphic file and resizes the frame.
|
- `(open path)` Imports a graphic file and resizes the frame.
|
||||||
- `(folder ~path)` Returns the content of a folder path.
|
- `(path ~path)` Returns the content of a folder path.
|
||||||
|
- `(folder ~path)` Returns the path of the current folder.
|
||||||
|
- `(ls ~path)` Returns the content of a folder path.
|
||||||
- `(exit ~force)` Exits Ronin.
|
- `(exit ~force)` Exits Ronin.
|
||||||
- `(time)` Returns timestamp in milliseconds.
|
- `(time)` Returns timestamp in milliseconds.
|
||||||
- `(animate ~play)` Toggles animation.
|
- `(animate ~play)` Toggles animation.
|
||||||
- `(js)` Javascript interop.
|
- `(js)` Javascript interop.
|
||||||
- `(test name a b)`
|
- `(test name a b)`
|
||||||
|
- `(benchmark fn)` logs time taken to execute a function
|
||||||
|
|
||||||
## Extras
|
## Extras
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user