topical media & game development

talk show tell print

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



  <!doctype html><title>Minimal tQuery Page</title>
  <script src="../../../build/tquery-bundle.js"></script>
  
  <script src="../tquery.shape.js"></script>
  <script src="../tquery.shape.create.js"></script>
  <body><script>
          var world        = tQuery.createWorld().boilerplate().start();
          //var object	= tQuery.createTorus().addTo(world);
          
          shape        = tQuery.createHeartShape();
          //shape        = tQuery.createTriangleShape();
          //shape        = tQuery.createSquareShape();
          //shape        = tQuery.createCircleShape();
          //shape        = tQuery.createFishShape();
          //shape        = tQuery.createSmileyShape();
          //shape        = tQuery.createWheelShape();
  
          //shape        = tQuery.createTriangleShape();
          shape.extrude().toMesh().id('obj').addTo(world);
  
          tQuery('#obj')
                  .geometry().computeAll().normalize().center().rotateZ(Math.PI).back();
          
          tQuery.world.loop().hook(function(delta){
                  tQuery('#obj').rotateY(90 * delta * Math.PI / 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.