topical media & game development
mobile-query-three-plugins-test-index.htm / htm
<!doctype html><title>Minimal tQuery Page</title>
<script src="../../build/tquery-bundle.js"></script>
<script src="../../vendor/threex/THREEx.GeometryWobble.js"></script>
<script src="../wobble/tquery.geometry.wobble.js"></script>
<script src="../js/mathrandomseedable.js"></script>
<body><script>
//Math.seed(1328475429280);
var world = tQuery.createWorld().boilerplate().start();
tQuery.createAmbientLight().addTo(world).color(new THREE.Color(0x444444));
tQuery.createDirectionalLight().addTo(world);
tQuery.createDirectionalLight().addTo(world);
tQuery.createDirectionalLight().addTo(world);
var material = new THREE.MeshPhongMaterial({
ambient : 0x444444,
color : 0xFF5588,
specular: 0xffffff,
specular: 0xCC88ff,
shininess: 400,
map : THREE.ImageUtils.loadTexture( "water.jpg" )
});
var object3d = tQuery.createSphere(0.5, 32, 16, material).addTo(world);
object3d.geometry().zoom(2).wobble().back();
world.loop().hook(function(delta){
var piSecond = delta * Math.PI;
//object3d.rotateY(45*piSecond/180);
object3d.rotateZ(45*piSecond/180);
});
</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.