mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-06 10:11:31 +00:00
minor bug fix
This commit is contained in:
1 parent
114fb0bbfe
commit
cb330e2b48
2 files changed
+6
-4
No files matched your search
@@ -34,7 +34,9 @@ export const ControlPanelSceneObject = () => {
|
||||
const currentSceneObject = appUiState.controlPanel.currentSceneObject;
|
||||
|
||||
useEffect(()=>{
|
||||
// TODO this causes a subtle bug because it renders way too many times.
|
||||
const vectors = appUiState.controlPanel.currentSceneObject.objectVectors
|
||||
|
||||
editorEngine?.setSelectedObject(vectors.position, vectors.rotation, vectors.scale)
|
||||
}, [appUiState.controlPanel.currentSceneObject]);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import { PointerLockControls } from "three/addons/controls/PointerLockControls.j
|
||||
import { APPUI_ACTION_TYPES } from "../reducers";
|
||||
import { ClipGroup } from "~/pages/PageEnigma/models/track";
|
||||
|
||||
import { XYZ } from "../../datastructures/common";
|
||||
import { XYZ } from "../datastructures/common";
|
||||
class EditorState {
|
||||
// {
|
||||
// action: "ShowLoadingIndicator"
|
||||
@@ -150,7 +150,7 @@ class Editor {
|
||||
this.raycaster;
|
||||
this.mouse;
|
||||
this.selected;
|
||||
this.selectedState = false
|
||||
|
||||
this.last_selected;
|
||||
this.transform_interaction;
|
||||
this.rendering = false;
|
||||
@@ -444,8 +444,8 @@ class Editor {
|
||||
|
||||
// TO UPDATE selected objects in the scene might want to add to the scene ...
|
||||
async setSelectedObject(position:XYZ,rotation:XYZ,scale:XYZ) {
|
||||
if (this.selected !=null) {
|
||||
|
||||
if (this.selected !=undefined || this.selected !=null) {
|
||||
//console.log(`triggering setSelectedObject`)
|
||||
this.selected.position.x = position.x
|
||||
this.selected.position.y = position.y
|
||||
this.selected.position.z = position.z
|
||||
|
||||
Reference in new issue
Block a user