Programming Cheat Sheet

ADVERTISEMENT

rect(x, y, w, h)
line(x1, y1, x2, y2)
bezier(x1, y1, cx1, cy1, cx2, cy2, x2,
y2)
ellipse(x, y, w, h)
point(x, y)
quad(x1, y1, x2, y2, x3, y3, x4, y4)
triangle(x1, y1, x2, y2, x3, y3)
arc(x, y, w, h, start, stop)
image(image, x, y)
background(r, g, b)
stroke(r, g, b)
color(r, g, b)
fill(r, g, b)
strokeWeight(thickness)
noFill()
noStroke()
text(text, x, y)
textFont(font, size)
textSize(size)
mouseX, mouseY
var mouseClicked = function() { };
var mousePressed = function() { };
mouseIsPressed
var mouseMoved = function() { };
var mouseReleased = function() { };
var keyPressed = function() { };
keyCode
keyIsPressed
random(low, high)
abs(num)
cos(deg)
dist(x1, y1, x2, y2)
log(num)
sin(deg)
pow(num, exponent)
tan(deg)
var drawWinston = function() { };
while (x < 250) { ... }
var array = [0, 1, 2, 3, 4];
if (x < 20) { ... }
for (var i = 0; i < 8; i += 1) { }
debug(arg1, arg2, ...)

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go