ParticleBasicMaterial.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. * map: new THREE.Texture( <Image> ),
  9. * size: <float>,
  10. * blending: THREE.NormalBlending,
  11. * depthTest: <bool>,
  12. * vertexColors: <bool>
  13. * }
  14. */
  15. THREE.ParticleBasicMaterial = function ( parameters ) {
  16. THREE.Material.call( this, parameters );
  17. parameters = parameters || {};
  18. this.color = parameters.color !== undefined ? new THREE.Color( parameters.color ) : new THREE.Color( 0xffffff );
  19. this.map = parameters.map !== undefined ? parameters.map : null;
  20. this.size = parameters.size !== undefined ? parameters.size : 1;
  21. this.sizeAttenuation = parameters.sizeAttenuation !== undefined ? parameters.sizeAttenuation : true;
  22. this.vertexColors = parameters.vertexColors !== undefined ? parameters.vertexColors : false;
  23. };
  24. THREE.ParticleBasicMaterial.prototype = new THREE.Material();
  25. THREE.ParticleBasicMaterial.prototype.constructor = THREE.ParticleBasicMaterial;
粤ICP备19079148号