File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
engine/modules/entities/src/main/resources/view/entity-module Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,13 @@ export class BufferedGroup extends ContainerBasedEntity {
1414
1515 postUpdate ( ) {
1616 if ( this . needsRender ) {
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 )
17+ const bufferBounds = this . buffer . getBounds ( )
18+ const positiveWidth = Math . max ( 0 , bufferBounds . x + bufferBounds . width )
19+ const positiveHeight = Math . max ( 0 , bufferBounds . y + bufferBounds . height )
20+
21+ if ( this . gameTexture == null || this . gameTexture . width < positiveWidth || this . gameTexture . height < positiveHeight ) {
22+ const width = Math . min ( Math . max ( positiveWidth , 512 ) , 4096 )
23+ const height = Math . min ( Math . max ( positiveHeight , 512 ) , 4096 )
2224 this . gameTexture = PIXI . RenderTexture . create ( width , height )
2325 flagForDestructionOnReinit ( this . gameTexture )
2426 this . graphics . texture = this . gameTexture
Original file line number Diff line number Diff line change 22
33The CodinGame SDK is regularly updated and improved. This document lets you know what changed in the latest releases.
44
5+ ## 4.4.2
6+
7+ ### 🐞 Bug fix
8+
9+ - Fixed ` BufferedGroup ` width calculation when no children occupy coordinates 0,0
10+
511## 4.4.1
612
713### 🐞 Bug fix
You can’t perform that action at this time.
0 commit comments