three-base 2.0.127 → 2.0.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/InstancedMeshBase.d.ts +1 -1
- package/InstancedMeshBase.js +3 -3
- package/package.json +1 -1
package/InstancedMeshBase.d.ts
CHANGED
package/InstancedMeshBase.js
CHANGED
|
@@ -228,17 +228,17 @@ export default class InstancedMeshBase extends MeshBase {
|
|
|
228
228
|
//获取指定位置的移动旋转缩放
|
|
229
229
|
async getTRS(index = 0) {
|
|
230
230
|
await this.awaitLoaded();
|
|
231
|
-
const
|
|
231
|
+
const position = new Vector3();
|
|
232
232
|
const rotation = new Euler();
|
|
233
233
|
const scale = new Vector3();
|
|
234
234
|
const uuid = first(Object.keys(this.instanceCollect));
|
|
235
235
|
const instancedMesh = this.instanceCollect[uuid];
|
|
236
236
|
if (instancedMesh) {
|
|
237
237
|
instancedMesh.getMatrixAt(index, InstancedMeshBase._matrix);
|
|
238
|
-
InstancedMeshBase._matrix.decompose(
|
|
238
|
+
InstancedMeshBase._matrix.decompose(position, InstancedMeshBase._Quaternion, scale);
|
|
239
239
|
rotation.setFromQuaternion(InstancedMeshBase._Quaternion);
|
|
240
240
|
}
|
|
241
|
-
return {
|
|
241
|
+
return { position, rotation, scale };
|
|
242
242
|
}
|
|
243
243
|
// 设置颜色
|
|
244
244
|
async setColorAt(index, color) {
|