Having a 3D iPhone vector, I am looking to create a sprite animation of screens on top of it.
To achieve this, I am using a div
as a mask over the iPhone, with the sprite background animating through transition and background-position.
The iPhone is already correctly positioned in 3D, but in order to utilize a 3D sprite image with a mask, the div also needs to be rotated in 3D. However, I am struggling to find the correct values to position the div accurately on top of the iPhone after spending over an hour on it.
Currently, I am experimenting with values such as: perspective
, skew
, rotateX
, rotateY
, and rotateZ
.
It would have been easier if Photoshop (CC) provided perspective and XYZ-axis values during a perspective transformation. Does anyone know a better way to determine the correct values without relying solely on trial and error?
Note: Simply applying 3D values to both a regular iPhone image and its mask afterwards would result in a flat 3D object.
Thank you!
Current status, with
perspective(1000px) rotate(-72deg) rotateX(0deg) rotateY(40deg) rotateZ(11deg) skew(0deg, 20deg);
derived from a standard 16:9 portrait image.