Skip to content

Commit

Permalink
editor: fixed scene nodes icon visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
xesf committed Aug 5, 2023
1 parent ce45cb0 commit 3706767
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ui/editor/areas/gameplay/scene/nodes/ActorsNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,16 @@ const ActorNode = {
{
id: 'visible',
value: actor.isVisible,
render: (value) => {
render: () => {
const onClick = () => {
actor.isVisible = !actor.isVisible;
if (actor.threeObject) {
actor.isVisible = !actor.threeObject.visible;
actor.threeObject.visible = actor.isVisible;
}
};
return <img
src={`editor/icons/${value ? 'visible' : 'hidden'}.svg`}
src={`editor/icons/${actor.threeObject.visible ? 'visible' : 'hidden'}.svg`}
onClick={onClick}
style={{cursor: 'pointer', width: 14, height: 14}}
/>;
Expand Down

0 comments on commit 3706767

Please sign in to comment.