LineDashedMaterial.js 712 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import { LineBasicMaterial } from './LineBasicMaterial.js';
  2. /**
  3. * parameters = {
  4. * color: <hex>,
  5. * opacity: <float>,
  6. *
  7. * linewidth: <float>,
  8. *
  9. * scale: <float>,
  10. * dashSize: <float>,
  11. * gapSize: <float>
  12. * }
  13. */
  14. class LineDashedMaterial extends LineBasicMaterial {
  15. constructor( parameters ) {
  16. super();
  17. this.type = 'LineDashedMaterial';
  18. this.scale = 1;
  19. this.dashSize = 3;
  20. this.gapSize = 1;
  21. this.setValues( parameters );
  22. }
  23. copy( source ) {
  24. super.copy( source );
  25. this.scale = source.scale;
  26. this.dashSize = source.dashSize;
  27. this.gapSize = source.gapSize;
  28. return this;
  29. }
  30. }
  31. LineDashedMaterial.prototype.isLineDashedMaterial = true;
  32. export { LineDashedMaterial };