ParticleCanvasMaterial.js 741 B

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. *
  4. * parameters = {
  5. * color: <hex>,
  6. * program: <function>,
  7. * opacity: <float>,
  8. * blending: THREE.NormalBlending
  9. * }
  10. */
  11. THREE.ParticleCanvasMaterial = function ( parameters ) {
  12. THREE.Material.call( this );
  13. this.color = new THREE.Color( 0xffffff );
  14. this.program = function ( context, color ) {};
  15. this.setValues( parameters );
  16. };
  17. THREE.ParticleCanvasMaterial.prototype = Object.create( THREE.Material.prototype );
  18. THREE.ParticleCanvasMaterial.prototype.clone = function () {
  19. var material = new THREE.ParticleCanvasMaterial();
  20. THREE.Material.prototype.clone.call( this, material );
  21. material.color.copy( this.color );
  22. material.program = this.program;
  23. return material;
  24. };
粤ICP备19079148号