GDP Functions


Position

Rotation

Scale

Collision

Appearance

Timers

Animation

Attributes

Miscellaneous

Appearance

.toggleVisible()

The function .toggleVisible() will change an object's visibility. In other words, if an object is visible, .toggleVisible() will make it invisible. If an object is not visible, .toggleVisible() will make it visible. .toggleVisible() takes in no parameters.

object.toggleVisible();    
//changes the visibility of 'object'

See Further:

  1. Hiding Ninja
  2. Ninja Supplies

.visible()

The function .visible() sets whether or not an object is visible. The function takes in one parameter, true or false, to set the visibility. The function can also return whether an object is visible.

object.visible(true);    
//makes 'object' visible

See Further:

  1. Whack a Ninja
  2. Zapper Part 1

.fill()

The function .fill() will fill in an object with a specified color. The function makes use of hexadecimal colors to achieve this. .fill() accepts a single string containing a ‘#’ symbol, followed by the six digit hexadecimal color that the object will be filled with.

object.fill("#00fafa");    
    //fills in the 'object' with the color 00fafa

See Further:

  1. Rain Catcher Part 6
  2. Color Picker
  3. RGB and Hex Picker