Difference between revisions of "X3D and HTML5 Summary"

From Web3D.org
Jump to: navigation, search
(keep examples separate from key points)
m
Line 39: Line 39:
  
  
* Simple X3D + HTML5 examples; (how current integration looks like via object model then to html5)
+
* Simple X3D + HTML5 examples;  
 
** X3D scene as external reference (Anchor link)
 
** X3D scene as external reference (Anchor link)
 
** X3D embedded in object tag  
 
** X3D embedded in object tag  
Line 56: Line 56:
  
 
* Joe - draft Example #1, served as application/xhtml+xml
 
* Joe - draft Example #1, served as application/xhtml+xml
 +
 +
      (how current integration looks like via object model then to html5)
  
 
       <za href='aScene.x3d' title='A new X3D document window'>Enter My Scene</a>
 
       <za href='aScene.x3d' title='A new X3D document window'>Enter My Scene</a>

Revision as of 15:55, 13 October 2009

Status: these are draft slides for the X3D and HTML5 effort that will be provided to the Technical Plenary Week (TPAC) 2009.

  • Family of X3D Specifications;
    • X3D Abstract Specification describes basic functionality
    • Three file formats are available: XML (.x3d), ClassicVRML (x3dv), and Compressed Binary Encoding (.x3db)
    • High-performance Application Programming Interfaces (APIs) are defined for Ecmascript (Javascript) and Java


  • X3D Strengths
    • Non-profit Web3D Consortium maintains and extends X3D via working groups
    • Set of International Standards certified over 12-year period by multiple national bodies in ISO
    • Multiple implementations are available (open and commercial source)
    • Numerous resources available online, including specifications themselves
    • Third-generation 3D graphics language that extends predecessor Virtual Reality Modeling Language (VRML97)
    • Long-time W3C member and contributor
    • Formal liaisons and working partnerships with International Organization for Standardization (ISO), Open Geospatial Consortium, Khronos, Digital Imaging and Communicatons in Medicine (DICOM)


  • Relationships between scene graphs, APIs and render layers;
    • Scene graphs are high-level declarative models about how geometry is constructed, colored and animated; these can be expressed as an XML tree
    • APIs are mid-level libraries for programmers to create imperative source code about geometry and animation (various proprietary codebases, O3D, perhaps WebGL)
    • Render layers are low-level software libraries that expose the functionality of graphics hardware (e.g. OpenGL, DirectX)


  • Similarities between MathML, SVG, and X3D;
    • MathML describes mathematical expressions and then renders a presentation of them
    • Scalable Vector Graphics (SVG) describes and presents renderings of 2D shapes, with optional animation and interaction
    • Extensible 3D (X3D) describes and presents renderings of 3D shapes, with optional animation and interaction
    • All three languages are formally specified and have well-developed XML encodings
    • Authors want to use these languages for multimedia content in HTML pages


  • X3D scene graph APIs
    • X3D Scene Access Interface (SAI) provides a consistent standardized high-performance API
    • X3D SAI has Ecmascript and Java bindings, other programming languages can be added
    • X3D SAI is functionally equivalent and has same expressive power as file formats
    • Document Object Model (DOM) is also legal (X3D is XML after all) but infrequently used because of low performance


  • Simple X3D + HTML5 examples;
    • X3D scene as external reference (Anchor link)
    • X3D embedded in object tag
    • HTML5 with embedded X3D as mixed-namespace document
    • Forthcoming InstantReality X3DOM javascript demo: html5+x3d with event passing connections
    • (Can we structure our non-scripted examples to correspond to MathML and SVG examples?)
    • (We likely need multiple examples corresponding to DOM/SAI approaches)


  • Recommendation actions for HTML5 Recommendation
    • Ensure proper X3D references in HTML5 specifications
    • Document correct integration and best practices
    • What about XHTML?
    • Other recommendations?


  • Joe - draft Example #1, served as application/xhtml+xml
      (how current integration looks like via object model then to html5)
      <za href='aScene.x3d' title='A new X3D document window'>Enter My Scene</a>
      (html anchor link; z is artifact).
      In this case the host browser uses whatever it has access to in order to create a new window browsing context for the target .x3d resource. 
      <object name='x3d' type='model/x3d+xml' allow-same-origin allow-scripts>
         <param name='src' value='aScene.x3d'>
        <ztable>...</table>
      </object>
      Opens nested browsing context in parent block element.
      Fallback to html table. (s z is artifact). 
      Connections with DOM via event listeners (DOM<=>SAI). 
      Set of negotiated <param> pairs: initialization and runtime.
  • Joe - draft Example #2, served as application/xhtml+xml
      <?xml version="1.0" encoding="utf-8" ?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
          <style type=text/css'>
            x3d:X3D { height:200px;width:200px; }
          </style>
        </head>
        <body>
          <x3d:x3d xmlns:x3d="http://www.web3d.org/specifications/x3d-3.2.xsd">
            <x3d:Scene>
              <x3d:Shape>
                <x3d:Box x3d:size="4 4 4" />
              </x3d:Shape>
              <x3d:Shape>
                <x3d:Text x3d:string='"This is X3D Text"' />
              <x3d:/Shape>
          </x3d:Scene>
        </x3d:x3d>
      </body>
      </html>


  • Joe - draft Example #3, served as text/html
      <!DOCTYPE html>
      <html>
        <head>
          <style type=text/css'>
            X3D { height:200px;width:200px; }
          </style>
        </head>
        <body>
          <X3D>
            <Scene>
              <Shape>
                <Box size="4 4 4" />
              </Shape>
              <Shape>
                <Text string='"This is X3D Text"' />
              </Shape>
            </Scene>
          </X3D>
        </body>
      </html>