API Docs for: 0.1.5
Show:

Hygress Class

Extends CanvasRenderer
Defined in: src\hygress.js:4

Hygress. A hy(potrochoid pro)gress visualisation.

Constructor

Hygress

(
  • [options]
)

Defined in src\hygress.js:4

Parameters:

  • [options] Object optional
    • The settings.
    • [dt=1/60] Number optional
      • The update rate in seconds.
    • [hypotrochoid] Object optional
      • The hypotrochoid settings. If none is supplied, a random one will be created.
    • [canvas] HTMLCanvasElement optional
      • The canvas to use. A new one will be created if none is supplied.
    • [clearCanvas=true] Boolean optional
      • Whether the canvas should be cleared before rendering.
    • [colourRoll=true] Boolean optional
      • Whether the colour should continuously change (rainbow).
    • [hue=0.0] Number optional
      • The hue in degree.
    • [saturation=100.0] Number optional
      • The saturation in percent.
    • [luminance=50.0] Number optional
      • The luminance in percent.
    • [opacity=0.75] Number optional
      • The initial opacity.
    • [scale=1.0] Number optional
      • The initial scale.
    • [transitionTime=0.25] Number optional
      • The initial transitionTime.
    • [size] Array optional
      • The canvas size.

Methods

draw

() private

Defined in src\hygress.js:501

Draws the hypotrochoid.

update

(
  • elapsed
)
private

Defined in src\hygress.js:431

Updates the animation.

Parameters:

  • elapsed Number
    • The elapsed time since the last frame in milliseconds.

Properties

_opacity

Number private

Defined in src\hygress.js:49

The internal opacity transition values.

_scale

Number private

Defined in src\hygress.js:65

The internal scale transition values.

colourRoll

Boolean

Defined in src\hygress.js:245

The hypotrochoid's colour roll flag.

ht

Hypotrochoid private

Defined in src\hygress.js:30

The internal hypotrochoid instance.

htSize

Number

Defined in src\hygress.js:189

The hypotrochoid's size.

hue

Number

Defined in src\hygress.js:268

The hypotrochoid's hue in degree.

Hypotrochoid

Object final static

Defined in src\hygress.js:518

Predefined hypotrochoids.

hypotrochoid

Object

Defined in src\hygress.js:135

The hypotrochoid. Assigning a new object only overwrites the defined fields and keeps the other ones.

lineWidth

Number

Defined in src\hygress.js:337

The line width of the hypotrochoid.

luminance

Number

Defined in src\hygress.js:314

The hypotrochoid's luminance in percent.

opacity

Number

Defined in src\hygress.js:360

The opacity of the hypotrochoid. Valid values: 0.0 to 1.0.

Setting the opacity to a new value triggers a gradual change towards the target value. The transition is linear and depends on the transitionTime variable.

origin

Array

Defined in src\hygress.js:219

The hypotrochoid's origin.

Example:

[x, y]

saturation

Number

Defined in src\hygress.js:291

The hypotrochoid's saturation in percent.

scale

Number

Defined in src\hygress.js:395

The scale of the hypotrochoid. Valid values: 0.0 to 1.0.

Setting the scale to a new value triggers a gradual change towards the target value. The transition is linear and depends on the transitionTime variable.

size

Array

Defined in src\hygress.js:151

The size of the internal canvas.

Example:

[width, height]

transitionTime

Number

Defined in src\hygress.js:40

The transition time.

visible

Boolean private

Defined in src\hygress.js:83

Visible flag, used to determine if the hypotrochoid should be drawn this frame.