Class: PrepareQueue

PrepareQueue

Part of the prepare system. Responsible for uploading all the items to the GPU. This class extends the base functionality and resolves given resource items ready for the queue.

new PrepareQueue () overrides

Extends

Methods

resolveContainerQueueItem (container, queue) void protected

Resolve the given container and return an item for the queue

Name Type Description
container Container
queue PrepareQueueItem[]

resolveGraphicsContextQueueItem (graphicsContext) PrepareQueueItem | null protected

Resolve the given graphics context and return an item for the queue

Name Type Description
graphicsContext GraphicsContext
Returns:
Type Description
PrepareQueueItem | null

resolveQueueItem (source, queue) void protected overrides

Resolve the given resource type and return an item for the queue

Name Type Description
source PrepareSourceItem
queue PrepareQueueItem[]

Inherited Properties

From class PrepareBase

queue PrepareQueueItem[] protected inherited

The queue to process over a async timer

renderer Renderer protected inherited

Reference to the renderer

resolves ((value: void | PromiseLike<void>) => void)[] protected inherited

Collection of callbacks to call when the uploads are finished

timeout number protected inherited

Timeout id for next processing call

Inherited Methods

From class PrepareBase

add (resource) this inherited

Add a textures or graphics resource to the queue

Name Type Description
resource PrepareSourceItem | PrepareSourceItem<Array>
Returns:
Type Description
this

dedupeQueue () void inherited

eliminate duplicates before processing

getQueue () Array<PrepareQueueItem> inherited

Return a copy of the queue

Returns:
Type Description
Array<PrepareQueueItem> The queue

upload (resource) Promise<void> inherited

Upload all the textures and graphics to the GPU (optionally add more resources to the queue first)

Name Type Attributes Description
resource PrepareSourceItem | PrepareSourceItem<Array> | unknown <optional>
Returns:
Type Description
Promise<void>