Home Reference Source

References

summary
public

Common methods and properties of all Divisions.

public

Convert a hexadecimal color string to an rgb() string.

public

F findGreaterNumber(a: *, b: *): *

public

F generateCanvas(document: object, id: string, dimensions: object)

Creates a canvas element and append it to the document body.

public

F generateColor(seedMultiplier: number, seed: number): ...ColorObject

Generates a color object from a modified seed using the tinycolor2 library.

public

F generateCount(limit: number, seedMultiplier: number, seed: number): number

Generates a number used for decision making based on the seed and a given multiplier.

public

F generateSeed(seedString: string): *

Generate the seed from a seed string.

public

Generates a seed multiplier converting the characters of the provided string to numbers name.

public

Gets the last digit from a number.

public

F hexToRgb(hex: string): {r: number, b: number, g: number}

Turn a hexadecimal color string into an rgb() object.

public

F modifySeed(seed: number, seedMultiplier: number): number

Modify a seed by multiplying it by a value.

public

Takes an aspect ratio string, e.g.: 1:2, 2:3, 3:5, and returns an object with height (h) and width (w) keys.

public

F pseudoShuffle(arr: Array, seed: number): Array

Shuffles an array predictably using the Fisher Yates shuffle algorithm.

public

F randomHex(seed: number, seedModifier: number): string

Generate a random hex color based on the seed.

public

Turn an aspect object into more realistic dimensions.

public

V settings: {flagHeight: number, seed: boolean, flagWidth: number}

The project settings for the current run of the Flag generator.

public

A color object.

divisions

summary
public

C Bend

Bends pattern.

public

C Border

Border pattern.

public

C Canton

Canton pattern.

public

Chevron pattern.

public

C Cross

Cross pattern.

public

C Fesses

Fesses pattern.

public

C Fusil

public
public

C Pales

Pales pattern.

public

C Pall

Pall pattern.

public

Saltire pattern.

Directories