custom voxel mesh builder
object visibility
This commit is contained in:
@@ -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} />;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user