Skip to content

Instantly share code, notes, and snippets.

@swederik
Last active December 17, 2015 18:29
Show Gist options
  • Save swederik/5653223 to your computer and use it in GitHub Desktop.
Save swederik/5653223 to your computer and use it in GitHub Desktop.
Testing CTM support for XTK
<html>
<head>
<title>XTK TEST WITHOUT COMPILATION</title>
<script type="text/javascript" src="http://localhost:8000/X/lib/google-closure-library/closure/goog/base.js"></script>
<script type="text/javascript" src="http://localhost:8000/X/xtk-deps.js"></script>
<script type="text/javascript" src="http://localhost:8000/xtktest/lzma.js"></script>
<script type="text/javascript">
// include all used X-classes here
// this is only required when using the xtk-deps.js file
goog.require('X.renderer3D');
goog.require('X.mesh');
var run = function() {
var r = new X.renderer3D();
r.container = 'r';
r.init();
var surface = new X.mesh();
surface.file = 'http://localhost:8000/xtktest/cube.ctm'
r.add(surface);
r.render();
};
</script>
<body onload="run()">
<div id="r" style="background-color: #000000; width: 100%; height: 100%;"></div>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment