Skip to content

Commit bf47ed4

Browse files
CGhbouvetCGjupoulton
authored andcommitted
fix(gameengine): Added a minimal size for render texture in buffered group
1 parent 6cb9811 commit bf47ed4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ export class BufferedGroup extends ContainerBasedEntity {
1515
postUpdate () {
1616
if (this.needsRender) {
1717
if (this.gameTexture == null || this.gameTexture.width < this.buffer.width || this.gameTexture.height < this.buffer.height) {
18-
this.gameTexture = PIXI.RenderTexture.create(Math.min(this.buffer.width, 4096), Math.min(this.buffer.height, 4096))
18+
const width = Math.min(Math.max(this.buffer.width, 512), 4096)
19+
const height = Math.min(Math.max(this.buffer.height, 512), 4096)
20+
this.gameTexture = PIXI.RenderTexture.create(width, height)
1921
flagForDestructionOnReinit(this.gameTexture)
2022
this.graphics.texture = this.gameTexture
2123
}

0 commit comments

Comments
 (0)