Home Reference Source
public class | source

Pales

Extends:

Division → Pales

Pales pattern.

Constructor Summary

Public Constructor
public

constructor(count: number, gapPercentage: number, color: string)

Instantiates a Pales pattern.

Member Summary

Public Members
public

Method Summary

Public Methods
public

draw(ctx: *, containerWidth: *, containerHeight: *, gapPercentage: *)

Inherited Summary

From class Division
public

color: *

public

count: *

public

limit: *

public

seed: *

public

Public Constructors

public constructor(count: number, gapPercentage: number, color: string) source

Instantiates a Pales pattern.

Override:

Division#constructor

Params:

NameTypeAttributeDescription
count number

The number of Pales in this instance.

gapPercentage number

A whole number representing a percentage of the containerWidth. Used to place gaps during draw time.

color string

A hexadecimal color string.

Example:

// Instantiates a Pales pattern.
const pales = new Pales()

TODO:

  • The count limit of 3 is only here because I can't figure out a way to make 4 consistently look good. It always comes out like a rainbow or a monochrome step.

Public Members

public gapPercentage: * source

Public Methods

public draw(ctx: *, containerWidth: *, containerHeight: *, gapPercentage: *) source

Params:

NameTypeAttributeDescription
ctx *
containerWidth *
  • optional
containerHeight *
  • optional
gapPercentage *
  • optional