topical media & game development

talk show tell print

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



  <!doctype html><title>Minimal tQuery Page</title>
  <script src="../../../build/tquery-bundle.js"></script>
  
  <script src="../tquery.world.createfog.js"></script>
  <body><script>
          var world        = tQuery.createWorld().boilerplate().start();
  
          // add the fog
          world.addFogExp2({density: 0.1});
  
          // create lots of objects to show the fog
          var material        = new THREE.MeshBasicMaterial({
                  color        : 0xFFaa44
          });
          for(var i = 0; i < 20; i++ ){
                  // TODO this doesnt reuse the geometry... not too efficient
                  var object	= tQuery.createTorus(material).addTo(world);
                  object.translateZ(-i);
                  object.translateX(i % 2 ? -1 : 1);
          }
          
  </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.