topical media & game development

talk show tell print

mobile-query-three-js-tquery.material.js / js



  
Handle material @class include THREE.Material. It inherit from {gray tQuery.Node} @borrows tQuery.Node#get as this.get @borrows tQuery.Node#each as this.each @borrows tQuery.Node#back as this.back
parameter: {THREE.Material} object an instance or array of instance

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

  
  tQuery.inherit(tQuery.Material, tQuery.Node);
  
  
Make it pluginable

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

  
  tQuery.mixinAttributes(tQuery.Material, {
          opacity                : tQuery.convert.toNumber,
          transparent        : tQuery.convert.toBoolean
  });
  


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