Let's keep going down this rabbit hole of functions I've created. We have called a function that does not exist yet:
cloudCall. This function takes the cloud elements, detects the size class we have added, and uses it to determine how fast the cloud should move across the screen. We are going to create an assumption in our parallax 3D effect that the bigger objects are closer and will therefore move faster through the viewport than the slower clouds. The function takes a variable we will identify here as
clouds. Take the
classList array, and we will operate on it. Start the function by looping through the clouds'
For each one, use a switch and case test for the Font Awesome class to determine ...