Skip to main content

RenderQueue

RenderQueue

Utility class to help cut down on render times by grouping together render calls into a single call by adding them to a queue and only rendering once every 'requestAnimationFrame' time (usually 60fps).


Constructor

public RenderQueue

new RenderQueue(renderFunction, options)

Constructor for RenderQueue.

Parameters

  •  renderFunction: RenderOptions – The callback actual render function.

  •  options: RenderOptions – Optional options for rendering.


Properties

No publicly accessible properties on RenderQueue

private queued: number

Description needed

private renderFunction: RenderOptions

Description needed

private lastFrameId: number

Description needed

private options: RenderOptions

Description needed


Methods

private actualRender

actualRender() => void

Call the render function and reset the queue.

public setOptions

setOptions(options) => void

Description needed

Parameters

  •  options: PartialDescription needed

public setRenderFunction

setRenderFunction(renderFunction) => void

Description needed

Parameters

public render

render() => void

Request a render frame and add to the queue.

public cancel

cancel() => void

Description needed


Static Methods

No static methods for RenderQueue