[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Matrix objects in JavaScript






On Thu, Mar 21, 2013 at 2:46 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

On 3/21/13 5:40 PM, Florian Bösch wrote:
Neither, this one is faster:

mat4Rotate(window.getComputedStyle(element).transform, 45,
element.style.transform)

You do realize that window.getComputedStyle(element).transform is a string that looks something like "matrix(1, 2, 3, 4, 5, 6)" or whatnot?


which is why the suggestion is

   mat4Rotate(window.getComputedStyle(element).transformAsFloat32Array, 45, element.style.transform)


 
Hence Rik's use of something like .transformMatrix that would return the transform in ... some sort of non-braindead format, whatever it is. Because the string version is braindead for matrix manipulation, for sure.

-Boris


-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------