This commit is contained in:
2023-10-06 20:34:21 +05:30
parent 1178b1bd29
commit e19effedfa
82 changed files with 9100 additions and 8723 deletions

View File

@@ -56,7 +56,8 @@ import Layout from "../../layouts/Layout.astro";
parrotScalePlus = 0.38;
parrotWidth = 135;
parrotHeight = 170;
animatedAHeight = 32;
animatedAHeight = 35;
animatedAScale = 0.65;
} else{
cloudeSize = 500;
cloudHeight = 250;
@@ -74,6 +75,7 @@ import Layout from "../../layouts/Layout.astro";
parrotWidth = 200;
parrotHeight = 245;
animatedAHeight = 20;
animatedAScale = 0.73;
}
function preload() {
this.load.video('animatedA', '/assets/animated-letter/a.mp4');
@@ -206,7 +208,7 @@ import Layout from "../../layouts/Layout.astro";
const baseFontSize = 20;
const responsiveFontSize = (window.innerWidth / 480) * baseFontSize;
const descrptText = this.add.text(screenCenterX, 90, 'Let`s learn how to write letter : A', { font: `${responsiveFontSize}px quicksand`, fill: '#7c4c23', fontWeight : 'bold'}).setOrigin(0.5);
const animatedLetter = this.add.video(customWidth / 2 , customHeight / 2 + animatedAHeight, 'animatedA').setDepth(2).setScale(0.73);
const animatedLetter = this.add.video(customWidth / 2 , customHeight / 2 + animatedAHeight, 'animatedA').setDepth(2).setScale(animatedAScale);
// Play the video
animatedLetter.play();

View File

@@ -78,15 +78,15 @@ function create() {
if (!isMobile) {
image = this.add.image(customWidth / 4, customHeight / 2, 'letter_img');
image.setInteractive().setDepth(1).setScale(0.6);
// letter_img = this.add.image(customWidth / 1.5, customHeight / 2, 'icon_img');
// letter_img.setDepth().setScale(0.6);
// this.add.text(customWidth / 1.6, customHeight / 1.25, data.icon_name, textStyle2);
letter_img = this.add.image(customWidth / 1.5, customHeight / 2, 'icon_img');
letter_img.setDepth().setScale(0.6);
this.add.text(customWidth / 1.6, customHeight / 1.25, data.icon_name, textStyle2);
} else {
image = this.add.image(customWidth / 2.5, customHeight / 2.5, 'letter_img');
image.setInteractive().setDepth(1).setScale(0.3);
// letter_img = this.add.image(customWidth / 1.35, customHeight / 2 + 100, 'icon_img');
// letter_img.setDepth().setScale(0.3);
// this.add.text(customWidth / 2, customHeight / 1.3, data.icon_name, textStyle2);
letter_img = this.add.image(customWidth / 1.35, customHeight / 2 + 100, 'icon_img');
letter_img.setDepth().setScale(0.3);
this.add.text(customWidth / 2, customHeight / 1.3, data.icon_name, textStyle2);
}
})
.catch(error => {
@@ -133,11 +133,13 @@ function create() {
function update() {}
function captureSnapshot(game) {
snapshotButton.setVisible(false);
game.renderer.snapshot((image) => {
image.style.width = '160px';
image.style.height = '120px';
image.style.paddingLeft = '2px';
document.body.appendChild(image);
snapshotButton.setVisible(true);
// Download the snapshot as an image
const link = document.createElement('a');