Vector2Node.js 400 B

12345678910111213141516
  1. /**
  2. * @author sunag / http://www.sunag.com.br/
  3. */
  4. THREE.Vector2Node = function( x, y ) {
  5. THREE.InputNode.call( this, 'v2' );
  6. this.value = new THREE.Vector2( x, y );
  7. };
  8. THREE.Vector2Node.prototype = Object.create( THREE.InputNode.prototype );
  9. THREE.Vector2Node.prototype.constructor = THREE.Vector2Node;
  10. THREE.NodeMaterial.addShortcuts( THREE.Vector2Node.prototype, 'value', [ 'x', 'y' ] );