add eraser button and add start calculation logic

This commit is contained in:
Suvodip
2024-09-06 20:05:34 +05:30
parent 2fe965cd99
commit d2a1edd333
21 changed files with 291 additions and 139 deletions

View File

@@ -547,7 +547,7 @@ import Layout from '../../layouts/Layout.astro';
eraserButton.style.padding = '4px 4px';
}else{
eraserButton.style.padding = '5px 5px';
eraserButton.style.marginTop = '15px';
eraserButton.style.marginTop = '0px';
eraserButton.style.marginBottom = '15px';
}
eraserButton.style.fontWeight = 'bold';
@@ -568,8 +568,8 @@ import Layout from '../../layouts/Layout.astro';
});
// Add the Clear and Eraser buttons to the container
buttonsContainer.appendChild(clearButton);
// colorPicker.appendChild(clearButton);
// buttonsContainer.appendChild(eraserButton).setVisible;
colorPicker.appendChild(clearButton);
buttonsContainer.appendChild(eraserButton).setVisible;
const sliderContainer = document.createElement('div');
sliderContainer.style.backgroundColor = '#fff';

View File

@@ -259,14 +259,14 @@ import Layout from '../../layouts/Layout.astro';
}
if(isMobile){
outlineImage1.setDepth(1).setScale(0.28);
outlineImage2.setDepth(1).setScale(0.28);
outlineImage1.setDepth(-5).setScale(0.28);
outlineImage2.setDepth(-5).setScale(0.28);
}else if(isTab){
outlineImage1.setDepth(1).setScale(0.34);
outlineImage2.setDepth(1).setScale(0.34);
outlineImage1.setDepth(-5).setScale(0.34);
outlineImage2.setDepth(-5).setScale(0.34);
} else{
outlineImage1.setDepth(1).setScale(0.60);
outlineImage2.setDepth(1).setScale(0.60);
outlineImage1.setDepth(-5).setScale(0.60);
outlineImage2.setDepth(-5).setScale(0.60);
}
graphics = this.add.graphics();
const colorContainer = document.createElement('div');

View File

@@ -153,7 +153,7 @@ import Layout from '../../layouts/Layout.astro';
.then(({ data }) => {
// console.log(data.colors)
const screenCenterX = this.cameras.main.worldView.x + this.cameras.main.width / 2;
const baseFontSize = 24;
const baseFontSize = 20;
const responsiveFontSize = (window.innerWidth / 940) * baseFontSize;
let wrapWidth;
if(isMobile){
@@ -161,7 +161,7 @@ import Layout from '../../layouts/Layout.astro';
} else{
wrapWidth = 200;
}
const descrptText = this.add.text(screenCenterX, 100, data.description, { font: `${responsiveFontSize}px quicksand`, fill: '#60C6CB', align: "center", wordWrap: {width: window.innerWidth-wrapWidth}}, ).setOrigin(0.5);
const descrptText = this.add.text(screenCenterX, 110, data.description, { font: `${responsiveFontSize}px quicksand`, fill: '#60C6CB', align: "center", wordWrap: {width: window.innerWidth-wrapWidth}}, ).setOrigin(0.5);
// this.add.text(customWidth / 2 - learningWidth, customHeight / 2 - learningHeight, data.LearningArea, {font: `20px`}).setTint(0X7C4C23)
// this.add.text(customWidth / 2 - learningWidth, customHeight / 2 - learningHeight + 20, data.LearningSubArea, {font: `20px`}).setTint(0X7C4C23)
})