Class: snowman

snowman(pos, numBalls, ballRadius)

Class containing all the information necessary for a snowmen

Constructor

new snowman(pos, numBalls, ballRadius)

snowman constructor function
Parameters:
Name Type Description
pos p5.Vector Location of the bottom of the snowman
numBalls number number of balls used to make up the snowman
ballRadius number Size of the largest ball
Source:

Methods

addArms()

gives the snowman twiggy arms
Source:

addFace()

gives the snowman a wonderful face :-)
Source:

calculateSize()

calculates the dimensions of the snowman, including all of the ball objects that make it up.
Source:

isHitBy() → {boolean}

loops through all balls to see if any of them have been hit by a snowflake
Source:
Returns:
if the snowman has been hit by a snowflake
Type
boolean

show()

draws the snowman
Source:

Documentation generated by JSDoc 3.6.3 on Sat Jun 11 2022 20:52:08 GMT+0100 (BST)