Add certificate template, shield logo, audio tracks, and enhance game UI/UX

This commit is contained in:
Vishva
2026-09-26 18:07:22 +05:30
parent db6840b870
commit 0f555fdb17
13 changed files with 2603 additions and 787 deletions
+4 -49
View File
@@ -52,62 +52,17 @@ class ParticleEngine {
this.clear();
}
// Spawn near-miss hazardous particle / projectile flying at avatar
// Particle Spawning (Disabled for clean direct feedback)
spawnHazardProjectile(type, startX, startY, targetX, targetY) {
const dx = targetX - startX;
const dy = targetY - startY;
const dist = Math.sqrt(dx * dx + dy * dy);
const speed = 14;
this.projectiles.push({
type: type, // 'spark' or 'chemical_drop'
x: startX,
y: startY,
vx: (dx / dist) * speed,
vy: (dy / dist) * speed,
targetX: targetX,
targetY: targetY,
size: type === 'spark' ? 7 : 12,
color: type === 'spark' ? '#ff3b30' : '#00f0ff',
trail: [],
reached: false
});
// Disabled
}
spawnSparks(originX, originY, count = 12) {
for (let i = 0; i < count; i++) {
const angle = (Math.PI * 0.8) + (Math.random() * 0.9 - 0.45); // Directed left-upward arc
const speed = Math.random() * 12 + 6;
this.particles.push({
type: 'spark',
x: originX,
y: originY,
vx: Math.cos(angle) * speed,
vy: Math.sin(angle) * speed - (Math.random() * 4),
gravity: 0.35,
life: 1.0,
decay: Math.random() * 0.03 + 0.02,
size: Math.random() * 3 + 1.5,
color: Math.random() > 0.3 ? '#ffdd55' : '#ff5511'
});
}
// Disabled
}
spawnChemicalFlow(originX, originY) {
for (let i = 0; i < 4; i++) {
this.particles.push({
type: 'chemical',
x: originX + (Math.random() * 8 - 4),
y: originY,
vx: -(Math.random() * 2 + 1),
vy: Math.random() * 4 + 2,
gravity: 0.25,
life: 1.0,
decay: 0.02,
size: Math.random() * 4 + 3,
color: '#10b981'
});
}
// Disabled
}
spawnConfetti() {