浏览代码

Merge pull request #18276 from Mugen87/dev32

TS: Added MeshSurfaceSampler.d.ts.
Michael Herzog 5 年之前
父节点
当前提交
297f66e92f
共有 1 个文件被更改,包括 21 次插入0 次删除
  1. 21 0
      examples/jsm/math/MeshSurfaceSampler.d.ts

+ 21 - 0
examples/jsm/math/MeshSurfaceSampler.d.ts

@@ -0,0 +1,21 @@
+import {
+	BufferGeometry,
+	Mesh,
+	Vector3
+} from '../../../src/Three';
+
+export class MeshSurfaceSampler {
+
+	distribution: Float32Array | null;
+	geometry: BufferGeometry;
+	positionAttribute: Float32Array;
+	weightAttribute: string | null;
+
+	constructor( mesh: Mesh );
+	binarySearch( x: number ): number;
+	build(): this;
+	sample( targetPosition: Vector3, targetNormal: Vector3 ): this;
+	sampleFace( faceIndex: number, targetPosition: Vector3, targetNormal: Vector3 ): this;
+	setWeightAttribute( name: string | null ): this;
+
+}