PIXI.TimeLimiter

class TimeLimiter

TimeLimiter limits the number of items handled by a PIXI.BasePrepare to a specified number of milliseconds per frame.

Constructor


new PIXI.TimeLimiter(maxMilliseconds: number) → {}
Parameters:
Name Type Description
maxMilliseconds number

The maximum milliseconds that can be spent preparing items each frame.

Summary


Properties from TimeLimiter

number
frameStart
number
maxMilliseconds

The maximum milliseconds that can be spent preparing items each frame.

Methods from TimeLimiter

boolean
allowedToUpload()
void
beginFrame()

Resets any counting properties to start fresh on a new frame.

Public Properties


frameStart TimeLimiter.ts:11
frameStart: number

The start time of the current frame.

maxMilliseconds TimeLimiter.ts:8
maxMilliseconds: number

The maximum milliseconds that can be spent preparing items each frame.

Public Methods


allowedToUpload TimeLimiter.ts:30
allowedToUpload() → {boolean}

Checks to see if another item can be uploaded. This should only be called once per item.

Returns:
Type Description
boolean
  • If the item is allowed to be uploaded.
beginFrame TimeLimiter.ts:24
beginFrame() → {void}

Resets any counting properties to start fresh on a new frame.

Returns:
Type Description
void

Powered by webdoc!