-
-
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
Add OrbitControls connect method #23832
Add OrbitControls connect method #23832
Conversation
0366976
to
65dc7c9
Compare
Maybe make a function |
So please remove the warning from the |
Done! However I think |
Clean up.
I don't think it's necessary to update the examples. However adding the new methods to the documentation would be great! |
e36697f
to
852cfed
Compare
I've updated the docs now, let me know what you think! |
@Mugen87 Will this PR be a part of the r140? |
this would appreciated. though it affects all controls not just orbit it would be a start. to reiterate, constructor side effects prevent a class from being created and discarded without knowing implementation details (like dispose). any system or automatism that expects classes to be pure (which they should be) will fail. |
Fixed via #29142. |
Related issue: #20575
Description
Add a
connect
method which will perform the side-effects (attach event listeners). Backwards compatibility is kept but a warning message is logged.connect
withdispose
sounds a bit weird.connect
+disconnect
feels more natural butdispose
is what you commonly use. Happy to bike-shed more about namingI'll fix the remaining todo's once I get an OK on the change
TODO
Update examples