refactor: added pref

This commit is contained in:
2025-07-22 14:36:03 +05:30
parent 156712f684
commit 786e6cb6d9
6 changed files with 126 additions and 40 deletions

View File

@@ -62,6 +62,7 @@ export default function Scene({ layout }: { readonly layout: 'Main Layout' | 'Co
shadows
color="#aaaa"
eventPrefix="client"
frameloop="demand"
onContextMenu={(e) => {
e.preventDefault();
}}

View File

@@ -5,6 +5,7 @@ import Controls from '../controls/controls';
import { Environment } from '@react-three/drei'
import background from "../../../assets/textures/hdr/mudroadpuresky2k.hdr";
// import { Perf } from 'r3f-perf';
function Setup() {
return (
@@ -17,6 +18,8 @@ function Setup() {
<PostProcessing />
{/* <Perf position="bottom-left" className="scene-performance-stats"/> */}
{/* <MovingClouds /> */}
<Environment files={background} environmentIntensity={1.5} />
@@ -24,4 +27,4 @@ function Setup() {
)
}
export default Setup
export default Setup;

View File

@@ -74,10 +74,10 @@
border-radius: #{$border-radius-large};
outline: 1px solid var(--border-color);
}
.upload-btn{
.upload-btn {
padding: 4px 16px !important;
}
.generate-walls-btn{
.generate-walls-btn {
padding: 4px 16px;
@include flex-center;
gap: 4px;
@@ -117,9 +117,20 @@
}
}
}
}
.label-toogler.bottom{
.label-toogler.bottom {
bottom: 32%;
}
.scene-performance-stats {
bottom: 36px !important;
left: 12px !important;
border-radius: 6px;
backdrop-filter: blur(4px);
svg {
display: none;
}
.c-jiwtRJ{
align-items: center;
}
}

View File

@@ -240,8 +240,12 @@ const KeyPressListener: React.FC = () => {
if (keyCombination === "Ctrl+Shift+?") {
setShowShortcuts(!showShortcuts);
}
// if (keyCombination === "Ctrl+Shift+P") {
// pref
// }
if (keyCombination === "U") {
// console.log("viewSceneLabels: ", viewSceneLabels);
setViewSceneLabels((prev) => !prev);
}