topical media & game development

talk show tell print

mobile-query-three-plugins-shadowmap-tquery.light.shadowmap.js / js



  
little helper to set the width and height of the shadowMap

  
  tQuery.DirectionalLight.registerInstance('shadowMap', function(width, height){
          return this.shadowMapWidth(width).shadowMapHeight(height);
  });
  
  
little helper to set all shadowCamera params

  
  tQuery.DirectionalLight.registerInstance('shadowCamera', function(right, left, top, bottom, near, far){
          if( near !== undefined && far !== undefined ){
                  this.shadowCameraNear(near).shadowCameraFar(far);
          }
          return this.shadowCameraRight(right)
                          .shadowCameraLeft(left)
                          .shadowCameraTop(top)
                          .shadowCameraBottom(bottom);
  });
  
  tQuery.SpotLight.registerInstance('shadowMap', function(width, height){
          return this.shadowMapWidth(width).shadowMapHeight(height);
  });
  
  
little helper to set all shadowCamera params

  
  tQuery.SpotLight.registerInstance('shadowCamera', function(right, left, top, bottom, near, far){
          if( near !== undefined && far !== undefined ){
                  this.shadowCameraNear(near).shadowCameraFar(far);
          }
          return this.shadowCameraRight(right)
                          .shadowCameraLeft(left)
                          .shadowCameraTop(top)
                          .shadowCameraBottom(bottom);
  });
  


(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.