object move blocks
debug floaters
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { useEffect } from "react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { debugLabelsStore } from "../state/debugLabelsStore";
|
||||
import { DebugLabel } from "./DebugLabel";
|
||||
import type { RuntimeScene } from "../types";
|
||||
|
||||
export const DebugLabelsView = observer(function ({ scene }: { scene: RuntimeScene }) {
|
||||
useEffect(
|
||||
() => {
|
||||
return () => { debugLabelsStore.clear(); };
|
||||
},
|
||||
[],
|
||||
);
|
||||
|
||||
return <>
|
||||
{
|
||||
Object.entries(scene.objects)
|
||||
.map(([objectId, obj]) => {
|
||||
return <DebugLabel key={objectId} obj={obj} />;
|
||||
})
|
||||
}
|
||||
</>;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user