Global

Members

(constant) houses

array of house names

Source:

(constant) images

Images to preload

Source:

(constant) routes

The routes of the app

Source:

(constant) themeColor

theme colors for each house

Source:

(constant) tones

keywords of house tones

Source:

Methods

getPath()

get path to corresponding mute/unmute icon

Source:
Returns:

The path for the mute button

initialize()

Navigates to the last visited page

Source:

isMuted()

Checks if the audio is muted

Source:
Returns:

Whether the audio is muted

Navigates to the previous page

Source:

Navigates to the specified page

Parameters:
Name Type Description
to string

The section component to navigate to

attributes object

The attributes to set on the section component

Source:

randomHouse() → {string}

Get a random house from the houses array.

Source:
Returns:

A random house from the houses array.

Type
string

setBackground()

Sets the background image of the app based on the last visited page

Source:

stopAudio()

Checks if the audio should stop

Source:
Returns:

Whether the audio should stop

switchStop(i)

Sets the stopAudio state of the audio

Parameters:
Name Type Description
i *

boolean value to set stopAudio to

Source:

toggleMute()

Toggles the mute state of the audio

Source:

twinkle(injectedElement)

Add twinkling stars to the background of the page.

Parameters:
Name Type Description
injectedElement HTMLElement

The element where the stars will be injected.

Source:

wait(ms)

Wait for a specified amount of time

Parameters:
Name Type Description
ms *

time to wait in milliseconds

Source:
Returns:

A promise that resolves after the specified amount of time

Events

click - House is saved to localStorage, click sound is played, and the user is navigated to the house search page

Source:

click - When the user clicks the back button, the app navigates back to the previous page and play click sound.

Source:

click - When the user clicks the button, the house is randomly chosen and the user is navigated to the house search page.

Source:

click - When user clicks anywhere on the page, play click sound and navigate to sort-or-choose page

Source:

click - When user clicks anywhere on the page, play click sound and navigate to sort-or-choose page

Source:

click - Navigates to finish page and play click sound

Source: