improvements

This commit is contained in:
Michal Vrba
2026-08-28 16:34:40 +02:00
parent 4803bc22a6
commit 02bca7c34a
212 changed files with 622 additions and 112 deletions
+12 -10
View File
@@ -351,8 +351,9 @@ window.FaraonFx = (function () {
const flyingCard = document.createElement('div');
flyingCard.className = 'game-card marias-card flying-card-anim';
flyingCard.style.position = 'fixed';
flyingCard.style.left = `${startPos.x - 55}px`;
flyingCard.style.top = `${startPos.y - 80}px`;
flyingCard.style.left = `${startPos.x}px`;
flyingCard.style.top = `${startPos.y}px`;
flyingCard.style.transform = 'translate(-50%, -50%)';
flyingCard.style.zIndex = '999';
flyingCard.style.pointerEvents = 'none';
flyingCard.style.boxShadow = '0 20px 40px rgba(0,0,0,0.8), 0 0 30px rgba(245, 176, 65, 0.9)';
@@ -372,16 +373,16 @@ window.FaraonFx = (function () {
const animation = flyingCard.animate([
{
transform: 'translate3d(0, 0, 0) scale(0.85) rotate(0deg)',
transform: 'translate(-50%, -50%) translate3d(0, 0, 0) scale(0.85) rotate(0deg)',
opacity: 0.9
},
{
transform: `translate3d(${dx * 0.45}px, ${dy * 0.45 - 60}px, 0) scale(1.35) rotate(${randomRotation * 0.5}deg)`,
transform: `translate(-50%, -50%) translate3d(${dx * 0.45}px, ${dy * 0.45 - 60}px, 0) scale(1.35) rotate(${randomRotation * 0.5}deg)`,
opacity: 1,
offset: 0.5
},
{
transform: `translate3d(${dx}px, ${dy}px, 0) scale(1) rotate(${randomRotation}deg)`,
transform: `translate(-50%, -50%) translate3d(${dx}px, ${dy}px, 0) scale(1) rotate(${randomRotation}deg)`,
opacity: 1
}
], {
@@ -408,8 +409,9 @@ window.FaraonFx = (function () {
const flyingBack = document.createElement('div');
flyingBack.className = 'game-card marias-card flying-card-anim';
flyingBack.style.position = 'fixed';
flyingBack.style.left = `${startPos.x - 55}px`;
flyingBack.style.top = `${startPos.y - 80}px`;
flyingBack.style.left = `${startPos.x}px`;
flyingBack.style.top = `${startPos.y}px`;
flyingBack.style.transform = 'translate(-50%, -50%)';
flyingBack.style.zIndex = '999';
flyingBack.style.pointerEvents = 'none';
flyingBack.style.boxShadow = '0 10px 25px rgba(0,0,0,0.7)';
@@ -423,9 +425,9 @@ window.FaraonFx = (function () {
const dy = targetPos.y - startPos.y;
const animation = flyingBack.animate([
{ transform: 'translate3d(0, 0, 0) scale(1) rotate(0deg)', opacity: 1 },
{ transform: `translate3d(${dx * 0.5}px, ${dy * 0.5 - 30}px, 0) scale(1.15) rotate(10deg)`, opacity: 1, offset: 0.5 },
{ transform: `translate3d(${dx}px, ${dy}px, 0) scale(0.6) rotate(0deg)`, opacity: 0.2 }
{ transform: 'translate(-50%, -50%) translate3d(0, 0, 0) scale(1) rotate(0deg)', opacity: 1 },
{ transform: `translate(-50%, -50%) translate3d(${dx * 0.5}px, ${dy * 0.5 - 30}px, 0) scale(1.15) rotate(10deg)`, opacity: 1, offset: 0.5 },
{ transform: `translate(-50%, -50%) translate3d(${dx}px, ${dy}px, 0) scale(0.6) rotate(0deg)`, opacity: 0.2 }
], {
duration: 380,
easing: 'cubic-bezier(0.25, 1, 0.5, 1)'