PointsNodeMaterial.js 867 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import NodeMaterial from './NodeMaterial.js';
  2. import { PointsMaterial } from 'three';
  3. const defaultValues = new PointsMaterial();
  4. class PointsNodeMaterial extends NodeMaterial {
  5. constructor( parameters ) {
  6. super();
  7. this.isPointsNodeMaterial = true;
  8. this.transparent = true;
  9. this.colorNode = null;
  10. this.opacityNode = null;
  11. this.alphaTestNode = null;
  12. this.lightNode = null;
  13. this.sizeNode = null;
  14. this.positionNode = null;
  15. this.setDefaultValues( defaultValues );
  16. this.setValues( parameters );
  17. }
  18. copy( source ) {
  19. this.colorNode = source.colorNode;
  20. this.opacityNode = source.opacityNode;
  21. this.alphaTestNode = source.alphaTestNode;
  22. this.lightNode = source.lightNode;
  23. this.sizeNode = source.sizeNode;
  24. this.positionNode = source.positionNode;
  25. return super.copy( source );
  26. }
  27. }
  28. export default PointsNodeMaterial;