[whatwg] Web Applications and 3D
ian at hixie.ch
Fri Apr 29 01:06:01 PDT 2005
On Thu, 28 Apr 2005, Matthew Raymond wrote:
> > The current idea is to do the same for '3d' as for '2d', probably
> > using an OpenGL ES API subset, tweaked to be appropriate for use from
> > Unfortunately I know very little about 3D graphics myself so someone
> > else is going to have to actually define the API.
> I've done some work with OpenGL. I'd be happy to write a first draft.
That would be great.
> > > ...what happens when you want objects for your 3D world to exist in
> > > the DOM? What happens when you want 3D effects that change when you
> > > use a different stylesheet?
> > What's the use case? The use cases that people have raised for 3D so
> > far are primarily games (as in Quake-like things). In those, you don't
> > really need to have a DOM representation, and stylesheets are unlikely
> > to be used for styling them.
> The problem with a <canvas> solution is that the entirety of the 3D data
> has to exist within the <canvas> element. If you want multiple elements in the
> markup to map to a single 3D window, then <canvas> doesn't really work.
Right, but my question is what's the use case for having objects for your
3D world exist in the DOM?
> > Having said that, there are probably use cases for declarative 3D,
> > just like there are with declarative 2D. And for those you would use a
> > dedicated markup language, just like you use SVG for 2D graphics.
> My point was that I'd like to see a CDF (not the CAD kind, but the W3C
> kind) that uses XHTML + X3D, or XHTML + CSS + XBL2 + X3D. While I think
> it has a lot of potential, I don't know enough about how the respective
> standards to determine would work together. (This is partly because of
> my lack of knowledge of XBL2 and X3D...)
If it wouldn't work together, it indicates a problem in the X3D spec (or
the lack of an appropriate 3D declarative markup language).
Creating a 3D markup language is somewhat outside the purview of this
working group, though.
> I already knew the HTML. I was kinda hoping to see the CSS/XBL2 part of
> that equation. That's the part I'm confused about. Does XBL2 have a CSS
> binding property like XBL 1.0?
XBL2 doesn't exist yet, but the idea is it will have that, yes.
> > > 2) An example of something similar to Quake done entirely as a web
> > > application, with a HUD.
> > That's pure <canvas>, with a 3D context for the 3D, and a 2D context
> > for the HUD.
> Well, that depends on whether you're using <canvas> or X3D.
I don't see people writing 3D games using a declarative format. Maybe for
the models, as external files that are slurped in (just like external
bitmaps are used as sprites with 2D canvas), but that's very different
from having the 3D in the document.
> I mean stuff like having windows that get smaller when they're further
> back in the Z-order. Perhaps there's a fog effect. You could have
> various <section> elements rendered within a 3D environment, where the
> user looks in a specific direction or in a specific place to see the
> <section> inside a 3D environment. Stuff like that.
That'd just be up to the UA, really.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg