| Name | Type | Description |
|---|---|---|
renderer |
Renderer |
A reference to the current renderer |
Members
The number of uploads to process per frame
- Default Value:
- 4
queue PrepareQueueItem[] protected
The queue to process over a async timer
renderer Renderer protected
Reference to the renderer
Collection of callbacks to call when the uploads are finished
Timeout id for next processing call
Methods
Add a textures or graphics resource to the queue
| Name | Type | Description |
|---|---|---|
resource |
PrepareSourceItem | PrepareSourceItem<Array> |
Returns:
| Type | Description |
|---|---|
| this |
eliminate duplicates before processing
getQueue () Array<PrepareQueueItem>
Return a copy of the queue
Returns:
| Type | Description |
|---|---|
| Array<PrepareQueueItem> | The queue |
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> |
Resolve the given resource type and return an item for the queue
| Name | Type | Description |
|---|---|---|
source |
PrepareSourceItem | |
queue |
PrepareQueueItem[] |