LineBasicMaterial.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * @author mr.doob / http://mrdoob.com/
  3. * @author alteredq / http://alteredqualia.com/
  4. *
  5. * parameters = {
  6. * color: <hex>,
  7. * opacity: <float>,
  8. * blending: THREE.NormalBlending,
  9. * depthTest: <bool>,
  10. * linewidth: <float>,
  11. * linecap: "round",
  12. * linejoin: "round",
  13. * vertexColors: <bool>
  14. * }
  15. */
  16. THREE.LineBasicMaterial = function ( parameters ) {
  17. THREE.Material.call( this, parameters );
  18. parameters = parameters || {};
  19. this.color = parameters.color !== undefined ? new THREE.Color( parameters.color ) : new THREE.Color( 0xffffff );
  20. this.linewidth = parameters.linewidth !== undefined ? parameters.linewidth : 1;
  21. this.linecap = parameters.linecap !== undefined ? parameters.linecap : 'round';
  22. this.linejoin = parameters.linejoin !== undefined ? parameters.linejoin : 'round';
  23. this.vertexColors = parameters.vertexColors ? parameters.vertexColors : false;
  24. };
  25. THREE.LineBasicMaterial.prototype = new THREE.Material();
  26. THREE.LineBasicMaterial.prototype.constructor = THREE.LineBasicMaterial;