-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Playground: Implement a splitscreen #27784
Conversation
|
Fixed. I had to wrap the renderer DOM element into another div for this, let me know if there is a better way to do this.
Fixed, it does now return to the original view as demanded. |
The DeepScan check fails on an issue that seems to be totally unrelated to this PR - or am I overlooking something? |
A rebase would solve the issue. But yes, it's unrelated to your changes. |
const container = document.createElement( 'div' ); | ||
container.className = 'splitview'; | ||
|
||
document.body.appendChild( container ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use this.domElement
instead of document.body
here and in others appends? This would make the editor more flexible if we added it embed in editor for exemple. I think we can do the same thing with the classes, for example: flow splitview
intead of just splitview
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.domElement
is null
in the context of the script (which is directly embedded into the html). Thus, I am not sure how to implement that, can you give me a hint?
It's looking really cool, I think it would be the last details I saw. |
playground/NodeEditor.js
Outdated
@@ -297,7 +339,7 @@ export class NodeEditor extends THREE.EventDispatcher { | |||
|
|||
previewMenu.add( editorButton ); | |||
|
|||
this.domElement.append( menu.dom ); | |||
document.body.appendChild(menu.dom); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to move the menus to domElement
in order to maintain the consistency of the hierarchy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Feature proposal for a (resizable) splitscreen for the playground:
Currently, there are two ways to display results of the node trees:
Something I found annoying during my experiments is that often times, I wanted to see the results when plugging various nodes around for experimentation. The first display option requires an additional click/hotkey (and a little do-after because of the node-pop-up animation when the editor opens back up). The second option only allows to show a single node. A splitscreen allows to see the results of plugging instantly.
I am open for suggestions and discussion :)