Module: UI

Contains code to manage the UI (header interactions, buttons, infoText update, etc.).
Author:
  • Radim Brnka
Source:

Members

(inner) headerVisible :boolean

Type:
  • boolean
Source:

Methods

(static) enableMandelbrotMode()

Implemented in a way it's not needed to be called at the first render. Everything should be pre-initialized for Mandelbrot mode.
Source:

(static) initUI(fractalRenderer)

Initializes the UI and registers UI event handlers
Parameters:
Name Type Description
fractalRenderer
Source:

(static) parseUserInput(input) → {PRESET|Object}

Parses a string of the form: p = [, i] c = [, i] zoom = r = and returns an object with the parsed numbers. If a part is invalid or missing, an error message is returned.
Parameters:
Name Type Description
input string The input string.
Source:
Returns:
Type
PRESET | Object

(static) resetActivePresetIndex()

This needs to happen on any fractal change
Source:

(static) resetAppState()

Resets buttons, active presets and URL
Source:

(static) startJuliaDive(dives, index) → {Promise.<void>}

Starts the Julia dive infinite animation
Parameters:
Name Type Description
dives Array.<DIVE>
index number Index of the dive
Source:
Returns:
Type
Promise.<void>

(static) switchFractalMode(mode, presetopt)

Switches among fractal modes
Parameters:
Name Type Attributes Description
mode FRACTAL_TYPE
preset PRESET <optional>
If present, it's set as the default state through travelToPreset
Source:

(static) switchFractalModeWithPersistence(mode) → {Promise.<void>}

Switches among fractal modes but keeps the c/pan settings so the fractals match each other.
Parameters:
Name Type Description
mode FRACTAL_TYPE
Source:
Returns:
Type
Promise.<void>

(static) toggleDebugLines()

Toggles x/y axes
Source:

(static) toggleDemo() → {Promise.<void>}

Turns demo on/off and/or stops current animation
Source:
Returns:
Type
Promise.<void>

(static) toggleHeader(show)

Shows/hides/toggles header.
Parameters:
Name Type Description
show boolean | null Show header? If null, then toggles current state
Source:

(static) travelToPreset(presets, index) → {Promise.<void>}

Travels to preset at given index
Parameters:
Name Type Description
presets Array.<PRESET>
index number Preset array index
Source:
Returns:
Type
Promise.<void>

(static) updateColorTheme(paletteopt)

Updates color scheme
Parameters:
Name Type Attributes Description
palette PALETTE <optional>
defaults to the fractal palette
Source:

(static) updateInfo()

Updates the bottom info bar
Source:

(inner) exitAnimationMode()

Enables controls, resets demo button
Source:

(inner) initAnimationMode()

Disables controls, activates demo button
Source:

(inner) initCommonButtonEvents()

Inits behavior common for all buttons
Source:

(inner) initDebugMode()

Inits debug bar with various information permanently shown on the screen
Source:

(async, inner) startJuliaDemo()

Starts the Julia demo
Source:

(async, inner) startMandelbrotDemo()

Starts the Mandelbrot demo
Source: