Points.d.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 {@link https://github.com/mrdoob/three.js/blob/master/src/objects/ParticleSystem.js|src/objects/ParticleSystem.js}
  11. */
  12. export class Points <
  13. TGeometry extends Geometry | BufferGeometry = Geometry | BufferGeometry,
  14. TMaterial extends Material | Material[] = Material | Material[]
  15. > extends Object3D {
  16. /**
  17. * @param geometry An instance of Geometry or BufferGeometry.
  18. * @param material An instance of Material (optional).
  19. */
  20. constructor(
  21. geometry?: TGeometry,
  22. material?: TMaterial
  23. );
  24. type: 'Points';
  25. morphTargetInfluences?: number[];
  26. morphTargetDictionary?: { [key: string]: number };
  27. readonly isPoints: true;
  28. /**
  29. * An instance of Geometry or BufferGeometry, where each vertex designates the position of a particle in the system.
  30. */
  31. geometry: TGeometry;
  32. /**
  33. * An instance of Material, defining the object's appearance. Default is a PointsMaterial with randomised colour.
  34. */
  35. material: TMaterial;
  36. raycast( raycaster: Raycaster, intersects: Intersection[] ): void;
  37. updateMorphTargets(): void;
  38. }
粤ICP备19079148号