2
0
Эх сурвалжийг харах

Merge pull request #16994 from looeee/points_morph_docs

Updated Points docs and TS file
Michael Herzog 6 жил өмнө
parent
commit
ebe52525a2

+ 17 - 0
docs/api/en/objects/Points.html

@@ -54,6 +54,17 @@
 			Default is a [page:PointsMaterial] with a random color.
 		</p>
 
+		<h3>[property:Array morphTargetInfluences]</h3>
+		<p>
+		An array of weights typically from 0-1 that specify how much of the morph is applied.
+		Undefined by default, but reset to a blank array by [page:Points.updateMorphTargets updateMorphTargets].
+		</p>
+
+		<h3>[property:Object morphTargetDictionary]</h3>
+		<p>
+		A dictionary of morphTargets based on the morphTarget.name property.
+		Undefined by default, but rebuilt [page:Points.updateMorphTargets updateMorphTargets].
+		</p>
 
 		<h2>Methods</h2>
 		<p>See the base [page:Object3D] class for common methods.</p>
@@ -69,6 +80,12 @@
 		Returns a clone of this Points object and its descendants.
 		</p>
 
+		<h3>[method:null updateMorphTargets]()</h3>
+		<p>
+		Updates the morphTargets to have no influence on the object. Resets the
+		[page:Points.morphTargetInfluences morphTargetInfluences] and
+		[page:Points.morphTargetDictionary morphTargetDictionary] properties.
+		</p>
 
 		<h2>Source</h2>
 

+ 16 - 0
docs/api/zh/objects/Points.html

@@ -50,6 +50,17 @@
 		[page:Material]的实例。定义了物体的外观。默认值是一个具有随机颜色的[page:PointsMaterial]。
 	</p>
 
+	<h3>[property:Array morphTargetInfluences]</h3>
+	<p>
+		一个包含有权重(值一般在0-1范围内)的数组,指定应用了多少变形。
+		默认情况下是未定义的,但是会被[page:Points.updateMorphTargets updateMorphTargets]重置为一个空数组。
+	</p>
+
+	<h3>[property:Object morphTargetDictionary]</h3>
+	<p>
+		基于morphTarget.name属性的morphTargets字典。
+		默认情况下是未定义的,但是会被[page:Points.updateMorphTargets updateMorphTargets]重建。
+	</p>
 
 	<h2>方法</h2>
 	<p>请参阅其基类[page:Object3D]来查看共有方法。</p>
@@ -65,6 +76,11 @@
 		返回这个点及其子集的一个克隆对象。
 	</p>
 
+	<h3>[method:null updateMorphTargets]()</h3>
+	<p>
+		更新morphTargets,使其不对对象产生影响,重置[page:Points.morphTargetInfluences morphTargetInfluences] and
+		[page:Points.morphTargetDictionary morphTargetDictionary]属性。
+	</p>
 
 	<h2>源代码</h2>
 

+ 3 - 0
src/objects/Points.d.ts

@@ -22,6 +22,8 @@ export class Points extends Object3D {
 	);
 
 	type: 'Points';
+	morphTargetInfluences?: number[];
+	morphTargetDictionary?: { [key: string]: number };
 	isPoints: true;
 
 	/**
@@ -35,5 +37,6 @@ export class Points extends Object3D {
 	material: Material | Material[];
 
 	raycast( raycaster: Raycaster, intersects: Intersection[] ): void;
+	updateMorphTargets(): void;
 
 }