Rotation on Drag

Hey everyone,

hope y’all having a wonderful weekend so far. I came across this community page https://webflow.com/made-in-webflow/website/Draggable-content
and I’m looking to achieve something similar but not moving it but just rotating it in 3D.
An example of this would be opening a pack in the new Pokemon game where you can rotate the cards slightly to get a glimpse of the last card laying under the others.

I can’t really find a tutorial for that, would love any help or direction here <3

Best,
Timo