MeshSurfaceSampler.d.ts 576 B

12345678910111213141516171819202122
  1. import {
  2. BufferGeometry,
  3. Color,
  4. Mesh,
  5. Vector3
  6. } from '../../../src/Three';
  7. export class MeshSurfaceSampler {
  8. distribution: Float32Array | null;
  9. geometry: BufferGeometry;
  10. positionAttribute: Float32Array;
  11. weightAttribute: string | null;
  12. constructor( mesh: Mesh );
  13. binarySearch( x: number ): number;
  14. build(): this;
  15. sample( targetPosition: Vector3, targetNormal?: Vector3, targetColor?: Color ): this;
  16. sampleFace( faceIndex: number, targetPosition: Vector3, targetNormal?: Vector3, targetColor?: Color ): this;
  17. setWeightAttribute( name: string | null ): this;
  18. }