Points.d.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. morphTargetInfluences?: number[];
  23. morphTargetDictionary?: { [key: string]: number };
  24. isPoints: true;
  25. /**
  26. * An instance of Geometry or BufferGeometry, where each vertex designates the position of a particle in the system.
  27. */
  28. geometry: Geometry | BufferGeometry;
  29. /**
  30. * An instance of Material, defining the object's appearance. Default is a PointsMaterial with randomised colour.
  31. */
  32. material: Material | Material[];
  33. raycast( raycaster: Raycaster, intersects: Intersection[] ): void;
  34. updateMorphTargets(): void;
  35. }