FloatNode.js 480 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * @author sunag / http://www.sunag.com.br/
  3. */
  4. THREE.FloatNode = function( value ) {
  5. THREE.InputNode.call( this, 'fv1' );
  6. this.value = [ value || 0 ];
  7. };
  8. THREE.FloatNode.prototype = Object.create( THREE.InputNode.prototype );
  9. THREE.FloatNode.prototype.constructor = THREE.FloatNode;
  10. Object.defineProperties( THREE.FloatNode.prototype, {
  11. number: {
  12. get: function() {
  13. return this.value[ 0 ];
  14. },
  15. set: function( val ) {
  16. this.value[ 0 ] = val;
  17. }
  18. }
  19. } );