Skip to content

Commit 18e764b

Browse files
committed
fix(SDK): fixed EndScreenModule
1 parent ac7ef39 commit 18e764b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

engine/modules/endscreen/src/main/resources/view/endscreen-module/EndScreenModule.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { WIDTH, HEIGHT } from '../core/constants.js'
2-
import { lerp, unlerp } from '../core/utils.js'
2+
import { lerp, unlerp, fitAspectRatio } from '../core/utils.js'
33
import { ErrorLog } from '../core/ErrorLog.js'
44
import { MissingImageError } from './errors/MissingImageError.js'
55

@@ -101,7 +101,8 @@ export class EndScreenModule {
101101
var logoS = 400
102102
var logoD = 600
103103
var logoP = unlerp(logoS, logoS + logoD, this.endTime)
104-
this.endLayer.titleRanking.scale.x = this.endLayer.titleRanking.scale.y = 0.001 + lerp(10, 0.8, logoP)
104+
105+
this.endLayer.titleRanking.scale.set(lerp(this.targetTitleScale * 10, this.targetTitleScale, logoP))
105106
this.endLayer.titleRanking.visible = !!logoP
106107

107108
var rankS = 1000
@@ -236,6 +237,7 @@ export class EndScreenModule {
236237
ErrorLog.push(new MissingImageError(sprite))
237238
titleRanking = new PIXI.Sprite(PIXI.Texture.EMPTY)
238239
}
240+
this.targetTitleScale = fitAspectRatio(titleRanking.texture.width, titleRanking.texture.height, 2 * WIDTH / 3, HEIGHT / 4)
239241
titleRanking.anchor.x = titleRanking.anchor.y = 0.5
240242
layer.titleRanking = titleRanking
241243

playground/misc/misc-3-release-notes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
The CodinGame SDK is regularly updated and improved. This document lets you know what changed in the latest releases.
44

5-
## Next Release
5+
## ## 4.3.1
66

77
### 🐞 Bug fix
88

9+
- Fixed `EndScreenModule` issue with logo size.
910
- Fixed `CameraModule` issues. _Contributed by [Butanium](https://github.com/Butanium)_
1011

1112
## 4.3.0

0 commit comments

Comments
 (0)