feat: selfEntity back on
This commit is contained in:
parent
5b32d32a5e
commit
429a0efb68
|
@ -76,7 +76,7 @@ const DebugUi = ({
|
|||
>
|
||||
<Connection Parser={Parser} socket={socket} />
|
||||
<Timers app={app} />
|
||||
{/* <SelfEntity app={app} /> */}
|
||||
<SelfEntity app={app} />
|
||||
</div>
|
||||
</div>;
|
||||
};
|
||||
|
|
|
@ -44,12 +44,12 @@ const decorate = compose(
|
|||
|
||||
const SelfEntityComponent = ({app}) => {
|
||||
const selfEntity = useSelfEntity(app);
|
||||
const position = usePropertyChange(selfEntity, 'position', [0, 0]);
|
||||
const roundedPosition = Vector.round(position);
|
||||
const x = usePropertyChange(selfEntity, 'x', 0, (x) => Math.round(x));
|
||||
const y = usePropertyChange(selfEntity, 'y', 0, (y) => Math.round(y));
|
||||
return <div className="self-entity unselectable">
|
||||
<div className="location">
|
||||
<div className="x">{roundedPosition[0]}</div>
|
||||
<div className="y">{roundedPosition[1]}</div>
|
||||
<div className="x">{x}</div>
|
||||
<div className="y">{y}</div>
|
||||
</div>
|
||||
</div>;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user