Points.d.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { Geometry } from './../core/Geometry';
  2. import { Material } from './../materials/Material';
  3. import { Raycaster } from './../core/Raycaster';
  4. import { Object3D } from './../core/Object3D';
  5. import { BufferGeometry } from '../core/BufferGeometry';
  6. import { Intersection } from '../core/Raycaster';
  7. /**
  8. * A class for displaying particles in the form of variable size points. For example, if using the WebGLRenderer, the particles are displayed using GL_POINTS.
  9. *
  10. * @see <a href="https://github.com/mrdoob/three.js/blob/master/src/objects/ParticleSystem.js">src/objects/ParticleSystem.js</a>
  11. */
  12. export class Points extends Object3D {
  13. /**
  14. * @param geometry An instance of Geometry or BufferGeometry.
  15. * @param material An instance of Material (optional).
  16. */
  17. constructor(
  18. geometry?: Geometry | BufferGeometry,
  19. material?: Material | Material[]
  20. );
  21. type: 'Points';
  22. isPoints: true;
  23. /**
  24. * An instance of Geometry or BufferGeometry, where each vertex designates the position of a particle in the system.
  25. */
  26. geometry: Geometry | BufferGeometry;
  27. /**
  28. * An instance of Material, defining the object's appearance. Default is a PointsMaterial with randomised colour.
  29. */
  30. material: Material | Material[];
  31. raycast( raycaster: Raycaster, intersects: Intersection[] ): void;
  32. }
粤ICP备19079148号