fix color issue over the button
This commit is contained in:
@@ -236,6 +236,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
const firstScreen = this.add.image(customWidth / 2, customHeight / 2 + letterHeight, 'letterZ').setDepth(2).setScale(letterScale);
|
||||
// const firstScreen = this.add.image(customWidth / 2, customHeight / 2 + letterHeight, 'animatedZ').setDepth(2); canvasStand
|
||||
firstScreen.setVisible(false);
|
||||
const maskGraphics = this.make.graphics();
|
||||
maskGraphics.fillRect(customWidth / 2 - customWidth / 2, 55, customWidth, customHeight);
|
||||
const mask = maskGraphics.createGeometryMask();
|
||||
|
||||
demoButton.setInteractive().on('pointerdown', () => {
|
||||
animatedLetter.setCurrentTime(0);
|
||||
@@ -253,7 +256,6 @@ import Layout from "../../layouts/Layout.astro";
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
let responsiveFontSize = isMobile ? 16 : 32;
|
||||
this.add.text(window.innerWidth / 2, 80, 'Letter: Z', {fill: '#60C6CB', font: `900 ${responsiveFontSize}px quicksand`}).setOrigin(0.5);
|
||||
const descrptText = this.add.text(window.innerWidth/2, 125, 'Let`s learn how to write letter : Z', { font: `900 ${responsiveFontSize}px quicksand`, fill: '#7c4c23', fontWeight : 'bold'}).setOrigin(0.5);
|
||||
@@ -368,6 +370,8 @@ import Layout from "../../layouts/Layout.astro";
|
||||
|
||||
|
||||
graphics = this.add.graphics();
|
||||
graphics.setMask(mask);
|
||||
graphics.setMask(mask);
|
||||
graphics.lineStyle(15, 0xFFFFFF, 2).setDepth(2); // Set line style (width, color, alpha)
|
||||
this.input.on('pointerdown', function (pointer) {
|
||||
isDrawing = true;
|
||||
|
||||
Reference in New Issue
Block a user