Follow the bouncing app
Right now, however, the Famo.us physics engine may be the most interesting. The idea here is to take the kinds of physics that are usually associated with high-end videogames and allow programmers to apply them to objects on a Web page -- without needing to know the nitty-gritty of those engines. This could be something as simple as an overscroll bounce, for instance, or something a good deal more complex.
One demo, called "One to Many," shows a grid made of squares that are viewable from multiple angles. Click on it, and the squares arrange themselves into a stack -- again, viewable from multiple angles. The physics engine allows the programmer to specify such parameters as different, preprogrammed easing functions for the transitions, so many polished-looking effects that used to require lots of hand-coding can now be done out of the box.
Another Famo.us demo shows how the physics engine can be used to create responsive designs for applications. The demo involved a sphere made out of other spheres, with each sphere using a
repulsion property to allow them all to maintain an equal distance from each other, even after adding more spheres. In the same way, elements on a Web page can be assigned physical properties. As Famo.us's folks put it, this is that well-worn Web buzzword "responsive design" taken to the next level.
Yet another demo, an image gallery, makes it more clear how Famo.us works with the existing browser object model in a useful way. When I clicked on any of the images to zoom in on them, I was also able to right-click the image and open it in a new browser tab -- just as I would if the image had been displayed on a conventional Web page. Text showed up as regular text, too. A final demo involves a simple incarnation of a Twitter reader app with an infinite scroll view and a smooth-sliding display.
Working in the real world
Famo.us is intended to be cross-browser, so I tried it in every browser I could get my hands on -- with mixed results. Chrome and Safari yielded the best results. The 3D objects themselves rendered fine in Firefox, but the object controls didn't always work. On both my iPad Mini and my Android smartphone, the images were still smooth and flowing, if slightly less impressive on the smaller screens.
A new power tool
An easy criticism of Famo.us is that 3D on the Web is nothing new, but Fetterman argues that the larger point of Famo.us is not to reinvent the wheel. "We're not inventing 3D on the Web, nor are we inventing WebGL. Famo.us is just an integration of a lot of these technologies to make it easy for someone to build this stuff. It's hard to achieve the sort of level of sophistication and performance you see in a native iOS, Objective-C app by way of a Web technology."
The strategy, as he put it, is to "build beautiful things," get as many people as possible using them, "then have everyone else catch up -- which is better than having us boil ourselves down to the least common denominator."
The framework, along with a pack of templates to get people up and running with it quickly, is being released as an open source project under the Mozilla Public License Version 2.0. Famo.us is planning to make money from its work by offering a cloud-hosted analytics system, which app developers can hook into if they so choose -- it's not mandatory.