Live data from Hacker News

The sad state of browser matrix transforms

atirip.com

11–20 of 29 posts

Re: The sad state of browser matrix transforms

#11
post #3

I think saying it's a 'sad state' is a bit dramatic. An 'imperfect state' would be a better description. I've used the matrix function a lot, and am perfectly happy with how it renders across browsers. I would be happy if it was bug-free and easier to use, but it still gives me a lot more power than if it didn't exist.

It is sad IMHO. Of course without it we'd have a lot of problems, but current implementations are very buggy. And today it's not cutting-edge feature so I'd expect it to work more reliably...

This is going to be a bit of a rant, but here goes.

In the 2000s, the pace of development in browsers was glacial. You had the choice of using crazy browser hacks, or trying to do it with JavaScript, which often turned out to be slow. Waiting for bug fixes or new features was pointless.

Since about 2011, the pace of change has been enormous. Concepts which we only dreamed about in 2005 - transitions, animation, flexbox - now have a spec and are even supported. OK, some of the implementations are buggy, but the alternative would be for browser vendors not to implement them in production until all the bugs were ironed out.

I'm happy that the browser vendors release code that is largely working, despite the bugs. I have confidence that they will fix those bugs. If I'm happy to use the buggy implementation, I can. If I prefer to wait for a bug-free stable version, I can. The choice is mine.

The sense of entitlement amongst many front end developers is immense. They contribute nothing to the development of either the standards or the browsers, and yet they moan when it takes more than a few months to introduce a completely bug-free, consistent browser implementation.

I guess the summary of my rant is: if you want stability, use the old-fashioned JavaScript implementations. If you want cutting edge, be prepared to work around bugs. And if you don't contribute anything to the development of the browsers, be happy with whatever you're given.

Re: The sad state of browser matrix transforms

#13
post #11

Earlier quoted context omitted.

It is sad IMHO. Of course without it we'd have a lot of problems, but current implementations are very buggy. And today it's not cutting-edge feature so I'd expect it to work more reliably...

This is going to be a bit of a rant, but here goes. In the 2000s, the pace of development in browsers was glacial. You had the choice of using crazy browser hacks, or trying to do it with JavaScript, which often turned out to be slow. Waiting for bug fixes or new features was pointless. Since about 2011, the pace of change has been enormous. Concepts which we only dreamed about in 2005 - transitions, animation, flexb…

Entitlement?

One would expect browsers would at least get the _MATH_ right.

Re: The sad state of browser matrix transforms

#15
post #5

Kind of offtopic: How should browsers handle transitions of transformations? AFAIK in Firefox if your transformation is a composition of multiple transformations then it does a transition of each part in a way where the transformation parameter linearly changes. Like between scale(2) rotate(0) and scale(4) rotate(90) in the middle of the transformation there is scale(3) rotate(45) . It's different if you define the s…

If only mathematicians would construct an algebra of linear transformations. Then the browser vendors could simply implement the laws of this linear algebra once and for all.

How does linear algebra answer leni536's question about how to handle transitions between two linear transformations?

I take it that question is roughly: given two matrices A and B, guess which continuous path M(t) of matrices with M(0)=A and M(1)=A the web developer intended or will find most visually pleasing. I don't think linear algebra has any mind reading built in.

By the way, why don't browsers just let you specify the function M(t) to be used for the transition?

Re: The sad state of browser matrix transforms

#18
post #5

Kind of offtopic: How should browsers handle transitions of transformations? AFAIK in Firefox if your transformation is a composition of multiple transformations then it does a transition of each part in a way where the transformation parameter linearly changes. Like between scale(2) rotate(0) and scale(4) rotate(90) in the middle of the transformation there is scale(3) rotate(45) . It's different if you define the s…

Given a decomposition into a linear equation of the form a * x + b, where a is a scalar multipying a rotation maxtrix, one should be able to create a linear relation between two equations of this form with the variable being time. The time factor should still follow the same rules as specified by the transition, so one shouldn't have much issue piecing these together, if it is so desired to have this behavior.

Edit: Sorry, linear relation is not what I meant - one should be able to construct a parametric equation in terms of t where t = 0 is the initial transform and t = 1 is the final transform.

Re: The sad state of browser matrix transforms

#20

Earlier quoted context omitted.

If only mathematicians would construct an algebra of linear transformations. Then the browser vendors could simply implement the laws of this linear algebra once and for all.

How does linear algebra answer leni536's question about how to handle transitions between two linear transformations? I take it that question is roughly: given two matrices A and B, guess which continuous path M(t) of matrices with M(0)=A and M(1)=A the web developer intended or will find most visually pleasing. I don't think linear algebra has any mind reading built in. By the way, why don't browsers just let you sp…

They don't let you specify it because css transitions and animations are supposed to be simple and easy to use (no math), and css doesn't really have the language constructs you'd need to write specify M(t). You can do it with javascript, which imho is far superior to animating with css.
Post reply on HN