LineDashedMaterial.js 896 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. function LineDashedMaterial( parameters ) {
  15. LineBasicMaterial.call( this );
  16. this.type = 'LineDashedMaterial';
  17. this.scale = 1;
  18. this.dashSize = 3;
  19. this.gapSize = 1;
  20. this.setValues( parameters );
  21. }
  22. LineDashedMaterial.prototype = Object.create( LineBasicMaterial.prototype );
  23. LineDashedMaterial.prototype.constructor = LineDashedMaterial;
  24. LineDashedMaterial.prototype.isLineDashedMaterial = true;
  25. LineDashedMaterial.prototype.copy = function ( source ) {
  26. LineBasicMaterial.prototype.copy.call( this, source );
  27. this.scale = source.scale;
  28. this.dashSize = source.dashSize;
  29. this.gapSize = source.gapSize;
  30. return this;
  31. };
  32. export { LineDashedMaterial };