FlareJS
Welcome to Flare.js!
Constructor Summary
Public Constructor | ||
public |
Member Summary
Public Members | ||
public |
eventHandlers: *[] |
|
public | ||
public |
Method Summary
Public Methods | ||
public |
destroy() Destroy FlareJS and remove all EventHandlers; |
|
public |
reset() Reset FlareJS to add EventHandlers to new Elements |
|
public |
start() Start FlareEffects and reset all Backgrounds |
|
public |
stop() Stop FlareEffects and reset all Backgrounds |
|
public |
toggle() Toggle start() and stop() of the FlareJS instance |
Private Methods | ||
private |
addFlareEvents(glowObject: object) Add MouseMove and MouseLeave EventHandler to the given glowObject |
|
private |
generateGradientString(x: number, y: number, background: string): string Generates |
|
private |
handleFlareEvent(event: event, glowObject: object) Handle the MouseMove Event |
|
private |
Initial All FlareEffects |
|
private |
resetBackground(glowObject: object) Set the Elements background to its default Value |
Public Constructors
public constructor() source
Public Members
public eventHandlers: *[] source
Public Methods
public destroy() source
Destroy FlareJS and remove all EventHandlers;
public reset() source
Reset FlareJS to add EventHandlers to new Elements
public start() source
Start FlareEffects and reset all Backgrounds
public stop() source
Stop FlareEffects and reset all Backgrounds
public toggle() source
Toggle start() and stop() of the FlareJS instance
Private Methods
private addFlareEvents(glowObject: object) source
Add MouseMove and MouseLeave EventHandler to the given glowObject
Params:
Name | Type | Attribute | Description |
glowObject | object | Object containing the Element and its default background |
private generateGradientString(x: number, y: number, background: string): string source
Generates
Return:
string |
private handleFlareEvent(event: event, glowObject: object) source
Handle the MouseMove Event
Params:
Name | Type | Attribute | Description |
event | event | MouseMove Event to calculate x and y |
|
glowObject | object | Object containing the Element and its default background |
private initFlares() source
Initial All FlareEffects