|
|
|
@ -81,6 +81,13 @@ export default class ModelManager implements IControls, Model { |
|
|
|
matrix.decompose(position, new THREE.Quaternion(), new THREE.Vector3()) |
|
|
|
return position |
|
|
|
} |
|
|
|
getPositionByLogicXY(logicX: number, logicY: number): THREE.Vector3 { |
|
|
|
const item = this.viewport.entityManager.findItemByLogicXY(logicX, logicY) |
|
|
|
const matrix = getMatrixFromTf(item.tf) |
|
|
|
const position = new THREE.Vector3() |
|
|
|
matrix.decompose(position, new THREE.Quaternion(), new THREE.Vector3()) |
|
|
|
return position |
|
|
|
} |
|
|
|
|
|
|
|
dispose() { |
|
|
|
this.viewport = null as any |
|
|
|
|