custom voxel mesh builder

object visibility
This commit is contained in:
azykov@mail.ru
2026-06-17 10:54:13 +03:00
parent 7ac154dd58
commit 31c77b0a72
27 changed files with 416 additions and 266 deletions
+10 -4
View File
@@ -4,7 +4,7 @@ import { Grid, OrbitControls } from '@react-three/drei';
import { observer } from 'mobx-react-lite';
import { state } from '../state';
import { SceneView } from './SceneView';
import { type OrthographicCamera, type PerspectiveCamera } from 'three';
import { MOUSE, type OrthographicCamera, type PerspectiveCamera } from 'three';
import { CameraSync } from './tools/CameraSync';
import { Physics } from '@react-three/rapier';
@@ -49,17 +49,23 @@ export const SceneEditorView = observer(function () {
onStart={handleStart}
onEnd={handleEnd}
makeDefault
mouseButtons={{
LEFT: MOUSE.PAN,
MIDDLE: MOUSE.ROTATE,
RIGHT: MOUSE.ROTATE,
}}
rotateSpeed={0.2}
enableDamping={false}
/>
<CameraSync camera={state.worldEditor.camera} />
<Grid
{/* <Grid
sectionThickness={0.5}
cellThickness={0}
sectionColor="white"
infiniteGrid
/>
/> */}
<Physics colliders={false} paused={true}>
<SceneView scene={state.worldEditor.scene} editMode debugOverlay />
<SceneView scene={state.worldEditor.scene} isEditor debugOverlay />
</Physics>
</Suspense>
</>);