diff --git a/src/app/App.tsx b/src/app/App.tsx index 8ae7703b..0645874a 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -7379,6 +7379,26 @@ export function App({ store, initialStatusMessage }: AppProps) { } }; + const handleCreateTerrain = () => { + try { + const nextTerrain = createTerrain(); + + store.executeCommand( + createUpsertTerrainCommand({ + terrain: nextTerrain, + label: "Create terrain" + }) + ); + requestViewportFocus({ + kind: "terrains", + ids: [nextTerrain.id] + }); + setStatusMessage("Created Terrain and framed it in the viewport."); + } catch (error) { + setStatusMessage(getErrorMessage(error)); + } + }; + const commitPathChange = ( currentPath: ScenePath, nextPath: ScenePath,