

iOS8 to support WebGL – is this the end for matrix3d frameworks like famo.us? - t-plane

There&#x27;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 &quot;matrix3d&quot; 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:&#x2F;&#x2F;periodic.famo.us and http:&#x2F;&#x2F;famo.us&#x2F;demos&#x2F;.<p>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&#x27;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.<p>There is, however, a web technology that can do it much better. Its called WebGL, and it&#x27;s been around for a few years now. WebGL operates completely differently from the way famo.us does. It, instead, relies on HTML5&#x27;s canvas tag and its also GPU accelerated. Because it uses canvas, which is basically a pixel based drawing board, it&#x27;s much more flexible in regards to what it can display. Downside is that you can&#x27;t use any of html elements we are so used to. For example, if you want to create a text input, you&#x27;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:&#x2F;&#x2F;threejs.org&#x2F;examples&#x2F;.<p>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?
======
thealphanerd
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

~~~
t-plane
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.

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

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

------
qhoc
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...)

------
apostle_petr
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.

------
rawbot69
Lol Unity3D is the way to go

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

