CSE 5J Lecture Notes - Lecture 3: Carriage Return, Bracket, Frame Rate
Document Summary
Cmps 5j - lecture #3 - void draw, void setup, functions and system variables. The void return type is one that carries out the code but doesn"t have a value. In this lecture, we learn four functions of void: setup , draw , keypressed , and returned. mousepressed . The setup function is used once at the very beginning of a program. This function is used to set certain blocks of code in stone. For example, the size of the window size or the color of the background (ex. Example 1: void setup void setup(){ size(300,300); background(100); The draw function is function that is repeated continuously at a default rate of 30. This function allows us to create animations as the code is repeated. frames per second. We can change the frame rate but we will touch on this later on.