ColorNode.js 399 B

12345678910111213141516
  1. /**
  2. * @author sunag / http://www.sunag.com.br/
  3. */
  4. THREE.ColorNode = function( color ) {
  5. THREE.InputNode.call( this, 'c' );
  6. this.value = new THREE.Color( color || 0 );
  7. };
  8. THREE.ColorNode.prototype = Object.create( THREE.InputNode.prototype );
  9. THREE.ColorNode.prototype.constructor = THREE.ColorNode;
  10. THREE.NodeMaterial.addShortcuts( THREE.ColorNode.prototype, 'value', [ 'r', 'g', 'b' ] );