Skip to content

Commit

Permalink
Move SelectedMesh to Scene #332
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianK13 committed Oct 18, 2024
1 parent e881c2e commit 5241c4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/ThreeViewer/Scene.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ const Scene = ({
geometries,
simulationMeshes,
setSimulationMeshes,
selectedMesh,
setSelectedMesh,
selectedPVSystem,
setSelectedPVSystem,
vegetationGeometries,
Expand All @@ -32,6 +30,8 @@ const Scene = ({
const [pvSystems, setPVSystems] = useState([])
// pvPoints are the red points that appear when drawing PV systems
const [pvPoints, setPVPoints] = useState([])
// highlighted meshes for resimulation
const [selectedMesh, setSelectedMesh] = useState([])

window.setPVPoints = setPVPoints
const position = [
Expand Down
5 changes: 1 addition & 4 deletions src/pages/Simulation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ function Index() {
surrounding: [],
background: [],
})
// highlighted meshes for resimulation
const [selectedMesh, setSelectedMesh] = useState([])

// highlighted PVSystems for deletion or calculation
const [selectedPVSystem, setSelectedPVSystem] = useState([])
// meshes that were simulated
Expand Down Expand Up @@ -64,8 +63,6 @@ function Index() {
geometries={geometries}
simulationMeshes={simulationMeshes}
setSimulationMeshes={setSimulationMeshes}
selectedMesh={selectedMesh}
setSelectedMesh={setSelectedMesh}
selectedPVSystem={selectedPVSystem}
setSelectedPVSystem={setSelectedPVSystem}
vegetationGeometries={vegetationGeometries}
Expand Down

0 comments on commit 5241c4f

Please sign in to comment.