-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
OrbitControls: refactoring #16961
OrbitControls: refactoring #16961
Conversation
Exactly. We would add a note to the migration guide. @sciecode I will be able to check this later this week, but if it is what I expect, it will be awesome. :-) |
In the meantime, consider to fix the new |
@Mugen87 those aren't fixable errors. |
Um, I don't think it's good to modify the core for this change. |
I'm not sure what would be the best way to expose these constants to the user, if we don't alter core. |
We are already doing this in other files for example in three.js/examples/jsm/postprocessing/SAOPass.js Lines 195 to 201 in a642a21
|
Update PR with suggested constants changes. |
As I said in #16803,
I was referring to backwards-compatibility in general, and the API in particular.
An API change can be implemented is a smaller PR with proper user warnings included. Please revert the last commit. |
done... 🙄 👀 |
@sciecode If you can fix the conflict, I think we can go ahead and merge this. |
Should be ready to merge. |
OK, let's go for it! Thanks! @mrdoob This PR requires a rebuild. |
Rebuilt 👌 |
Thanks! |
When MapControls are basically OrbitControls with a different button mapping, it makes sense that they share code/file. But I would actually expect from something named MapControls that dollying follows a ray through the pointer screen position. Would this be easy to implement, maybe as an option, in the refactored version? Maybe it would even be an interesting feature to have in OrbitControls too? |
Are you familiar with |
No, not screen space panning. I mean when you zoom. Try Google Earth. When you zoom with the mouse wheel, the map position of the mouse pointer is conserved. This holds even if you rotate the view with the middle mouse button. Very convenient. I have made something similar for 2D views, that I shared in a new repository a few days ago: https://github.com/EliasHasle/map-view-controls (no examples included, and the code may need a small overhaul) |
I see what you mean. It would require some tweaking to adjust to the current way we're handling dolly zoom, but it's definitely possible. Just not sure if it fits the current "general purpose" idea behind the example files, or if it's more of application-level feature. There has been a bit of reluctance against adding new features, especially because of the need to keep things simple. I don't particularly have any opinion about it to be honest. |
I think it is an essential feature for something called "Map controls". There is no hurry, though. :-) |
@EliasHasle I think that is a great idea. I hacked it into |
@WestLangley This is just what I was looking for ...Thank you very much! |
Based on #16803 discussed changes.
@WestLangley is this what you had in mind, when you suggested defining
MapControls
in the same file?Would appreciate if someone could test
*.ts
, as I'm not familiar with it.This PR requires a build update, because of
constants.js
changes.