topical media & game development

talk show tell print

mobile-query-three-js-plugins-lights-tquery.hemispherelight.js / js



  
Handle directional light @class include THREE.HemisphereLight. It inherit from {gray tQuery.Light} @borrows tQuery.Node#get as this.get @borrows tQuery.Node#each as this.each @borrows tQuery.Node#back as this.back
parameter: {THREE.HemisphereLight} element an instance or array of instance

  
  tQuery.HemisphereLight        = function(elements)
  {
          // call parent ctor
          tQuery.HemisphereLight.parent.constructor.call(this, elements)
  
          // sanity check - all items MUST be THREE.Light
          this._lists.forEach(function(item){ console.assert(item instanceof THREE.HemisphereLight); });
  };
  
  
inherit from tQuery.Light

  
  tQuery.inherit(tQuery.HemisphereLight, tQuery.Light);
  
  
Make it pluginable

  
  tQuery.pluginsInstanceOn(tQuery.HemisphereLight);
  
  
define all acceptable attributes for this class

  
  tQuery.mixinAttributes(tQuery.HemisphereLight, {
          intensity        : tQuery.convert.toNumber,
          distance        : tQuery.convert.toNumber,
          groundColor        : tQuery.convert.toThreeColor
  });
  
  


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