diff --git a/front/src/Phaser/Components/CustomizeWoka/CustomWokaPreviewer.ts b/front/src/Phaser/Components/CustomizeWoka/CustomWokaPreviewer.ts index 1aa3aeb8..91f9c715 100644 --- a/front/src/Phaser/Components/CustomizeWoka/CustomWokaPreviewer.ts +++ b/front/src/Phaser/Components/CustomizeWoka/CustomWokaPreviewer.ts @@ -61,7 +61,7 @@ export class CustomWokaPreviewer extends Phaser.GameObjects.Container { this.frame = this.scene.add.graphics(); this.turnIcon = this.scene.add .image(this.background.displayWidth * 0.35, this.background.displayHeight * 0.35, "iconTurn") - .setScale(0.25) + .setScale(0.2) .setAlpha(0.75); this.drawFrame(); @@ -129,11 +129,11 @@ export class CustomWokaPreviewer extends Phaser.GameObjects.Container { this.changeAnimation(direction, moving); this.turnIconTween?.stop(); - this.turnIcon.setScale(0.25); + this.turnIcon.setScale(0.2); this.turnIconTween = this.scene.tweens.add({ targets: [this.turnIcon], duration: 100, - scale: 0.2, + scale: 0.15, yoyo: true, ease: Easing.SineEaseIn, }); diff --git a/front/src/Phaser/Login/CustomizeScene.ts b/front/src/Phaser/Login/CustomizeScene.ts index 1fd4aae5..6ac3079e 100644 --- a/front/src/Phaser/Login/CustomizeScene.ts +++ b/front/src/Phaser/Login/CustomizeScene.ts @@ -154,7 +154,14 @@ export class CustomizeScene extends AbstractCharacterScene { if (this.textures.getTextureKeys().includes(`floorTexture${i}`)) { continue; } - TexturesHelper.createFloorRectangleTexture(this, `floorTexture${i}`, 50, 50, "floorTiles", i); + TexturesHelper.createFloorRectangleTexture( + this, + `floorTexture${i}`, + WokaBodyPartSlot.SIZE, + WokaBodyPartSlot.SIZE, + "floorTiles", + i + ); } } @@ -328,13 +335,14 @@ export class CustomizeScene extends AbstractCharacterScene { } private handleCustomWokaPreviewerOnResize(): void { + const ratio = innerHeight / innerWidth; this.customWokaPreviewer.x = this.cameras.main.worldView.x + this.cameras.main.width / 2; - this.customWokaPreviewer.y = this.customWokaPreviewer.displayHeight * 0.5 + 10; + this.customWokaPreviewer.y = this.customWokaPreviewer.displayHeight * 0.5 + (ratio > 1.6 ? 40 : 10); } private handleBodyPartButtonsOnResize(): void { const ratio = innerHeight / innerWidth; - const slotDimension = 50; + const slotDimension = WokaBodyPartSlot.SIZE; for (const part in this.bodyPartsButtons) { this.bodyPartsButtons[part as CustomWokaBodyPart].setDisplaySize(slotDimension, slotDimension);