Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/CoreTextureManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ export class CoreTextureManager extends EventEmitter {
}

public hasUpdates(): boolean {
return this.uploadTextureQueue.length > 0;
return this.uploadTextureQueue.length > 0 || this.priorityQueue.length > 0;
}

/**
Expand Down
12 changes: 7 additions & 5 deletions src/core/Stage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,11 +471,13 @@ export class Stage {

// Process some textures asynchronously but don't block the frame
// Use a background task to prevent frame drops
this.txManager
.processSome(this.options.textureProcessingTimeLimit)
.catch((err) => {
console.error('Error processing textures:', err);
});
if (this.txManager.hasUpdates() === true) {
this.txManager
.processSome(this.options.textureProcessingTimeLimit)
.catch((err) => {
console.error('Error processing textures:', err);
});
}

// Reset render operations and clear the canvas
renderer.reset();
Expand Down