File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
engine/modules/entities/src/main/resources/view/entity-module Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,11 @@ export class BufferedGroup extends ContainerBasedEntity {
1414
1515 postUpdate ( ) {
1616 if ( this . needsRender ) {
17- if ( this . gameTexture == null || this . gameTexture . width < this . buffer . width || this . gameTexture . height < this . buffer . height ) {
18- const width = Math . min ( Math . max ( this . buffer . width , 512 ) , 4096 )
19- const height = Math . min ( Math . max ( this . buffer . height , 512 ) , 4096 )
17+ const bufferBoundsWidth = this . buffer . getBounds ( ) . width
18+ const bufferBoundsHeight = this . buffer . getBounds ( ) . height
19+ if ( this . gameTexture == null || this . gameTexture . width < bufferBoundsWidth || this . gameTexture . height < bufferBoundsHeight ) {
20+ const width = Math . min ( Math . max ( bufferBoundsWidth , 512 ) , 4096 )
21+ const height = Math . min ( Math . max ( bufferBoundsHeight , 512 ) , 4096 )
2022 this . gameTexture = PIXI . RenderTexture . create ( width , height )
2123 flagForDestructionOnReinit ( this . gameTexture )
2224 this . graphics . texture = this . gameTexture
You can’t perform that action at this time.
0 commit comments