-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: Renderer hotkeys and select multiple entities #869
Conversation
Test this pull request
|
Deploying with Cloudflare Pages
|
packages/@dcl/inspector/package.json
Outdated
@@ -2,7 +2,8 @@ | |||
"name": "@dcl/inspector", | |||
"version": "0.1.0", | |||
"dependencies": { | |||
"@dcl/asset-packs": "^1.8.0" | |||
"@dcl/asset-packs": "^1.8.0", | |||
"hotkeys-js": "^3.13.3" |
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.
oops, this should be a devDependency
I notice a few things are not working the way I would expect them. On one side, the rotation of a multiselection is applied on each entity, instead of rotating the other entities around the one with the gizmo: rotation-multiselect.mp4Also when selecting entities that are nested, the translation is applied on each entity and results in weird behaviors like this: nesting-multiselect.mp4I think most intuitive way to treat multiselection is to temporary nest the other selected entities under the originally selected one, and then move them back to their previous position in the tree. When reparenting entities we already recompute the matrices so they stay in the same global position/rotation/scale. This would solve the rotation issue and the nested issues from above, it would also make it work in realtime, as it currently works when you nest some entities under a parent. Something like this:
|
Another thing that I think would be necessary for the multiselect is showing the other selected entities in the Hierarchy/Tree in the left sidebar. Also I think allowing multiselecting from there should be great to have, like just pressing CTRL and selecting from the tree instead of the editor. |
…orming the lastEntity
…onaly or selecting an ancestor
d126349
to
a6fce82
Compare
This is looking great! I found one issue with the undo though, when I undo some changes I did with multiselect, it only applies the undo to the originally selected entity: undo-multiselect.mp4Another minor thing, I think the warning about the ancestor is working correctly (it does not let me select a parent entity of the originally selected one) but the copy seems wrong to me. In this example I have a tree with entities "Ancestor" and "Child", which is nested to "Ancestor". When I start the multiselection from "Child" and I try to add later "Ancestor", the warning reads "An ancestor of this entity has already been selected". The "this entity" I understand it as the one I just clicked and made the warning appear, which is "Ancestor". So the entity that is "already selected" is not "An ancestor of this entity" but "A child of this entity". ancestor-warning.mp4Maybe a better wording would be "You can't select an ancestor of an already selected entity" ? |
9428248
to
1e1a152
Compare
This PR allows the users to use the hotkeys in the editor:
(backspace / del)
(ctrl + c)
(ctrl + v)
=
or+
-
or_
space
It also allows the users to select multiple entities while pressing the key:
ctrl
and interact with them, updating the transform component.Closes: decentraland/sdk#1064
Closes: decentraland/sdk#1065