gl-css3d icon indicating copy to clipboard operation
gl-css3d copied to clipboard

CSS3D rotation incorrect on Firefox

Open deathcap opened this issue 10 years ago • 1 comments

The GL and CSS scenes match on Chrome (40.0.2214.111) but on Firefox (35.0 beta) they do not:

screen shot 2015-02-15 at 7 02 17 pm

isolated test case:

<div style="transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
overflow: hidden;
perspective: 1100px; -webkit-perspective: 1100px;
width: 1024px; height: 910px;"><div style="background-color: red;
position: absolute;
width: 100%;
height: 100%;
transform: 
 translateZ(1100px)
 matrix3d(0.002, 0, 0, 0,
           0, 0.001, 0.002, 0,
           0, 0, -0.5, 0,
           0, 0, -5, 1);
-webkit-transform: 
 translateZ(1100px)
 matrix3d(0.002, 0, 0, 0,
           0, 0.001, 0.002, 0,
           0, 0, -0.5, 0,
           0, 0, -5, 1);

           "></div></div>

on Chrome, Firefox (tested both 35.0 beta and 38.0a1 2015-02-15 nightly), and Safari respectively:

screen shot 2015-02-15 at 8 13 11 pm

deathcap avatar Feb 16 '15 03:02 deathcap

http://atirip.com/2015/03/17/sorry-sad-state-of-matrix-transforms-in-browsers/ (from https://news.ycombinator.com/item?id=9217278) - this may or may not be or related to:

Image rotate and scale does not work in Firefox

Using rotate() and scale() considered harmful. If you scale and rotate your images then Firefox will scale the end result completely wrong. The bounding box is correct, but the image itself gets distorted.

http://devteam.ixara.com/public/bugs/mozrot.html https://bugzilla.mozilla.org/show_bug.cgi?id=1128467

deathcap avatar Mar 18 '15 02:03 deathcap