LuminanceNode.js 526 B

12345678910111213141516171819202122
  1. /**
  2. * @author sunag / http://www.sunag.com.br/
  3. */
  4. THREE.LuminanceNode = function( rgb ) {
  5. THREE.TempNode.call( this, 'fv1' );
  6. this.rgb = rgb;
  7. };
  8. THREE.LuminanceNode.prototype = Object.create( THREE.TempNode.prototype );
  9. THREE.LuminanceNode.prototype.constructor = THREE.LuminanceNode;
  10. THREE.LuminanceNode.prototype.generate = function( builder, output ) {
  11. builder.include( 'luminance_rgb' );
  12. return builder.format( 'luminance_rgb(' + this.rgb.build( builder, 'v3' ) + ')', this.getType( builder ), output );
  13. };