topical media & game development
mobile-query-three-plugins-planets-examples-index.htm / htm
<!doctype html><title>Minimal tQuery Page</title>
<script src="../../../build/tquery-bundle.js"></script>
<script src="../../planets/tquery.createplanet.js"></script>
<body><script>
var world = tQuery.createWorld().boilerplate().start();
world.tRenderer().setClearColorHex( 0x000000, 1 );
// create the planet
var planet = tQuery.createPlanet('earthNormal').addTo(world);
tQuery.createAmbientLight().addTo(world).color(0xffffff);
tQuery.createDirectionalLight().addTo(world).position(-1, 1, 1)
.intensity(2)
.color(0xff8888)
tQuery.createDirectionalLight().addTo(world).position(+1, -1, 1)
.intensity(1)
.color(0x8888ff)
// make the object rotate
world.loop().hook(function(delta, now){
var angle = 0.05 * now * Math.PI * 2;
planet.get(0).rotation.y = angle;
});
</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.