Skip to content

Commit 6cb9811

Browse files
CGhbouvetCGjupoulton
authored andcommitted
fix(gameengine): Now dynamically resizing render texture in buffered group
1 parent 6276772 commit 6cb9811

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/modules/entities/src/main/resources/view/entity-module/BufferedGroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class BufferedGroup extends ContainerBasedEntity {
1414

1515
postUpdate () {
1616
if (this.needsRender) {
17-
if (this.gameTexture == null) {
17+
if (this.gameTexture == null || this.gameTexture.width < this.buffer.width || this.gameTexture.height < this.buffer.height) {
1818
this.gameTexture = PIXI.RenderTexture.create(Math.min(this.buffer.width, 4096), Math.min(this.buffer.height, 4096))
1919
flagForDestructionOnReinit(this.gameTexture)
2020
this.graphics.texture = this.gameTexture

0 commit comments

Comments
 (0)