PhongNodeMaterial.js 589 B

123456789101112131415161718192021222324252627282930313233343536
  1. import { PhongNode } from './nodes/PhongNode.js';
  2. import { NodeMaterial } from './NodeMaterial.js';
  3. import { NodeUtils } from '../core/NodeUtils.js';
  4. class PhongNodeMaterial extends NodeMaterial {
  5. constructor() {
  6. const node = new PhongNode();
  7. super( node, node );
  8. this.type = 'PhongNodeMaterial';
  9. }
  10. }
  11. NodeUtils.addShortcuts( PhongNodeMaterial.prototype, 'fragment', [
  12. 'color',
  13. 'alpha',
  14. 'specular',
  15. 'shininess',
  16. 'normal',
  17. 'emissive',
  18. 'ambient',
  19. 'light',
  20. 'shadow',
  21. 'ao',
  22. 'environment',
  23. 'environmentAlpha',
  24. 'mask',
  25. 'position'
  26. ] );
  27. export { PhongNodeMaterial };