PointUVNode.js 266 B

123456789101112131415161718192021
  1. import Node from '../core/Node.js';
  2. class PointUVNode extends Node {
  3. constructor() {
  4. super( 'vec2' );
  5. this.isPointUVNode = true;
  6. }
  7. generate( /*builder*/ ) {
  8. return 'vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y )';
  9. }
  10. }
  11. export default PointUVNode;