I've been playing around with 3D transformations for parallax scrolling effects and I'm trying to understand how to do plane to plane projections. I've searched around but the matrix math involved is a bit hard to grasp without clear examples.
Given a layout with multiple panels, I would like to get the transformation matrix to move each panel onto a new arbitrary plane while maintaining the original un-transformed perspective.
To illustrate this problem, here is a plunker that performs Z transformations on 3 different divs along with scaling and translating to achieve the plane projection. I have them appear to align at a specific scroll point as if there was no transformation using scale and X,Y translations.
transform: translateZ(60px) scale(0.4) translateX(-270px) translateY(258px);
https://plnkr.co/edit/UddWeLAWTQgkcpYMRP9q
I have achieved this example with trial and error doing manual scale, translateX and translateY to shift the div back after the translateZ pulls it out of place. However I would like to understand the better way to calculate the transformation matrix since my divs are not a fixed size which changes the values required.