ParticleSystem.js 583 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * @author alteredq / http://alteredqualia.com/
  3. */
  4. THREE.ParticleSystem = function ( geometry, material ) {
  5. THREE.Object3D.call( this );
  6. this.geometry = geometry;
  7. this.material = material;
  8. this.sortParticles = false;
  9. if ( this.geometry ) {
  10. // calc bound radius
  11. if( !this.geometry.boundingSphere ) {
  12. this.geometry.computeBoundingSphere();
  13. }
  14. this.boundRadius = geometry.boundingSphere.radius;
  15. }
  16. this.frustumCulled = false;
  17. };
  18. THREE.ParticleSystem.prototype = new THREE.Object3D();
  19. THREE.ParticleSystem.prototype.constructor = THREE.ParticleSystem;
粤ICP备19079148号