hacks.mozilla.org

Daily Archive for June 23rd, 2009

using svg filters to display 3D data

This demo is from Hans Schmucker, who has made a large number of interesting demos using Firefox 3.5 features. Tomorrow we’ll also have another neat demo from him as well.

Hans has used the CSS filter property and an SVG filter to do something really interesting – rendering a 3D perspective from Voxel data. Hans’ comment at the bottom of the demo is quite flattering:

Frankly, I didn’t expect this to work, primarily because the filter is very, very long. It needs to process around 30 operations to generate each frame (4 operations for each of the 5 layers + 5 for the texture + 3 for the texture transformation), and that’s with a 768×512 surface. It’s not very difficult to understand, but there’s simply a lot of processing needed and the speed at which Firefox renders this is nothing short of amazing.

If you’re interested in background also make sure to check out Hans’ post Perspective texture with 6 lines of SVG where he explains how to use filters to create this effect. Anyway, have a look at the demo – it’s very interesting.

opacity in Firefox 3.5

This is a very short post, but it’s worth putting up because it shows how browser features go from a vendor-specific implementation to a fully supported standard.

In Firefox 3.5 we no longer support the Mozilla-specific CSS property -moz-opacity. Developers wanting to set the opacity of an element should use the standard opacity property instead.

We introduced the opacity property way back in Firefox 0.9 and -moz-opacity was deprecated. And with Firefox 3.5 we’ve finally removed it.

A long road for a simple property, but it’s worth mentioning so people understand the time scale for these kinds of features and how they relate to standards.