topical media & game development

talk show tell print

mobile-query-three-plugins-modifiers-tquery.geometry.smooth.js / js



  tQuery.Geometry.registerInstance('smooth', function(subdivision){
          // init the modifier
          var modifier        = new THREE.SubdivisionModifier( subdivision );
          // apply it to each geometry
          this.each(function(geometry){
                  // apply it
                  modifier.modify( geometry )
          
                  // mark the vertices as dirty
                  geometry.verticesNeedUpdate = true;
                  geometry.computeBoundingBox();
          });
          // return this, to get chained API        
          return this;
  });
  


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