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

Clean up webgl_animation_multiple example #16105

Closed
3 of 13 tasks
takahirox opened this issue Mar 30, 2019 · 10 comments
Closed
3 of 13 tasks

Clean up webgl_animation_multiple example #16105

takahirox opened this issue Mar 30, 2019 · 10 comments
Labels

Comments

@takahirox
Copy link
Collaborator

Description of the problem

webgl_animation_multiple example doesn't follow Three.js code style.

https://github.com/mrdoob/three.js/wiki/Mr.doob's-Code-Style%E2%84%A2

I'm glad if someone cleans up.

Three.js version
  • Dev
  • r103
  • ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, ...)
@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 30, 2019

@strazdinsg Any interests in doing this? 😇

@Mugen87 Mugen87 added the Addons label Mar 30, 2019
@takahirox
Copy link
Collaborator Author

Ah, sorry I had a change of heart and did by myself. Making PR now.

@takahirox
Copy link
Collaborator Author

#16106

@strazdinsg
Copy link
Contributor

Thanks for reporting, I did not know about the code style guide. Will know next time :)
@takahirox How did you update the style? Configured IDE with the rules from the document and did auto-format?

BTW, I see there is a rule about naming: ConstantsLikeThis. In the file I created CONSTANTS_ARE_LIKE_THIS, probably should be renamed?
I will take a look at the rules and check if the example follows them. Will create a PR in case I find necessary changes.

@takahirox
Copy link
Collaborator Author

I manually edited because I don't use IDE to write JavaScript.

I know some modules use CONSTANT_NAME style, for example GLTFLoader. I think renaming them may be good for code consistency.

@strazdinsg
Copy link
Contributor

We could ask @mrdoob why the constant naming rule is so weird, I have not seen ConstantsLikeThis anywhere else. But I know that one should not question coding convention, just use the one that has been decided "by the board" :). @mrdoob, in case there is an error in the style document and you actually meant CONSTANTS_LIKE_THIS, let us know :)

@mrdoob
Copy link
Owner

mrdoob commented Apr 2, 2019

I don't have a preference. CONSTANTS_LIKE_THIS look good to me.

@takahirox
Copy link
Collaborator Author

I prefer CONSTANTS_LIKE_THIS. Do you mind if I update the code style wiki page?

@mrdoob
Copy link
Owner

mrdoob commented Apr 6, 2019

Do you mind if I update the code style wiki page?

Go for it.

@takahirox
Copy link
Collaborator Author

Done

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

No branches or pull requests

4 participants