Re: [css-shaders] CSS shaders for custom filters (ACTION-3072)

On Mon, Oct 3, 2011 at 2:23 PM, Charles Pritchard <chuck@jumis.com> wrote:

> On Oct 3, 2011, at 1:16 PM, "Gregg Tavares (wrk)" <gman@google.com> wrote:
>
> What about mouse input?
>
> It seems like for this proposal to actually work as other CSS works
> you'd need to run mouse and touch events through the vertex shader so
> that you get the mouse coordinates translated through the shader.
>
> Yes? No?
>
>
> CSSMatrix and transform3d are a good start. A method returning a CSSMatrix
> object may be enough.
>
> The following would help me to track elements and mouse clicks:
>
> CSSMatrix getMatrixFromBounds(x,y,[optional] width, height)
>
> 1. Use the canvas width and height as the limits, 2, return a css matrix.
>
> The author is responsible for using the matrix to translate points.
>
>
I think maybe I didn't make my point clear. As far as I know, CSS is live. I
can take an iframe of an entire page, I can apply CSS to transform it (say
45 degrees into the screen), and that page is LIVE. There is no other author
intervention needed beyond that. You can see an example here
http://www.html5rocks.com/en/tutorials/3d/css/

So, if understand the CSS shader proposal correctly, it's basically to make
those transformations more under use control. Instead of just orienting a
plane in 3d space I can now use a vertex shader to morph the HTML into any
shape I can dream of (see the examples in the proposal of crumpled paper on
this page http://www.adobe.com/devnet/html5/articles/css-shaders.html)

But, in order for that to work like all other CSS to date (that I know of).
The browser needs to transform the mouse clicks to match the crumpled paper.
Those clicks need to go through the same transformations as the vertices so
find out where in the content on the crumpled paper they are hitting.

Received on Monday, 3 October 2011 21:33:36 UTC