pmndrs / react-three-editor

🔌 A one of a kind scene editor that writes changes back into your code
MIT License
621 stars 40 forks source link

proposal: extract the scene graph out from leva to different component #7

Closed dineshsalunke closed 1 year ago

dineshsalunke commented 1 year ago

Ideally it would be really intuitive if the scene graph sits outside of the leva panel into as its own UI.

Reasons:

@nksaraf any specific reason to have the scene graph in the leva panel ?

nksaraf commented 1 year ago

No particular scene apart from just didn't do the setup for multi panel setups .. I want to have to a way of persisting positions of the panel and maybe some configurability of the panel.

But otherwise it makes sense to have separate panels.

dineshsalunke commented 1 year ago

I will extract the scene graph out to a new panel.

also can you elaborate on maybe some configurability of the panel.

dineshsalunke commented 1 year ago

@nksaraf any idea till when do you plan for the clean and refactor ? also if there is anything that I can contribute.

nksaraf commented 1 year ago

I think ive finally landed on an architecture and separation that makes sense! your starting the refactor was very helpful.

As per configurability, I meant, being able to drag it out of the main panel into separate panels and being able to merge it back. Need to hack leva a bit for that.

dineshsalunke commented 1 year ago

I think ive finally landed on an architecture and separation that makes sense! your starting the refactor was very helpful.

Good then should I start with my changes ?. I plan to add some history for now, since I feel that will be very important thing for the editor first

As per configurability, I meant, being able to drag it out of the main panel into separate panels and being able to merge it back.

I don't think that is worth the effort, since the list is going to grow huge and I hardly feel anyone would really like merging these panels together for now.

dineshsalunke commented 1 year ago

also if you don't mind we could coordinate the work, I am planning to give good share of my time on this project. Let me know what you feel

nksaraf commented 1 year ago

Yeah just merged your existing PRs, you can hack on it now.

I would love to coordinate stuff. Maybe we can talk to discord about any ideas as we work on them: https://discord.com/channels/740090768164651008/1046760186334941245 (this is the editor channel)

Or you can DM me too directly on Discord. Should be able to find me on that channel.

nksaraf commented 1 year ago

I don't think that is worth the effort, since the list is going to grow huge and I hardly feel anyone would really like merging these panels together for now.

I agree mostly. Though for small scenes, I have enjoyed having it all in one panel. I added some overflow-scroll to the scene so that it never expands beyond a certain height. That way it remains pretty manageable even in the same panel. The thing with two panels is that more real estate of the screen is taken (not in exact terms, but mental space on the screen being taken by the editor is large). But I agree that for more complex projects it might help to have separate scene panel