-
Notifications
You must be signed in to change notification settings - Fork 303
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 View helpers #2174
Add View helpers #2174
Conversation
b5a903c
to
f2c81c6
Compare
By adding helper functions to get specific variable, should we not modify these variables to set them as private ? |
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.
I get the point that private variable in JS might not be well handled.
For the second point: using methode getVariable() or using setter/getter I can't say what is the best usage, we might need to discuss that internaly.
I think setting them as private could be done but it is not related to this PR. In addition, I'm not fond of private fields implementation in JS (side effects, badly interpreted by dev tools). But this is another subject :) Regarding getter vs the methods I implemented, in my opinion both are valid and it's only a matter of coding style and API. I don't have a strong opinion on which one we should used, as long as it's decided quickly. Please let me know, so we can move on quickly. |
After discussion, I think we should opt for the setter/getter methods. |
Sorry I don't understand what you mean by:
Can you give more details please ? |
f2c81c6
to
428173b
Compare
I changed to implemented to getters, removed the Let me know if that's what you meant by your last comment. |
428173b
to
2786ab1
Compare
Use `View.renderer` to get the threejs renderer of the view Use `View.camera3D` to get the threejs camera of the view
2786ab1
to
f346c46
Compare
Add some helper functions in
View
to get threejs renderer, renderer size and camera to avoid having to know itowns internal structure to access them.