Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
iOS8 to support WebGL – is this the end for matrix3d frameworks like famo.us?
4 points by t-plane on Aug 7, 2014 | hide | past | favorite | 9 comments
There's been a lot of hype lately about famo.us, a javascript framework that claims to have solved performance issues in HTMl5. Famo.us gets its performance by heavily using "matrix3d" CSS property to allow positioning, rotation and alignment of elements by means of applying a 16 cell transformation matrix array onto these elements. Matrix3d is also one of the few CSS properties that reliably invoke GPU acceleration in the browser. You can see some demos of the framework @ http://periodic.famo.us and http://famo.us/demos/.

But there are alot of things that famo.us cannot do - one of them is rendering real 3d models. Reason for that is that famo.us relies on divs as its core building block, and divs are, by design, rectangular. To create a 3d mesh with famo.us, you'd need to create tons of tiny divs, positioned to create an illusion of a 3d object. Each one of these divs would need to have a matrix3d transformation applied to it. That quickly becomes extremely hard for a browser to render.

There is, however, a web technology that can do it much better. Its called WebGL, and it's been around for a few years now. WebGL operates completely differently from the way famo.us does. It, instead, relies on HTML5's canvas tag and its also GPU accelerated. Because it uses canvas, which is basically a pixel based drawing board, it's much more flexible in regards to what it can display. Downside is that you can't use any of html elements we are so used to. For example, if you want to create a text input, you'd have to create (or use) a class that actually creates one my means of canvas. You can check out some examples of WebGL @ http://threejs.org/examples/.

And now, Apple has made and announcement that webGL is coming to the iPhone near you. What do you think that means for things like matrix3d and famo.us? Would this prompt more developers to use webGL? Or would the two technologies compliment each other?



Hey t-plane. Famo.us offers a bit more than just matrix 3d transforms, in fact one of the best ways to think about how famo.us handles dom is more of a transport layer. There is no reason that famo.us could not use the same entity pattern and tree to render to webgl, we just have not been focusing on it (yet).

Disclaimer I work at Famo.us


I hear you, man. But, as we know it, famo.us, is all about matrix3d. And I haven't seen a webGL renderer for it yet. On the other hand, three.js added css3d renderer and it works pretty well with their already established webGL approach.


Keep your eyes peeled for the stuff we are going to announce next Wednesday :D


Ok! Webgl and camera support is all we need from it!


hey - so, I checked out the meeting. Didn't really hear anything new - did I miss something?


The answer is yes. Using other html/css framework plus WebGL, you can do pretty much anything to match. Also it's faster and easier since most people are more familiar with those frameworks (i.e. bootstrap, angular, ionic framework, zurb...)


I think they compliment each other whether or not they work together. More options for anything increases interest in that whole subject and interest causes the options to be improved.


Lol Unity3D is the way to go


sure is, but it doesn't work in a mobile browser, though!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: