LineBasicMaterial.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. * @author alteredq / http://alteredqualia.com/
  4. *
  5. * parameters = {
  6. * color: <hex>,
  7. * opacity: <float>,
  8. *
  9. * blending: THREE.NormalBlending,
  10. * depthTest: <bool>,
  11. * depthWrite: <bool>,
  12. *
  13. * linewidth: <float>,
  14. * linecap: "round",
  15. * linejoin: "round",
  16. *
  17. * vertexColors: <bool>
  18. *
  19. * fog: <bool>
  20. * }
  21. */
  22. THREE.LineBasicMaterial = function ( parameters ) {
  23. THREE.Material.call( this );
  24. this.type = 'LineBasicMaterial';
  25. this.color = new THREE.Color( 0xffffff );
  26. this.linewidth = 1;
  27. this.linecap = 'round';
  28. this.linejoin = 'round';
  29. this.vertexColors = THREE.NoColors;
  30. this.fog = true;
  31. this.setValues( parameters );
  32. };
  33. THREE.LineBasicMaterial.prototype = Object.create( THREE.Material.prototype );
  34. THREE.LineBasicMaterial.prototype.constructor = THREE.LineBasicMaterial;
  35. THREE.LineBasicMaterial.prototype.copy = function ( source ) {
  36. THREE.Material.prototype.copy.call( this, source );
  37. this.color.copy( source.color );
  38. this.linewidth = source.linewidth;
  39. this.linecap = source.linecap;
  40. this.linejoin = source.linejoin;
  41. this.vertexColors = source.vertexColors;
  42. this.fog = source.fog;
  43. return this;
  44. };
粤ICP备19079148号