topical media & game development
mobile-query-three-plugins-requirejs-examples-main-dev.js / js
require(['tquery.planets'], function(){
var world = tQuery.createWorld().boilerplate().start();
var planet = tQuery.createPlanet().id('obj').addTo(world);
// setup light
tQuery.createDirectionalLight().addTo(world).position(1,1,1);
tQuery.createDirectionalLight().addTo(world).position(-1,1,1);
tQuery.createAmbientLight().addTo(world).color(0xFFFFFF);
// make the object rotate
world.loop().hook(function(delta, now){
var angle = 0.05 * now * Math.PI * 2;
planet.get(0).rotation.y = angle;
});
});
(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.