@@ -34,7 +34,7 @@ <h3>[name]( [param:BufferGeometry geometry], [param:Material material], [param:I
34
34
</ p >
35
35
36
36
< h2 > 属性</ h2 >
37
- < p > See the base [page:Mesh] class for common properties. </ p >
37
+ < p > 公共属性请查看基类 [page:Mesh]。 </ p >
38
38
39
39
< h3 > [property:Box3 boundingBox]</ h3 >
40
40
< p >
@@ -67,14 +67,19 @@ <h3>[property:InstancedBufferAttribute instanceMatrix]</h3>
67
67
如果你要通过 [page:.setMatrixAt]() 来修改实例数据,你必须将它的 [page:BufferAttribute.needsUpdate needsUpdate] 标识为 true 。
68
68
</ p >
69
69
70
+ < h3 > [property:DataTexture morphTexture]</ h3 >
71
+ < p >
72
+ 用于表示所有实例的变形权重。如果你通过 [page:.setMorphAt]() 修改了实例数据,你必须将 [page:Texture.needsUpdate needsUpdate] 标识设置为 true。
73
+ </ p >
74
+
70
75
< h3 > [property:Boolean isInstancedMesh]</ h3 >
71
76
< p >
72
- Read-only flag to check if a given object is of type [name].
77
+ 用来检查对象是否属于 [name] 类型的只读标识。
73
78
</ p >
74
79
75
80
76
81
< h2 > 方法</ h2 >
77
- < p > See the base [page:Mesh] class for common methods. </ p >
82
+ < p > 公共方法请查看基类 [page:Mesh]。 </ p >
78
83
79
84
< h3 > [method:undefined computeBoundingBox]()</ h3 >
80
85
< p >
@@ -90,18 +95,18 @@ <h3>[method:undefined computeBoundingSphere]()</h3>
90
95
91
96
< h3 > [method:undefined dispose]()</ h3 >
92
97
< p >
93
- Frees the internal resources of this instance.
98
+ 释放实例的内部资源。
94
99
</ p >
95
100
96
101
< h3 > [method:undefined getColorAt]( [param:Integer index], [param:Color color] )</ h3 >
97
102
< p >
98
- [page:Integer index]: The index of an instance. Values have to be in the range [0, count].
103
+ [page:Integer index]: 实例的索引。 值必须在 [0, count] 区间。
99
104
</ p >
100
105
< p >
101
- [page:Color color]: This color object will be set to the color of the defined instance.
106
+ [page:Color color]: 传入的颜色对象将会被设置为指定的实例的颜色。
102
107
</ p >
103
108
< p >
104
- Get the color of the defined instance.
109
+ 获取已定义实例的颜色。
105
110
</ p >
106
111
107
112
< h3 > [method:undefined getMatrixAt]( [param:Integer index], [param:Matrix4 matrix] )</ h3 >
@@ -115,16 +120,26 @@ <h3>[method:undefined getMatrixAt]( [param:Integer index], [param:Matrix4 matrix
115
120
获得已定义实例的本地变换矩阵。
116
121
</ p >
117
122
123
+ < h3 >
124
+ [method:undefined getMorphAt]( [param:Integer index], [param:Mesh mesh] )
125
+ </ h3 >
126
+ < p >
127
+ [page:Integer index]: 实例的索引。值必须在 [0, count] 区间。
128
+ </ p >
129
+ < p >
130
+ [page:Mesh mesh]: 网格属性 [page:Mesh.morphTargetInfluences .morphTargetInfluences] 将会被填充为已定义实例的变形权重。
131
+ </ p >
132
+ < p > 获取已定义实例的变形权重</ p >
133
+
118
134
< h3 > [method:undefined setColorAt]( [param:Integer index], [param:Color color] )</ h3 >
119
135
< p >
120
- [page:Integer index]: The index of an instance. Values have to be in the range [0, count].
136
+ [page:Integer index]: 实例的索引。值必须在 [0, count] 区间。
121
137
</ p >
122
138
< p >
123
- [page:Color color]: The color of a single instance.
139
+ [page:Color color]: 单个实例的颜色。
124
140
</ p >
125
141
< p >
126
- Sets the given color to the defined instance.
127
- Make sure you set [page:.instanceColor][page:BufferAttribute.needsUpdate .needsUpdate] to true after updating all the colors.
142
+ 设置已定义实例的颜色。请确保在更新颜色后将 [page:.instanceColor][page:BufferAttribute.needsUpdate .needsUpdate] 标识设置为 true。
128
143
</ p >
129
144
130
145
< h3 > [method:undefined setMatrixAt]( [param:Integer index], [param:Matrix4 matrix] )</ h3 >
@@ -139,6 +154,19 @@ <h3>[method:undefined setMatrixAt]( [param:Integer index], [param:Matrix4 matrix
139
154
请确保在更新所有矩阵后将 [page:.instanceMatrix][page:BufferAttribute.needsUpdate .needsUpdate] 设置为true。
140
155
</ p >
141
156
157
+ < h3 >
158
+ [method:undefined setMorphAt]( [param:Integer index], [param:Mesh mesh] )
159
+ </ h3 >
160
+ < p >
161
+ [page:Integer index]: 实例的索引。值必须在 [0, count] 区间。
162
+ </ p >
163
+ < p >
164
+ [page:Mesh mesh]: 网格属性 [page:Mesh.morphTargetInfluences .morphTargetInfluences] 包含了单个实例的变形权重。
165
+ </ p >
166
+ < p >
167
+ 设置已定义实例的变形权重。请确保在更新所有变形数据后将 [page:.morphTexture][page:Texture.needsUpdate .needsUpdate] 设置为 true。
168
+ </ p >
169
+
142
170
< h2 > 源代码</ h2 >
143
171
144
172
< p >
0 commit comments