Please enable JavaScript to use CodeHS

Indiana Computer Science: 8th Grade Glossary

Flashcards

Course:

Module:

Lesson:

Search:

`fill()` JavaScript

Sets the color used to fill shapes.

`fill(red, green, blue)` JavaScript

Sets the color used to fill shapes using RGB values.

`fill(grayscale)` JavaScript

Sets the color used to fill shapes to a grayscale value.

`stroke()` JavaScript

Sets the color used to draw lines and borders around shapes.

`stroke(grayscale)` JavaScript

Sets the color used to draw lines and borders around shapes to a grayscale value

`stroke(red, green, blue)` JavaScript

Sets the color used to draw lines and borders around shapes using RGB values

`noStroke()` JavaScript

Disables drawing the stroke (outline)

RGB Color Model JavaScript

A color model in which red, green, and blue light are added together in various ways to reproduce a color

Hex Color JavaScript

A way of representing a color from various color models using hexadecimal values

Color Palette JavaScript

A collection of colors used together in one medium

Declare a Variable JavaScript

Declaring a variable is defining it for the first time.

Declare a Variable

Variable General

A symbol or container that holds a value.

variable

Initialize a Variable JavaScript

Initializing a variable is giving it an initial value.

System Variable JavaScript

A built-in variable provided by p5.js

`width` JavaScript

System variable that stores the width of the drawing canvas. This value is set by the first parameter of the `createCanvas()` function.

`height` JavaScript

System variable that stores the height of the drawing canvas. This value is set by the second parameter of the `createCanvas()` function.

Animation General

A form of art that rapidly displays a sequence of still images to create an illusion of movement

Frame General

A single image in a sequence of pictures

Frame Rate (Frames Per Second) JavaScript

The rate at which consecutive frames are captured or displayed

frameRate(fps) JavaScript

Specifies the number of frames to be displayed every second

frameCount JavaScript

A p5.js system variable that contains the number of frames that have been displayed since the program started

Color Gradient General

A gradual blend of one color to another.

Shape Transformations General

The changes done in the shapes on a coordinate plane by scaling, translating, or rotating.

Translation General

Slides or moves the shape

Scale (Dialation) JavaScript

Expands or contracts the shape

Degree JavaScript

A measurement of a plane angle in which one full rotation is 360 degrees

Radian General

The SI unit for measuring angles

`translate(x, y)` JavaScript

Sets the amount to shift the origin of the canvas. The x parameter specifies left/right translation, the y parameter specifies up/down translation.

`rotate(angle)` JavaScript

Rotates a shape by the amount specified by the angle parameter

`scale(percent)` JavaScript

Increases or decreases the size of a shape by expanding or contracting vertices.

Rotation General

Rotates or turns the shape around an axis

mouseX JavaScript

A system variable that contains the current horizontal position of the mouse

mouseY JavaScript

A system variable that contains the current vertical position of the mouse

mouseButton JavaScript

A system variable that tracks of which mouse button is pressed. Its value can be either LEFT, RIGHT, or CENTER depending on which button was pressed last

`key` JavaScript

A system variable that contains the value of the most recent key on the keyboard that was typed

`keyIsDown(keycode)` JavaScript

Checks if a given key is currently down

`keyIsPressed` JavaScript

A system variable that returns `true` if any key is pressed and `false` is no keys are pressed

Key Codes JavaScript

Numeric values that correspond to physical keys on the keyboard

setup() JavaScript

Called once when the program starts and is used to define the initial environment properties.

draw() JavaScript

Continuously executes the lines of code contained inside its block until the program is stopped.

createCanvas(width, height) JavaScript

Creates a canvas element in the document and sets the dimensions of it in pixels.

ellipse(x, y, w, [h]) JavaScript

Draws an ellipse to the screen given the x, y coordinate and the width and height (height is optional).

rect(x, y, w, [h]) JavaScript

Draws a rectangle to the screen given the x, y coordinate and the width and height (height is optional).

line(x1, y1, x2, y2) JavaScript

Draws a line (direct path between two points) to the screen. The first two parameters x1, y1 control the position of the first point and the last two parameters x2, y2 control the position of the second point.