<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Demo: XML3D - Interactive 3D Graphics for the Web</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kristian Sons DFKI Saarbrücken</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Germany</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Philipp Slusallek DFKI Saarbrücken</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>XML3D is a extension to HTML5 to support interactive 3D graphics in the Browser. XML3D is designed to integrate and inter-operate well with ubiquitous W3C standards such as DOM, CSS, and others. Embedding XML3D into this family of standards brings many bene ts: It allows millions of exiting web programmers to directly apply their existing knowledge also to interactive 3D graphics. The XML3D proposal and its implementations serve as a demonstrator platform for the W3C Community Group "Declarative 3D for the Web Architecture". In this demo description, we present a selection of features of XML3D, that demonstrate the advantages of a web-based declarative approach to 3D graphics.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;HTML5</kwd>
        <kwd>CSS3</kwd>
        <kwd>XML3D</kwd>
        <kwd>WebGL</kwd>
        <kwd>DOM</kwd>
        <kwd>Web Integration</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>An important design question is why we decided to design a
new description rather than using an existing format. Only
few platform and rendering independent 3D description
exist. The probably most well-known is X3D, the
successor of VRML. Though there is an integration model into
HTML via plug-ins, the development of VRML/X3D and
Copyright c 2012 for the individual papers by the papers’ authors.
Copying permitted only for private and academic purposes. This volume is
published and copyrighted by its editors.</p>
      <p>
        Dec3D2012 workshop at WWW2012, Lyon, France
Web Technologies such as HTML, DOM and CSS was
autonomous. Thus X3D comes with its own run-time and event
model and includes concepts unknown in the DOM/HTML
world. A possible approach to these problems is to
streamline X3D and to extend it with features such as event
attributes and CSS. This has been shown in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>The pervasiveness of HTML, CSS and DOM technologies
is much higher than for any 3D graphics format. That's
the main reason why we rated the compatibility to HTML
and CSS higher than backwards compatibility to a speci c
existing format.</p>
      <p>Recently two low-level graphics APIs for the Web popped
up, namely WebGL and Stage3D, which provide a wide
spread of 3D capabilities in the Browser. However, opposed
to a declarative approach, it's not possible to develop 3D web
application without a basic understanding of the
rasterization pipeline. In our demos we want to show the similarity
in developing a XML3D enhanced web application compared
to standard web development.</p>
    </sec>
    <sec id="sec-2">
      <title>2. DEMOS</title>
      <p>In the following section we will describe a selection of demos
that demonstrate the capabilities of XML3D. The focus for
the selection was integration into HTML, interaction
methods, debugging of 3D scenes and building Mash-ups. The
demos are online at http://www.xml3d.org/.</p>
    </sec>
    <sec id="sec-3">
      <title>2.1 Integration and Interaction</title>
      <p>The rst simple demo is a XML3D scene integrated into a
HTML5 web page. It shows a Rubik's cube (s. Figure 1).
The 3D geometry is described using the XML3D format. It
was exported from a 3D modeling application. To integrate
this XML3D export into a web page, the web author has just
to copy the content into an exiting web page. To add
interaction to this scene, the author can e.g. add onmouseover
and onmouseout event attributes to the groups or meshes in
the scene and execute some arbitrary JavaScript code. The
example shows highlighting of the faces changing material
attributes. The faces are also con gured with onclick
attributes. If the users clicks on a face of the cube, a direction
selection widget is made visible and positioned in the right
place. Then again, this widgets has event listeners to nally
start rotating one layer of the cube via an animation.
All these actions are simple DOM manipulation tasks and do
not require a deep understanding of the 3D graphics pipeline,
shaders etc. The DOM manipulations tasks can even be
simpli ed using libraries such as jQuery. This demo uses
the JS/WebGL implementation of XML3D and runs in every
WebGL-capable Browser.</p>
    </sec>
    <sec id="sec-4">
      <title>2.2 Rendering independence and Debugging of scenes</title>
      <p>The second demo shows three aspects of XML3D: At rst,
XML3D is not tied to a certain graphics API. For the demo,
we use our native XML3D implementation, a modi ed
version of the Chromium Browser that supports OpenGL
rendering as well as real-time ray tracing to display the
interactive Virtual Museum scene.</p>
      <p>Debugging of 3D scenes is still a major issue in all
visualization systems. In the native implementations of XML3D, we
can use the development tools that come with the Browser
to debug the scene. We use the Inspector to select an object
in the 3D scene and the inspector highlights the
representation in the DOM. It also possible can (de)activate CSS
assignments interactively. Web developers can debug their
3D web application using the tools they already know from
standard web development. Again, this is possible because
XML3D is integrated so tight into HTML and and related
technologies.</p>
    </sec>
    <sec id="sec-5">
      <title>2.3 Drag and drop and Textures from crossdomains</title>
      <p>In the same demo scene, we show that drag and drop is
supported in XML3D. The usage is in the same way as
web developer know it from standard HTML elements. We
show this by dropping an image from a Google Image Search
onto a XML3D group with an ondrop event attribute. This
changes the texture used by the assigned shader.
This action shows another feature of declarative approaches:
We have the possibility to use prede ned materials. This
disables the possibility to read the foreign image from a script
using a timing attack. This is an advantage compared to
imperative approaches such as WebGL, disallowing usage
of cross-domain elements as textures respectively requires
CORS approval.</p>
    </sec>
    <sec id="sec-6">
      <title>2.4 Mash-ups and Semantics</title>
      <p>The third demo shows, how HTML, XML3D, and
XMLHttpRequest are used in combination with a RESTful web
service to visualize data from external sources. Each
country in the 3D world map is named by it's ISO country code.
The user can get the full English country name by
hovering over the country, again using simple onmouseover and
onmouseout events in combination with jQuery UI pop-ups.
The user can select a topic, an indicator and a time range
from three selection menus. These menus are populated
dynamically by querying the World Bank database for available
data sets. Once the user has selected a data set, the World
Bank is queried for the data sets for all available countries.
The result is displayed by adapting the height of the
countries and their color.</p>
      <p>
        Information visualization is a good use-case for declarative
3D. Often, no real, but pseudo-3D is required for a good
representation of the data. But the development of such
visualizations is often easier using real 3D data, because
then the projection to 2D is automatically correct.
In this simple demo, the XML3D elements in the DOM are
hard-wired with the database entries from the World Bank
using the ISO country codes. Imagine using RDFa to
annotate the geometry representation of the countries.
Combining semantic Web technologies and semantic services with
XML3D has already been done in ISReal [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Johannes</given-names>
            <surname>Behr</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Peter</given-names>
            <surname>Eschler</surname>
          </string-name>
          ,
          <article-title>Yvonne Jung, and Michael Zollner. X3DOM: a DOM-based HTML5/X3D integration model</article-title>
          .
          <source>In Proceedings of the 14th International Conference on 3D Web Technology, Web3D '09</source>
          , pages
          <fpage>127</fpage>
          {
          <fpage>135</fpage>
          , New York, NY, USA,
          <year>2009</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Patrick</given-names>
            <surname>Kapahnke</surname>
          </string-name>
          , Pascal Liedtke, Stefan Nesbigall, Stefan Warwas, and Matthias Klusch.
          <article-title>ISReal: An open platform for semantic-based 3D simulations in the 3D Internet</article-title>
          .
          <source>In Proceedings of the 9th international semantic web conference on The semantic web -</source>
          Volume
          <string-name>
            <surname>Part</surname>
            <given-names>II</given-names>
          </string-name>
          , ISWC'
          <volume>10</volume>
          , pages
          <fpage>161</fpage>
          {
          <fpage>176</fpage>
          , Berlin, Heidelberg,
          <year>2010</year>
          . Springer-Verlag.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Kristian</given-names>
            <surname>Sons</surname>
          </string-name>
          , Felix Klein, Dmitri Rubinstein, Sergiy Byelozyorov, and Philipp Slusallek.
          <article-title>XML3D: Interactive 3D Graphics for the Web</article-title>
          .
          <source>In Proceedings of the 15th International Conference on Web 3D Technology, Web3D '10</source>
          , pages
          <fpage>175</fpage>
          {
          <fpage>184</fpage>
          , New York, NY, USA,
          <year>2010</year>
          . ACM.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>