SpriteNodeMaterial.js 482 B

123456789101112131415161718192021222324252627
  1. import { SpriteNode } from './nodes/SpriteNode.js';
  2. import { NodeMaterial } from './NodeMaterial.js';
  3. import { NodeUtils } from '../core/NodeUtils.js';
  4. class SpriteNodeMaterial extends NodeMaterial {
  5. constructor() {
  6. const node = new SpriteNode();
  7. super( node, node );
  8. this.type = 'SpriteNodeMaterial';
  9. }
  10. }
  11. NodeUtils.addShortcuts( SpriteNodeMaterial.prototype, 'fragment', [
  12. 'color',
  13. 'alpha',
  14. 'mask',
  15. 'position',
  16. 'spherical'
  17. ] );
  18. export { SpriteNodeMaterial };