Adding extra parameters to send the select modal

This commit is contained in:
Michael Chung committed 2024-03-31 13:54:52 -04:00
1 parent 29988a36a1
commit f2a280b26f
1 file changed
+6 -2
+6 -2
View File
@@ -1061,14 +1061,19 @@ class Editor {
updateSelectedUI() {
if (this.selected == undefined) { return; }
let pos = this.selected.position;
let rot = this.selected.rotation;
let scale = this.selected.scale;
this.dispatchAppUiState({
type: APPUI_ACTION_TYPES.SHOW_CONTROLPANELS_SCENEOBJECT,
payload: {
currentSceneObject: {
group: "object", // TODO: add meta data to determine what it is a camera or a object or a character into prefab clips
object_uuid: this.selected.uuid,
object_name: this.selected.name,
version: this.version,
objectVectors: {
position: { x: parseFloat(pos.x.toFixed(2)), y: parseFloat(pos.y.toFixed(2)), z: parseFloat(pos.z.toFixed(2)) },
rotation: { x: parseFloat(rot.x.toFixed(2)), y: parseFloat(rot.y.toFixed(2)), z: parseFloat(rot.z.toFixed(2)) },
@@ -1079,7 +1084,6 @@ class Editor {
});
}
// Automaticly resize scene.
onWindowResize() {
// Calculate the maximum possible dimensions while maintaining the aspect ratio