change text size drag v2
This commit is contained in:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user