[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 4:04 AM, Si Robertson <retromodular@gmail.com> wrote:
I have to say I can not think of any reason for native matrix objects to be implemented by browser vendors unless those objects (a) provide a significant performance gain over custom code, and (b) are compatible with WebGL.

The main reason is to make the life of authors easier. Today, they have to parse and create string matrices which is a huge pain and very slow.
A secondary reason is to harmonize SVG, Canvas and CSS so authors don't have to learn 3 different matrices.

We know that WebGL has more stringent performance requirements. We'd like the matrix class to be useful for WebGL as well so if we're open to changing the interface.
However, easy of use is more important to us than raw performance.

Matrix operations that work on typed arrays are very fast already if the code is optimised, and it is relatively easily to avoid creating new type arrays when needed.

If you read the thread, you'll see that Dean Jackson from Apple talked to their JS engineers and they believed that this class would be faster than typed arrays.

On 21 March 2013 10:24, Florian Bösch <pyalot@gmail.com> wrote:
On Thu, Mar 21, 2013 at 11:19 AM, Kirill Prazdnikov <kirill.prazdnikov@jetbrains.com> wrote:
Will it be a helper library or part of WebGL API ?
Neither. It would be implemented in the browser, not related to WebGL, and in  my opinion, unusable for it.