topical media & game development

talk show tell print

mobile-query-three-plugins-datguituner-examples-index.htm / htm



  <!doctype html><title>Minimal tQuery Page</title>
  <script src="../../../build/tquery-bundle.js">                        </script>
  
  <script src="../../assets/vendor/dat.gui/dat.gui.js">                </script>
  <script src="../../assets/vendor/dat.gui/dat.color.js">                </script>
  
  <script src="../tquery.datguituner.js"></script>
  
  <body><script>
          var world        = tQuery.createWorld().boilerplate().start();
  
          // setup some light
          tQuery.createAmbientLight().addTo(world).color(0x444444);
          tQuery.createDirectionalLight().addTo(world).position(1,1,-1).color(0xFFFFFF);
          tQuery.createDirectionalLight().addTo(world).position(-1,1,1).color(0xff00ff).intensity(2);
  
          var object	= tQuery.createTorus(0.5-0.15, 0.15, 8*6, 6*6).addTo(world)
                          //.setBasicMaterial().color(0x00ff00).back();
                          .setPhongMaterial()
                                  .ambient(0x444444)
                                  .color(0xFF88FF) 
                                  //.metal(true)
                                  //.perPixel(true)
                                  .back()
  
          world.removeCameraControls(); 
          world.tCamera().position.z        = 2;
  
          // animate the object
          // world.loop().hook(function(){
          //         var angle        = 0.001 * Math.PI*2;
          //         object.rotateX(angle)
          //         object.rotateY(angle*2)
          // })
  
  

/////////////////////////////////////////////////////////////////

// very simple example

/////////////////////////////////////////////////////////////////

//tQuery.DatguiTuner('light');

/////////////////////////////////////////////////////////////////

// more complex example

/////////////////////////////////////////////////////////////////

// init dat.gui var gui = new dat.GUI(); // add all lights tQuery.DatguiTuner({ selector: 'light', gui : gui }); // add the materialss tQuery.DatguiTuner({ selector: tQuery('mesh').material().get(), gui : gui }); </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.