MeshSurfaceSampler.d.ts 524 B

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