Re: [css-transforms] - Add generic transformation

That’s not quite the same as the solution suggested by me.

One should turn away from the implementer's perspective of matrices, planes 
etc. and take the perspective from the author’s point of view of applying 
transformations, as this perspective is the abstraction level CSS deals 
with.

Given the general transform function I suggested, all other transform 
functions would easily become redundant. Even the perspective and 
perspective-origin properties would become redundant.

Moreover, since transformations generally are the result of merging a number 
of current transform functions, it currently is rather difficult to achieve 
the desired effect using the currently available transform functions. Given 
the new, general transform function suggested by me, it would be a snap to 
create the desired effect by just giving the coordinates of the desired 
effect.

And even more: Effects not available at this time would become possible, 
like distorting the image at edges, either sharp or transient.

And although current transform functions would become redundant, the IDL for 
scripts wouldn’t necessary need to be changed. Instead, an implementation 
would just provide macros converting, say, an x-rotation into the 
corresponding general transformation I suggested, because every currently 
defined transformation function is just a special case of the general 
transform function I suggest.

Cheers,
Axel



------------------
"Dirk Schulze" <dschulze@adobe.com> schrieb im Newsbeitrag 
news:CA5A0832-0EE5-4384-9EA8-D644D38DAD63@adobe.com...


On Aug 6, 2015, at 11:44 AM, news.gmane.org <brille1@hotmail.com> wrote:

After three years of idleness I'd like to bring the idea of a generic
transformation property back into play:

http://1drv.ms/1KSpJ44

A generic transformation, defined by assigning mapped coordinates to each of
an elements corner points, is easy to handle and replaces all the special
transformations that currently are defined.


You could create a polyfill with current transform and clip path. Draw the 
same element twice, clip both with opposite triangles and add the needed 
transform on each of the two elements.

If you want to do the more complex transformation at the end, you would need 
a (for HTML) ridiculously amount of triangles of course.

For HTML Canvas this is definitely the better option than introducing a 
generic transform function.

For CSS Adobe had another proposal that would allow even more complex 
transformations with CSS Shaders (aka Custom Filters)[1][2]. Blink and 
WebKit had implementations for quite some time before it was removed 
eventually. The request from authors isn’t big enough currently it seems.

Greetings,
Dirk

Received on Monday, 10 August 2015 14:04:10 UTC