1 Overview
This manual consist of 3 sections. This first section contains a "cheat sheet" that makes it easy to find where a function is documented. The second section is the reference manual, where each function is described in details. The reference section contains small examples. The third section contains more elaborate examples.
Color
Setting | stroke no-stroke fill no-fill background color-mode |
Creating and Reading | color
red
green
blue
alpha
hue saturation brightness lerp-color |
Input
Coordinates | mouse-x mouse-y pmouse-x pmouse-y |
Buttons | mouse-button mouse-pressed |
Events | on-mouse-dragged
on-mouse-moved on-mouse-pressed on-mouse-released on-resize |
Keys | key key-pressed |
Keyboard Events | on-key-pressed
on-key-released |
Time and Date | year month day hour minute second millis |
Environment
Size | size width height fullscreen |
Smoothing | smoothing no-smooth |
Frames | frame-count frame-rate set-frame-rate! |
Mouse | cursor no-cursor focused |
Other | nap |
Shape
Curves | bezier |
Modes | ellipse-mode rect-mode |
Stroke | stroke-cap stroke-join stroke-weight |
Vertex | vertex begin-shape end-shape |
Image
Image | image
create-image load-image save-image image-mode load-pixels set-pixel update-pixels |
Typography
Transform
Transform | rotate
scale
translate
shear-x shear-y push-matrix pop-matrix |
Math
Operators | modulo
remainder
quotient
+= -= *= /= ++ -- |
Calculation | abs ceil constrain dist exp floor lerp log mag max min norm pow random remap round sq sqrt |
Trigonometry | cos
sin
tan
acos
asin
atan
atan2
radians degrees |
Conversion | int char binary unbinary hex unhex |
Constants | pi π pi/2 π/2 pi/4 π/4 2pi 2π |
Noise | noise simplex-noise |