
Concept explainers
a)
To create an object constructor of bubble class, which has two arguments size which specifies the radius of the bubble and img property which specifies the URL of the image, setting the radius property to the value of argument size.
b)
To declare the imageURL and setting the value of the imgargumentto the imageURL within theobject constructor function.
c)
To declare the xVelocity and yVelocity propertyto store the horizontal and vertical velocity within the object constructor function.
d)
To declare the xPos and yPos property for storing the horizontal and vertical position within the object constructor function.
e)
To declare the opacity property and setting its value to 1 within the object constructor function.
f)
To declare the hue property and setting its value to 0 within the object constructor function.
g)
To declare the rotate property and setting its value to 0 within the object constructor function.
h)
To declare the rotateDirection property and setting its value to 1 within the object constructor function.

Want to see the full answer?
Check out a sample textbook solution
Chapter 14 Solutions
New Perspectives on HTML and CSS
- New Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage LearningNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
