topical media & game development

talk show tell print

mobile-query-three-tips-tquery-skymap-02-reflection-index-dst.htm / htm



  <!doctype html><title>Minimal tQuery Page</title>
  <script src="../../../build/tquery-bundle-require.js"></script>
  <body><script>
  require(['tquery.skymap'], function(){
          // create a 3d world, use the boilerplate and start it
          var world        = tQuery.createWorld().boilerplate().start();
  
          // create the cube texture
          var cubeTexture        = tQuery.createCubeTexture('skybox');
  
          // add a skymap - reuse same texture to save gpu memory
          tQuery.createSkymap(cubeTexture).addTo(world);
  
          // use it in the envMap in a object material
          tQuery.createTorusKnot().addTo(world)
                  .setBasicMaterial()
                          .envMap(cubeTexture)
                          .back();
  
  });
  </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.