I’m creating a card game with ThreeJS. Initially the cards are face down in an X columns by Y rows table. When the user taps a card, I want to create the illusion of the card flipping around the Y axis to show the face of the card, just like it would appear to someone looking down at a card table watching the card(s) being flipped over, except in this case, the illusion will make the card look like it’s rotating on an invisible stick instead of being turned by a hand.
I’m guessing I need to simultaneously alter the Y angle orientation of the two images that will be colocated at the same (X, Y) location, where the current orientation of the image that is the back side of the card, and the current orientation of the image that is the face of the card are altered by a Javascript function operating in an interval. So I will change the angle around the Y axis for each image a certain increment each interval execution for both images.
Or should I create a cube with zero depth with one face of the cube the back side of the card and the opposing face the face card image, and just rotate the cube on the Y axis?
Is there a code sample that shows me how to do this? If not, what ThreeJS API calls should I study to achieve this?