PIXI.CountLimiter

class CountLimiter

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

Constructor


new PIXI.CountLimiter(maxItemsPerFrame: number) → {}
Parameters:
Name Type Description
maxItemsPerFrame number

The maximum number of items that can be prepared each frame.

Summary


Properties from CountLimiter

number
itemsLeft

The number of items that can be prepared in the current frame.

number
maxItemsPerFrame

The maximum number of items that can be prepared each frame.

Methods from CountLimiter

boolean
allowedToUpload()
void
beginFrame()

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

Public Properties


itemsLeft CountLimiter.ts:11
itemsLeft: number

The number of items that can be prepared in the current frame.

maxItemsPerFrame CountLimiter.ts:8
maxItemsPerFrame: number

The maximum number of items that can be prepared each frame.

Public Methods


allowedToUpload CountLimiter.ts:29
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 CountLimiter.ts:23
beginFrame() → {void}

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

Returns:
Type Description
void

Powered by webdoc!