-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
154 lines (130 loc) · 7.29 KB
/
script.js
File metadata and controls
154 lines (130 loc) · 7.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// Project data (dummy content for now)
const projects = [
{
title: "Teacher Simulator",
desc: "[3.8★][1M+ Downloads] Step into the life of a virtual teacher! In School Teacher Life Simulator, take charge of your school, care for your students, and enjoy fun little interactions. Take selfies, have parties, take quizzes, create fun reactions in sciencelab, and manage everything like a real cool teacher!",
img: "assets/image-teachersim.webp?text=Gamma",
lnk: 'https://play.google.com/store/apps/details?id=com.genigames.school.teacher.simulator',
ios: 'https://apps.apple.com/in/app/classroom-teacher-school-life/id6764299125'
},
{
title: "Family Simulator",
desc: "[3.9★][500K+ Downloads] Step into the life of a loving virtual mom! In Mother Family Life Simulator, take charge of your home, care for your family, and complete fun daily tasks. Cook meals, drop kids at school, clean the house, go shopping, and manage everything like a real supermom!",
img: "assets/image-momsim.webp?text=Gamma",
lnk: 'https://play.google.com/store/apps/details?id=com.genigames.mother.family.life.simulator&hl=en',
ios: 'https://apps.apple.com/in/app/mother-life-family-simulator/id1470568988'
},
{
title: "Whist Game",
desc: "[4.0★][30K+ Downloads] Whist is an old card game full of fun, clubbing and passion governed by elaborate laws and rules. The AlWest game is one of the oldest and most famous card games in the world, from which it borrowed most of the card games currently prevalent, as it started in the eighteenth century to find its place in social events and a direct challenge between four players",
img: "assets/image-whist.webp?text=Gamma",
lnk: 'https://play.google.com/store/apps/details?id=com.whist.whistapp&hl=en-US',
ios: 'https://apps.apple.com/us/app/whist-game-%D9%84%D8%B9%D8%A8%D8%A9-%D8%A7%D9%84%D9%88%D9%8A%D8%B3%D8%AA/id1553090039'
},
{
title: "Color Cargo",
desc: "Cargo Puzzle is the ultimate blend of bus sorting games, and bus color match ! You have to match delivery boxes with the right cargo buses by their colors, a bus color sort experience. Perfect for fans of puzzle games and fun games, this game is all about strategy, speed, and precision.",
img: "assets/image-colorcargo.webp?q=tbn:ANd9GcT_cuympapAi8189Y1f_61rRbyB7-oKNDOK2Q&s?text=Alpha",
lnk: 'https://play.google.com/store/apps/details?id=com.genigames.delivery.color.match.puzzle&pcampaignid=web_share',
ios: null
},
// {
// title: "Epic StuntMan Run",
// desc: "Ready to test your speed, reflexes, and parkour run race skills? Jump into the ultimate 3D race where every second counts! Run, jump, swing, and climb through challenging tracks in this fun race filled with crazy obstacles course. This is not just any running game—it’s a high-energy epic race with fun challenges where only the fastest and smartest players make it to the finish line!",
// img: "assets/image-stuntman.webp?text=Beta",
// lnk: 'https://play.google.com/store/apps/details?id=com.genigames.parkour.run.fun.race&pcampaignid=web_share',
// ios: null
// },
{
title: "Fly Wheels",
desc: "Experience the thrill of futuristic flying cars in this exciting world of flying car games that combines the best of car jumping games and flying car simulator ! Become the ultimate car race master as you drag, release, and watch your flying car soar through the skies. With simple controls and addictive gameplay like airplane games, this is the perfect mix of fun and challenge.",
img: "assets/image-flywheels.webp?text=Gamma",
lnk: 'https://play.google.com/store/apps/details?id=com.genigames.flying.car.jump.evolution&hl=en-US',
ios: 'https://apps.apple.com/in/app/flying-wheels-evolution/id6743780042'
},
{
title: "Whip n Flip",
desc: "Be attentive, be alert, the ragdoll monsters and the brainrot are coming for you. Use different weapons to throw the rope at them, flip and smash them aside for your survival.",
img: "assets/image-whipnflip.webp?text=Gamma",
lnk: 'https://play.google.com/store/apps/details?id=com.genigames.hit.ragdoll.rope.knife.master&hl=en-US',
ios: null
},
{
title: "Rescue Dash",
desc: "Plan smart, act fast — guide emergency vehicles to their destinations before time runs out. Draw optimal paths on busy roads, avoid collisions, and manage multiple routes under pressure. Every second counts in this strategic puzzle game where quick thinking and precision save the day.",
img: "assets/image-rescuedash.webp?text=Gamma",
lnk: 'https://drive.google.com/file/d/19UNLarrmMjKqfPmbGuMd1mR3nsI3DCxa/view?usp=drive_link',
ios: null
},
{
title: "Tower Tetris",
desc: "Plan smart, act fast — guide emergency vehicles to their destinations before time runs out. Draw optimal paths on busy roads, avoid collisions, and manage multiple routes under pressure. Every second counts in this strategic puzzle game where quick thinking and precision save the day.",
img: "assets/image-tetristower.jpg?text=Gamma",
lnk: 'https://drive.google.com/file/d/1RLi0dX_KDcrPt6HDwcL3PIksWsBq1d9R/view?usp=drive_link',
ios: null
}
];
let ind = 0;
window.addEventListener('scroll', () => {
const scrollY = window.scrollY;
const scrollHeight = document.body.scrollHeight;
const viewportHeight = window.innerHeight;
const nearBottom = scrollY + viewportHeight >= scrollHeight - 100;
if (nearBottom) {
document.body.classList.add('bg-bottom');
} else {
document.body.classList.remove('bg-bottom');
}
});
// Function to update project view
function showProject(index) {
ind = index;
const proj = projects[index];
const image = document.getElementById('projectImage');
const title = document.getElementById('projectTitle');
const desc = document.getElementById('projectDesc');
const appStoreButton = document.getElementById('appStoreButton');
// Step 1: Scale down current image
image.classList.remove('scale-up');
image.classList.add('scale-down');
// Step 2: After scale-down completes, switch image
setTimeout(() => {
// Apply scale-initial before replacing image
image.classList.remove('scale-down');
image.classList.add('scale-initial');
// Change the image
image.src = proj.img;
// Wait for image load before scaling up (safer)
image.onload = () => {
// Force reflow so next class triggers animation
void image.offsetWidth;
image.classList.remove('scale-initial');
image.classList.add('scale-up');
};
}, 300); // match transition duration
// Step 3: Update title
title.textContent = proj.title;
// Step 4: Typing animation
let i = 0;
desc.textContent = '';
if (appStoreButton) {
appStoreButton.style.display = proj.ios ? 'inline-block' : 'none';
}
function typeWriter() {
if (i < proj.desc.length) {
desc.textContent += proj.desc.charAt(i);
i++;
setTimeout(typeWriter, 1);
}
}
typeWriter();
}
// Show first project by default when page loads
showProject(0);
function openLink(platform = 'android') {
const proj = projects[ind];
const url = platform === 'ios' ? proj.ios : proj.lnk;
if (url) {
window.open(url, '_blank'); // Opens in new tab
}
}