Przeglądaj źródła

Docs: Clean up.

Mugen87 5 lat temu
rodzic
commit
3ad059b349

+ 15 - 1
docs/api/en/extras/core/CurvePath.html

@@ -51,7 +51,21 @@
 
 		<h3>[method:Float getCurveLengths]()</h3>
 		<p>Adds together the lengths of the curves in the [page:.curves] array.</p>
-				
+
+		<h3>[method:Vector getPoint]( [param:Float t] )</h3>
+		<p>
+			[page:Float t] - A position on the curve. Must be in the range [ 0, 1 ]. <br><br />
+
+			Returns a vector for a given position on the curve path.
+		</p>
+
+		<h3>[method:Vector getPointAt]( [param:Float u] )</h3>
+		<p>
+			[page:Float u] - A position on the curve according to the arc length. Must be in the range [ 0, 1 ]. <br><br />
+
+			Returns a vector for a given position on the curve path according to the arc length.
+		</p>
+
 		<h3>[method:Array getPoints]( [param:Integer divisions] )</h3>
 		<p>
 			divisions -- number of pieces to divide the curve into. Default is *12*.<br /><br />

+ 15 - 1
docs/api/zh/extras/core/CurvePath.html

@@ -13,7 +13,7 @@
 		<h1>曲线路径([name])</h1>
 
 		<p class="desc">
-		
+
 		一个扩展了[page:Curve]的抽象基类。CurvePath仅仅是一个已连接的曲线的数组,但保留了曲线的API。
 		</p>
 
@@ -52,6 +52,20 @@
 		<h3>[method:Float getCurveLengths]()</h3>
 		<p>将[page:.curves]数组中曲线的长度相加。</p>
 
+		<h3>[method:Vector getPoint]( [param:Float t] )</h3>
+		<p>
+			[page:Float t] - A position on the curve. Must be in the range [ 0, 1 ]. <br><br />
+
+			Returns a vector for a given position on the curve path.
+		</p>
+
+		<h3>[method:Vector getPointAt]( [param:Float u] )</h3>
+		<p>
+			[page:Float u] - A position on the curve according to the arc length. Must be in the range [ 0, 1 ]. <br><br />
+
+			Returns a vector for a given position on the curve path according to the arc length.
+		</p>
+
 		<h3>[method:Array getPoints]( [param:Integer divisions] )</h3>
 		<p>
 			divisions -- 曲线分段数量。默认值为*12*。<br /><br />

+ 1 - 0
src/extras/core/CurvePath.d.ts

@@ -13,6 +13,7 @@ export class CurvePath<T extends Vector> extends Curve<T> {
 	checkConnection(): boolean;
 	closePath(): void;
 	getPoint( t: number ): T;
+	getPointAt( t: number ): T;
 	getLength(): number;
 	updateArcLengths(): void;
 	getCurveLengths(): number[];