Module: crab

Crab Image module

Source:

Members

(inner, constant) angryAudio :HTMLAudioElement

Audio played when the crab is angry.

Type:
  • HTMLAudioElement
Source:

(inner, constant) boop :HTMLAudioElement

Boop audio play.

Type:
  • HTMLAudioElement
Source:

(inner, constant) crab :HTMLElement

Crab image element.

Type:
  • HTMLElement
Source:

(inner, constant) crabChat :HTMLElement

Crab chat bubble element.

Type:
  • HTMLElement
Source:

(inner, constant) happyAudio :HTMLAudioElement

Audio played when the crab is happy.

Type:
  • HTMLAudioElement
Source:

(inner, constant) stomp :HTMLAudioElement

Stomp audio play.

Type:
  • HTMLAudioElement
Source:

Methods

(static) angryCrab(text)

Changes the crab's image to an angry state, displays the chat bubble with
the given text, and plays the "angry" sound.

Parameters:
Name Type Description
text string

The message to display in the crab's chat bubble.

Source:

(static) boopCrab()

Changes the crab's image to a happy state, hides the chat bubble,
and plays the "boop" sound.

Source:

(static) happyCrab(text)

Changes the crab's image to a happy state, displays the chat bubble with
the given text, and plays the "happy" sound.

Parameters:
Name Type Description
text string

The message to display in the crab's chat bubble.

Source:

(static) stompCrab(text)

Changes the crab's image to a neutral state, displays the chat bubble with
the given text, and plays the "stomp" sound.

Parameters:
Name Type Description
text string

The message to display in the crab's chat bubble.

Source: