Iam creating a card game using socket Io and the problem Iam facing is how to deal with local view and players view for example the part Iam stuck in now is when someone draw a card Iam struggling with animations and the idea that if A card got to be in the middle then how other players see it from thier view this thing is exhausting my mind And I need to find a good approach so I can use it in the future with the upcoming events that needs to get back cards to hand so reverse the animation is there any tips or anyone struggled with the multiple views
Tried to make an animation that moves the card to the middle of the field as all my cards are covered in a parent div so I can’t actually get them into the middle that easy
<div class="deck1">
<div class="card card1" id="card1deck1"></div>
<div class="card card2" id="card2deck1"></div>
<div class="card card3"></div>
<div class="card card4"></div>
</div>
the approach Iam thinking of is to center them all to thier parent then move them outside of the parent with negative top value or right or left based on where it’s located But Iam still strugling also so much
enter image description here