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

Update documentation for ThreeJS scenes and textures Classes, with some Typing improvements #380

Merged
merged 24 commits into from
Mar 28, 2023

Conversation

rafaelsc
Copy link
Contributor

@rafaelsc rafaelsc commented Mar 18, 2023

Why

The TSDocs for many classes are missing or outdated.
Some Typing information is missing and could be improved.
Missing overwriting information in Textures classes.

What

  • Improve documentation for all scenes.* and textures.* classes/files.
  • Update some Types
  • Update Defalts values for overwriting properties.
  • Code Format
  • Normalize some TSDOcs across many other classes.
  • Texture, format and mapping types updated to allow any sub-texture types.
  • Force format to be required for CompressedTexture and CompressedArrayTexture. Internally the default value is a non-compressed constant from Texture and not compatible with CompressedTexture.

Checklist

  • Checked the target branch (current goes master, next goes dev)
  • Added myself to contributors table
  • Ready to be merged

@rafaelsc rafaelsc marked this pull request as ready for review March 18, 2023 22:50
@Methuselah96
Copy link
Contributor

Thanks for working on this! I'm curious what the maintainability of these docs are? Is there a way to make sure they stay up-to-date, or would it just have to be manually updated when changes are made in three.js?

Shouldn't block this from merging since having the docs at all is better than not having them since they don't change that often, just curious whether there is a sustainable way to make sure they stay up-to-date.

@rafaelsc
Copy link
Contributor Author

Right now the only way to know that is up-to-date is by fowling the ThreeJS changelog on new releases and seeing what documents changed. They do a great job reporting changes in documentation see: https://github.com/mrdoob/three.js/releases/tag/r150

My end goal is to parse and update the TSDocs automatically via a yarn/npm command, but for right now I do not know when I will have time to invest in that.
Today I have a working parser that is working 90-95% well enough to parse and generate the documentation that allows me to copy and paste manually all TSDocs. That allows quick updates. See my comment here too, #354 (comment)
I will publish this parser when is working well enough.

Copy link
Contributor

@Methuselah96 Methuselah96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on these. I did not thoroughly review the changes, but they're surely better than the status quo, and we can make any adjustments in follow-up PRs if necessary.

@Methuselah96 Methuselah96 merged commit e42e212 into three-types:master Mar 28, 2023
@Methuselah96
Copy link
Contributor

Methuselah96 commented Jul 15, 2023

My end goal is to parse and update the TSDocs automatically via a yarn/npm command, but for right now I do not know when I will have time to invest in that.
Today I have a working parser that is working 90-95% well enough to parse and generate the documentation that allows me to copy and paste manually all TSDocs. That allows quick updates. See my comment here too, #354 (comment)
I will publish this parser when is working well enough.

@rafaelsc Would you be willing to publish the parser? Some of the changes in docs like mrdoob/three.js#26147 are just not worth my time to update manually, but I share your end goal of doing it all automatically. I have thought about writing a parser as well, but if you already have something started, it'd be great to not to have to start from scratch.

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.

None yet

2 participants