This is a program in witch you can draw to scriptable canvas using a custom written interpreter.
Running the .exe
will open up the interactive shell where you can enter commands directly and see the outcome.
When you reference a source code file in the arguments this code will run and you can see the outcome in the window. Tip: Try dragging a code file on the .exe
Consists of a single Natural Number (n >= 0)
0
123
424242
A string of up to 256 characters.
Has to be surrounded by Quotation marks("
).
"testing123"
A color given in its hexadecimal representation. See HTML color definitions for more detail.
#F0F
#19BD8F
#ff0
#fa5e0d
You can assign a value to an identifier. Variables persist over the whole runtime and can be reassigned using the same assignment a second time. After they are instantiated you can use them instead of a value.
var foo = "bar"
var bar = 123
var test = #ff0
To interact with the graphic canvas you can use a number of predefined functions.
-
fill(color c)
-
setPixel(int x, int y, color c)
-
setRect(int x, int y, int width, int height, color c)
-
writeText(int x, int y, int size, string text, color c)
-
getPixel(int x, int y)
-
getNoise(int x, int y)
-
getWidth()
-
getHeight()
-
getRand(int min, int max)
A bit of example code that fills the whole screen with a single color. It changes the color of a single pixel and writes "testing123" in the top left corner using a randomly chosen font size.
var background = #111
var primary = #55f
var font_size = getRandom(10, 50)
fill(background)
setPixel(20, 20, primary)
write(1, 1, font_size, "testing123", primary)
strg + s
: saves the current canvas to an image in the current directorystrg + r
: reload the imagealt + f4
: closes the window
- Add math operations
- Add control flow elements (if, while, for, ...)
- Add Save function
- Make size adjustments