Home Manual Reference Source Test
import TickEntry from '@statetree/ticker/lib/TickEntry.js'
public class | source

TickEntry

Tick Entry is a wrapper to the function we want to execute later in request animation frame or event cycle

Example:

import Ticker from 'ticker'
let tickEntry = new TickEntry(context,listener,callback,priority);

Test:

Constructor Summary

Public Constructor
public

constructor(func: Function, context: Object, priority: number)

Member Summary

Public Members
public
public
public
public
public

Method Summary

Public Methods
public

dispose(): void

This function dispose the tickEntry references for garbage collection

public

executeAsSmallLoopsInCycle(maxLoopPerFrame: number, endIndex: number, startIndex: number): void

This function adds the loop function to event cycle / request animation frame for execution

public

executeInCycle(): void

This function adds the func to event cycle / request animation frame for execution

public

onDone(doneCallback: *): *

public

onError(errorCallback: *): *

Public Constructors

public constructor(func: Function, context: Object, priority: number) source

Params:

NameTypeAttributeDescription
func Function
context Object

The "this" argument for the func.

priority number

Public Members

public context: Object source

public executionCount: number source

public func: Function source

public notifier: * source

public priority: number source

Public Methods

public dispose(): void source

This function dispose the tickEntry references for garbage collection

Return:

void

Test:

public executeAsSmallLoopsInCycle(maxLoopPerFrame: number, endIndex: number, startIndex: number): void source

This function adds the loop function to event cycle / request animation frame for execution

Params:

NameTypeAttributeDescription
maxLoopPerFrame number

indicates loop length that needs to be executed in single frame or tick.

endIndex number

indicates loop end value

startIndex number

indicates loop begining value , default value is 0

Return:

void

Test:

public executeInCycle(): void source

This function adds the func to event cycle / request animation frame for execution

Return:

void

Test:

public onDone(doneCallback: *): * source

Params:

NameTypeAttributeDescription
doneCallback *

Return:

*

public onError(errorCallback: *): * source

Params:

NameTypeAttributeDescription
errorCallback *

Return:

*