ParticleBasicMaterial.js 814 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /**
  2. * @author mr.doob / http://mrdoob.com/
  3. * @author alteredq / http://alteredqualia.com/
  4. *
  5. * parameters = {
  6. * color: <hex>,
  7. * opacity: <float>,
  8. * map: new THREE.Texture( <Image> ),
  9. *
  10. * size: <float>,
  11. *
  12. * blending: THREE.NormalBlending,
  13. * depthTest: <bool>,
  14. *
  15. * vertexColors: <bool>,
  16. *
  17. * fog: <bool>
  18. * }
  19. */
  20. THREE.ParticleBasicMaterial = function ( parameters ) {
  21. THREE.Material.call( this );
  22. this.color = new THREE.Color( 0xffffff );
  23. this.map = null;
  24. this.size = 1;
  25. this.sizeAttenuation = true;
  26. this.vertexColors = false;
  27. this.fog = true;
  28. this.setValues( parameters );
  29. };
  30. THREE.ParticleBasicMaterial.prototype = Object.create( THREE.Material.prototype );
  31. THREE.ParticleBasicMaterial.prototype.clone = function () {
  32. return new THREE.ParticleBasicMaterial( this );
  33. };