Points.d.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 points. The points are rendered by the WebGLRenderer using gl.POINTS.
  9. */
  10. export class Points <
  11. TGeometry extends Geometry | BufferGeometry = Geometry | BufferGeometry,
  12. TMaterial extends Material | Material[] = Material | Material[]
  13. > extends Object3D {
  14. /**
  15. * @param geometry An instance of Geometry or BufferGeometry.
  16. * @param material An instance of Material (optional).
  17. */
  18. constructor(
  19. geometry?: TGeometry,
  20. material?: TMaterial
  21. );
  22. type: 'Points';
  23. morphTargetInfluences?: number[];
  24. morphTargetDictionary?: { [key: string]: number };
  25. readonly isPoints: true;
  26. /**
  27. * An instance of Geometry or BufferGeometry, where each vertex designates the position of a particle in the system.
  28. */
  29. geometry: TGeometry;
  30. /**
  31. * An instance of Material, defining the object's appearance. Default is a PointsMaterial with randomised colour.
  32. */
  33. material: TMaterial;
  34. raycast( raycaster: Raycaster, intersects: Intersection[] ): void;
  35. updateMorphTargets(): void;
  36. }