News for hackers. Stuff that matters.
Re:Building a pure CSS 3D City by javanix on Tuesday July 12, 2011 @10:44AM (#2754883)
A lot of these CSS posts reference the performance gains realized from using CSS transforms as opposed to canvas because the transforms are hardware-accelerated.

How long will it be before canvas gets hardware-accelerated? Is there a technical hurdle that needs to be overcome in getting (for example) V8 to talk directly to GPUs?

Re:Building a pure CSS 3D City by Hovertruck on Tuesday July 12, 2011 @10:49AM (#2754899)
IE9 has hardware-accelerated canvas. It's a work-in-progress in most major browsers I believe.
Re:Building a pure CSS 3D City by ineedtosleep on Tuesday July 12, 2011 @11:46AM (#2755140)
Chrome also has a GPU-accelerated 2D canvas, but you have to enable it in the about:flags page.
Re:Building a pure CSS 3D City by pak on Tuesday July 12, 2011 @12:17PM (#2755293)
Canvas is still 2D though, so unless they develop a 3D drawingContext for canvas, you won't be able to do what's in this article with the same kind of hardware acceleration. With canvas you'd still need to run all your own poly drawing routines, while I imagine Webkit is able to take 3D CSS properties and map <div>'s straight to polys that render with hardware T&L pipelines. (Which makes me wonder, how the heck are they dealing with Z-order?)
Re:Building a pure CSS 3D City by timb on Tuesday July 12, 2011 @01:07PM (#2755473)
There already is a hardware accelerated 3D context that uses the canvas element... WebGL!
Re:Building a pure CSS 3D City by pak on Tuesday July 12, 2011 @01:27PM (#2755552)
Whoa, didn't realize WebGL used canvas. Cool.
Re:Building a pure CSS 3D City by amadeus on Tuesday July 12, 2011 @01:48PM (#2755661)
Tried cranking up the number of buildings...

http://dl.dropbox.com/u/18782/durp.html

Re:Building a pure CSS 3D City by zheng on Tuesday July 12, 2011 @12:02PM (#2755233)
For the record, even though all of his live demos are marked Safari only, they work just fine in Chrome (for me anyways)
Re:Building a pure CSS 3D City by chime on Tuesday July 12, 2011 @01:28PM (#2755559)
If anyone likes this kind of stuff, you might find my weekend project to be interesting: https://zetabee.com/weave/

You can make pretty 2D designs using CSS:

https://zetabee.com/weave/share/5e6a5811

https://zetabee.com/weave/share/c6593101

It is similar in concept to Structure Synth ( http://structuresynth.sourceforge.net/ ) but in 2D and using CSS. I was thinking of making a browser-based 3D Structure Synth but not many people seem to like making art with code.

Re:Building a pure CSS 3D City by 51Cards on Tuesday July 12, 2011 @10:35AM (#2754847)
Very very creative! A browser based SimCity clone should theoretically be possible with enough processing power.
Re:Building a pure CSS 3D City by chime on Tuesday July 12, 2011 @01:40PM (#2755621)
Re:Building a pure CSS 3D City by ggruschow on Tuesday July 12, 2011 @10:54AM (#2754918)
You could skip all the CSS transformation stuff and just serve the browser the images in the orientation you want them. In this projection and buildings-of-cubes, there's only 2 perspectives for a wall and 1 for ground/roofs.
Re:Building a pure CSS 3D City by lobo_tuerto on Tuesday July 12, 2011 @06:14PM (#2756853)
And how does real time spinning and panning work with your suggestion?

You need the transformations to make the buildings spin in your browser window. Didn't you see the demo?

Re:Building a pure CSS 3D City by ggruschow on Wednesday July 13, 2011 @08:07AM (#2758667)
Panning would work fine since the objects in this projection don't change anything but position with panning. Spinning would only work in 90 degree increments, but that's fine for many, maybe most cases you'd be doing this. Most isometric-ish projection systems I recall seeing don't spin / change perspective. I'd imagine that's because it's disturbing to look at since things don't get smaller as they get farther away. For whatever reason the static version doesn't induce the same reaction.
Re:Building a pure CSS 3D City by ggruschow on Tuesday July 12, 2011 @05:44PM (#2756740)
What did I say that called for downvoting?