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
+2 -1
View File
@@ -4,7 +4,7 @@ import { debugLabelsStore } from "../state/debugLabelsStore";
import { DebugLabel } from "./DebugLabel";
import type { RuntimeScene } from "../types";
export const DebugLabelsView = observer(function ({ scene }: { scene: RuntimeScene }) {
export const DebugLabelsView = observer(function ({ scene, editMode }: { scene: RuntimeScene, editMode?: boolean }) {
useEffect(
() => {
return () => { debugLabelsStore.clear(); };
@@ -15,6 +15,7 @@ export const DebugLabelsView = observer(function ({ scene }: { scene: RuntimeSce
return <>
{
Object.entries(scene.objects)
.filter(([_, obj]) => editMode || obj.visible)
.map(([objectId, obj]) => {
return <DebugLabel key={objectId} obj={obj} />;
})