change text size drag v2
parent
5552396b9d
commit
06709e02d7
|
@ -300,7 +300,7 @@ import Layout from '../../layouts/Layout.astro';
|
|||
];
|
||||
const screenCenterX = this.cameras.main.worldView.x + this.cameras.main.width / 2;
|
||||
// Base font size for your text
|
||||
const baseFontSize = 30;
|
||||
const baseFontSize = 20
|
||||
// Calculate responsive font size based on screen width
|
||||
const responsiveFontSize = (window.innerWidth / 950) * baseFontSize; // Adjust 800 to your desired reference width
|
||||
const descrptText = this.add.text(screenCenterX, 76, data.description, {
|
||||
|
|
Loading…
Reference in New Issue