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 {
14
14
15
15
postUpdate ( ) {
16
16
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 )
22
24
this . gameTexture = PIXI . RenderTexture . create ( width , height )
23
25
flagForDestructionOnReinit ( this . gameTexture )
24
26
this . graphics . texture = this . gameTexture
Original file line number Diff line number Diff line change 2
2
3
3
The CodinGame SDK is regularly updated and improved. This document lets you know what changed in the latest releases.
4
4
5
+ ## 4.4.2
6
+
7
+ ### 🐞 Bug fix
8
+
9
+ - Fixed ` BufferedGroup ` width calculation when no children occupy coordinates 0,0
10
+
5
11
## 4.4.1
6
12
7
13
### 🐞 Bug fix
You can’t perform that action at this time.
0 commit comments