LineDashedMaterial.js 947 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. * @author alteredq / http://alteredqualia.com/
  3. *
  4. * parameters = {
  5. * color: <hex>,
  6. * opacity: <float>,
  7. *
  8. * linewidth: <float>,
  9. *
  10. * scale: <float>,
  11. * dashSize: <float>,
  12. * gapSize: <float>
  13. * }
  14. */
  15. import { LineBasicMaterial } from './LineBasicMaterial.js';
  16. function LineDashedMaterial( parameters ) {
  17. LineBasicMaterial.call( this );
  18. this.type = 'LineDashedMaterial';
  19. this.scale = 1;
  20. this.dashSize = 3;
  21. this.gapSize = 1;
  22. this.setValues( parameters );
  23. }
  24. LineDashedMaterial.prototype = Object.create( LineBasicMaterial.prototype );
  25. LineDashedMaterial.prototype.constructor = LineDashedMaterial;
  26. LineDashedMaterial.prototype.isLineDashedMaterial = true;
  27. LineDashedMaterial.prototype.copy = function ( source ) {
  28. LineBasicMaterial.prototype.copy.call( this, source );
  29. this.scale = source.scale;
  30. this.dashSize = source.dashSize;
  31. this.gapSize = source.gapSize;
  32. return this;
  33. };
  34. export { LineDashedMaterial };
粤ICP备19079148号