topical media & game development
mobile-query-three-plugins-lightsaber-examples-index.htm / htm
<!doctype html><title>Minimal tQuery Page</title>
<script src="../../../build/tquery-bundle.js"></script>
<script src="../tquery.lightsaber.js"></script>
<script src="../../skymap/tquery.skymap.js"></script>
<script src="../../skymap/tquery.cubetexture.js"></script>
<body><div id='info' style='color:white;'>
Demo for
<a href='http://jeromeetienne.github.com/demo.ridinglight/' style='color:white;' target='_blank'>tQuery.LightSaber</a>
<br/>
For a more elaborate usage, see
<a href='github.com/jeromeetienne/demo.ridinglight' style='color:white;' target='_blank'>"Riding a Beam of Light"</a>
</div><script>
// init the world
var world = tQuery.createWorld().boilerplate().pageTitle('#info').start();
// make the background black
world.tRenderer().setClearColorHex( 0x000000, 1 );
// create the saber
var saber = tQuery.createLightSaber().addTo(world);
// change the material of the hilt
var material = tQuery.createMeshBasicMaterial({
color : 0x44aaFF,
envMap : tQuery.createCubeTexture('skybox')
})
saber.object3D('hiltIn').material(material)
saber.object3D('hiltOut').material(material)
</script></body>
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.