Skip to content
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

ArcballControls: Avoid some clone() calls. #22856

Merged
merged 1 commit into from
Nov 17, 2021
Merged

ArcballControls: Avoid some clone() calls. #22856

merged 1 commit into from
Nov 17, 2021

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 17, 2021

Related issue: #22823

Description

The PR does not completely fix #22823 but at least it's a start.

Sidenote: If we need helper variables in methods, I think it's better to declare them in module scope and not as a members of the class. Besides, I favor descriptive variable names (like _offset, _direction or _origin) instead of generic names (like _v1, _v2). Makes the code easier to read.

@mrdoob mrdoob added this to the r135 milestone Nov 17, 2021
@mrdoob mrdoob merged commit 19d9112 into mrdoob:dev Nov 17, 2021
@mrdoob
Copy link
Owner

mrdoob commented Nov 17, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ArcballControls is using .clone() unnecessarily
2 participants