Module: Types

Data types & DDOs used in the application
Author:
  • Radim Brnka
Source:

Type Definitions

COLOR_THEME

Color theme
Type:
  • Object
Properties:
Name Type Description
ACCENT_COLOR string
BG_COLOR string
Source:

COMPLEX

The complex number c=x+yi as [x, yi], used as C in Julia or Pan in general.
Type:
  • Array.<number>
Properties:
Name Type Description
0 number The real part.
1 number The imaginary part.
Source:

DIVE

Dive is a special animation loop that first animates cx in given direction and when it reaches set threshold, then it will start animating cy in given direction until its threshold is also hit. Then it loops in the opposite direction. If phases are defined, it follows their order.
Type:
  • Object
Properties:
Name Type Attributes Description
cxDirection number Use -1/+1 for negative/positive direction of the animation
cyDirection number Use -1/+1 for negative/positive direction of the animation
phases PHASES <optional>
1: animate cx toward dive.endC[0], 2: animate cy toward dive.endC[1], 3: animate cx back toward dive.startC[0], 4: animate cy back toward dive.startC[1]
pan COMPLEX
startC COMPLEX
endC COMPLEX
zoom number
step number
Source:

JULIA_PALETTE

Color palette defined by inner stops
Type:
  • Object
Properties:
Name Type Attributes Description
theme Array.<number, number, number, number, number> 5 innerStops of RGB colors defining the Julia palette
id string Identifier / title
keyColor string <optional>
Main theme color. If not set, 3. innerStop's color is used. Use hex #rrggbb notation.
Source:

JULIA_PRESET

Julia-specific presets
Type:
  • Object
Properties:
Name Type Attributes Description
id number <optional>
If present, helps unique demo rotation
c COMPLEX
zoom number
rotation number <optional>
pan COMPLEX
title string <optional>
HTML element title (on hover)
Source:
See:
  • MANDELBROT_PRESET

MANDELBROT_PRESET

Mandelbrot-specific presets
Type:
  • Object
Properties:
Name Type Attributes Description
id number <optional>
If present, helps unique demo rotation
zoom number
rotation number <optional>
pan COMPLEX
title string <optional>
HTML element title (on hover)
Source:
See:
  • JULIA_PRESET

PALETTE

Color palette [R, G ,B] (0-1)
Type:
  • Array.<number>
Properties:
Name Type Description
0 number Red
1 number Green
2 number Blue
Source:

PHASES

Quad array of phase order for a DIVE.
Type:
  • Array.<number>
Properties:
Name Type Description
0 number 1st phase
1 number 2nd phase
2 number 3rd phase
3 number 4th phase
Source:

PRESET

Preset is an object containing properties of specific point in the fractal on the scene.
Type:
  • Object
Source:

URL_PRESET

URL Preset is an object containing properties of specific point in the fractal on the scene compatible with URL encoding.All array values (pan, c) are expanded
Type:
  • Object
Properties:
Name Type Attributes Description
mode FRACTAL_TYPE Defaults to FRACTAL_TYPE.MANDELBROT
px number | null <optional>
panX
py number | null <optional>
panY
cx number | null <optional>
Julia only
cy number | null <optional>
Julia only
zoom number | null <optional>
r number | null <optional>
rotation
Source: