tar xjf firefox-3.7a1pre.en-US.linux-x86_64.tar.bz2
Navigate to about:config, click I’ll be careful, I promise!
Enter webgl in the filter. Double click webgl.enabled_for_all_sites
Come back here, and rotate the image below using your mouse.
View source. Note the use of a namespace and mixed case element and attribute names. We will be discussing this tomorrow.
Something else to note about the namespace is that it’s quite non-standard — the X3D spec does not use namespaces at all. The string used here was made up by Xj3D (which incidentally happens to have pretty bogus namespace parsing code, when I last looked at it), and then copied by this X3D script because I had to use something to make it work sanely in XHTML. (I wrote the initial rough prototype of this X3D thing a couple of years ago, and just used XHTML because I didn’t want to have to fight with HTML parsers). I guess it’ll end up being a de facto standard, which is alright as long as the people who own the namespace URL’s domain don’t mind.
Some more X3DOM — a nice example that allows you to rotate a 3D shape using the mouse. What’s particularly impressive to me is how little code is required to create the page; just view source to see! A couple of interesting discussions on the...
Someone asked the Web3D consortium for a normative namespace URI in 2005: [link]
No answer, just a link to a wiki page that uses [link] .
I don’t like the version number, but at least it resolves to something.
I saw that suggestion when originally looking at X3D, but putting versions in the namespace URL seemed like an awful idea — people will want to merge documents from different versions (e.g. import an old external model file into your new scene), and if they have different namespaces then APIs like getElementsByTagNameNS will become unusable, and backward compatibility with UAs will be destroyed because old UAs won’t recognise the new namespaces even if they could gracefully handle the new content. Those issues seem much more important than resolvability.
It’s working with my 3.7 Windows nightly Dave. Mine’s a portable version, but it shouldn’t be any different. I see nothing at all using the 3.6b2pre nightly. The resize of the source window drives my computer bonkers however. I have to alt-tab to a non-Firefox window and then click to be able to do anything at all. That’s still pretty small code to be doing that.
Regarding the X3D version number being part of the URI reference, our rationale has been that this is necessary because each version of X3D (3.0, 3.1, 3.2) has defined a different vocabulary that is mostly a superset of the previous one. Further, using eponymous labels for the URI and schema itself makes it easier for authors or tools to perform validation correctly. The schemas themselves are available at [link]
Certainly other design rationales are possible, am happy to discuss further if you like.
p.s. the X3D version attribute is recorded separately, and each schema has been backwards compatible. In other words, the 3.2 schema supports version=3.2 3.1 or 3.0, while the 3.1 schema supports version=3.1 or 3.0. So in practice we haven’t encountered any difficulties with this approach. Further feedback remains welcome.