Skip to content

The Basics of XML3D

lachsen edited this page Feb 27, 2013 · 25 revisions

Introduction

XML3D is an extension to HTML. Just as you write HTML for text and images like so:

<p>
   This is some generic paragraph <span>with a twist</span>
   <img src="yayColors.png" alt="and an image" />
</p>

You can write XML3D for 3D content:

<p>Following this paragraphs we will break the second dimension!</p>
<xml3d xmlns="http://www.xml3d.org/2009/xml3d" >
   <mesh src="yayVertices.xml" />
</xml3d>
<p>... did you see it?</p>

About XML3D inside of XHTML:

  1. All XML3D elements inside of XHTML use the http://www.xml3d.org/2009/xml3d namespace
  2. All 3D content is declared inside an <xml3d> element, which defines the canvas through which the 3D scene is displayed.
  3. The <xml3d> element is displayed as an inline-block element like <canvas> and can be styled exactly the same way.
Clone this wiki locally