Skip to content

Instantly share code, notes, and snippets.

@lachsen
Created November 4, 2013 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lachsen/7301988 to your computer and use it in GitHub Desktop.
Save lachsen/7301988 to your computer and use it in GitHub Desktop.
Boilerplate code for an XML3D scene in HTML using xml3d.js
<!doctype html>
<html>
<head>
<title>XML3D Boilerplate Code</title>
<!-- Include the xml3d.js library first -->
<script type="text/javascript" src="http://www.xml3d.org/xml3d/script/xml3d.js"></script>
<!-- Other <script> tags -->
</head>
<body>
<!--
You can place an xml3d element anywhere inside <body>.
Currently we only support inline style properties to style the xml3d element
-->
<xml3d style="width: 600px; height: 400px;" activeView="#currentView" >
<!--
The view element determines the camera position of the 3D scene.
When using multiple <view> element, you can select one view by document id via the activeView attribute of <xml3d>
-->
<view id="currentView" />
</xml3d>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment