-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Docs: Add at least "In construction/WIP" pages for addons that are not documented to make these features more obvious #25381
Comments
Actually it is the primary purpose of the examples to demonstrate features of the library, not the documentation. All classes you have listed have a respective demo: https://threejs.org/examples/#webgl_marchingcubes We have implemented a simple tags system some time ago, so you can search for certain terms like "water" and still find the So I could argue that you have just looked at the wrong place. Of course documenting everything would be better (like in every software project) but it is always a matter of time/budget to do this. And I'm not really a fan of stubs since they have to be maintained to certain degree as well and not necessarily create much value. TBH, I doubt it would help many users to discover features. Besides, new exceptional features are always part of the release tweet by promoting them with screenshots. |
If you ask me, examples are examples, not documentation. In the case of the NURBSSurface, most of people I saw online in forum including myself have an hard time understanding the parameters. Examples are sometime sufficient to some degree to take a grasp of the implementation, but it will never replace the parameters documentation with the actual constraints. knots1, knots2 for instance are arrays with numbers in the example, but what is the actual meaning that I should deduce from the numbers the example is given. Without becoming a NURBS expert, three.js is not helping me much here. If not putting stubs, I think we need to find a way to make it more discoverable. Scrolling through the examples praying to see something that ressembles to what we want to craft is a bit erratic to me. By seeing the actual stub not documented, it would attract maybe people that knows the field or want to interest to the field, to document it for people that have not the academic background, or that are in a rush of implementing it. Again, I speak about my experience struggling to find anything. At the beginning I was assuming that the documentation was containing everything that composes three.js to wake up one morning discovering that it is not that close. EDIT: I wanted to add that most of the automatic documentation tool that I used in the past like compodoc to parse the JSDoc, are creating pages even if the file is not documented, I find it useful to also count what is the % of documentation coverage left to do. This type of metrics is kind of useful to have a feedback also on how much work is left to do. I will happy to contribute to the documentation either if you respond favorably to this issue. I want to make this documentation a better place :) |
I'm afraid you are asking for something that the documentation will never fulfill. At least in For example the documentation for |
Stuff like units, value ranges etc. is of course fine. We just want to avoid to put too much information into the docs. |
I don't want to make my case a generalization, but I thought for several months that the examples were just building on the foundation of what is described in the documentation. (maybe I'm just dumb) I was amazed and disappointed at the same time that this is actually the tip of the iceberg. There are many things I could have saved myself from implementing if I had had the presence of mind to understand it in the first place. (is it a whim to ask for clarification?) I don't know how many people share this frustration, which is why I opened this issue. Now what can I do to help three.js improve on this point. I don't have enough background yet to understand each examples and document the addons accordingly to flesh it out. |
@0xAxiome it's not just you, the ThreeJS documentation is some of the most difficult docs I've ever had to work with, and reading through the examples can be cumbersome at best with the amount of (often questionably composed) boilerplate one needs to sift through in order to get to the parts of the (largely uncommented) relevant code. That being said, there is often enough information in there to slowly piece together the information one is looking for, it just takes orders of magnitude more time than it would with good docs. I just want to push back a little on this statement:
The BabylonJS docs page for curves is a good example of the opposite side of the spectrum, with their examples used to compliment sections of the docs with in an interactive playground as opposed to being used as the docs. Their actual docs are separate from their API docs, and imo, API docs can almost never substitute real docs. It's one thing to say "we don't have the resources for comprehensive documentation", and another to say that the current state of the documentation is ideal because "the documentation should [only] document the API". That's what typescript is for. My IDE documents the API without the need to context switch, and it doesn't replace the need for real, thorough documentation / examples. That said, the ThreeJS project, to my knowledge, doesn't have a very large, very well funded team working on it around the clock like Babylon does. It's a rather small group of passionate open source devs with a much more limited scope. I think it's important to point out that while the ThreeJS docs are very far from ideal, they are certainly good enough to get by with some extra time and dedication, which is more than we can really ask for from such a small, dedicated team! |
I agree with you @fractalhq on most of the points. Moreover, I would want to really contribute to the documentation, but the guidelines about how to improve its discoverability is blurry to me. I'm really more about docs like the Babylon you shared. We can maybe find a middle ground. For me, each feature of three.js should have at least a WIP page with maybe the general sake of the module. There is other problems to the documentation but it is not my point here in this issue. But the time we think we spare not doing a "waterproof" documentation is the time we lose answering on discord channels, forums, stackoverflow... on very basic questions. Really I would be happy to contribute, but we need a clear direction on where we want to bring the documentation. For me, it is not a good thing to keep it "on surface", throwing a bunch of examples and if the planets are aligned, you may or may not find something, an ugly js code that you should examine very carefully to determine what in the world was the developer thinking while writing it. Just so you know, I spent hours on the NURBSCurve, found a way to make it work a bit. I'm still not able to tell what is a knot1, knot2. The person who wrote the code of the example must know it somehow. The examples by essence are not enough. |
API references and tutorials are two distinct things, so let's not dismiss one or the other as not being "real docs" please. API references are a critical part of the three.js project, and we have to spend time on that (also see: i18n). I understand you'd like three.js to have more long-form tutorials; so would I. Probably three.js Fundamentals or three.js Journey are more the format you're hoping for? Ultimately someone needs to write anything that is going to be added, but I think we're all broadly in favor of having more high-quality tutorials, in appropriate locations. @Mugen87 I think I'm in favor of "stub" API references for things like THREE.Water and THREE.NURBS. Having links in the navigation going to a stub page does seem better to me than not having those links at all. And it may encourage others to contribute, if we request help on the stub pages. 😊 Those pages should remain API references, though. Any guides or tutorials can go in the appropriate sections. |
It is unusual that critical infrastructure is undocumented. Having to dig through raw source code to figure out how to use something, why treat JSM/EXAMPLES in this manner?
I would also suggest that the new addons repo opens up to more contributors that can review, lead PR's through and fix bugs. similar to how three-types and three-stdlib is handled. |
@drcmda I cannot agree more with what you said. You captured insanely well what is bothering me. Making it a separate repository could be great. The semver is also a huge topic. (In addition to the fact that backward compatibility is not a known characteristic of three.js) A clear documentation, (even with some of the pages in construction with a message inviting to contribute maybe), that would point also new features with a little tag "New" like we can see in design systems. This deep understanding of what exist and what does not, bringing the community to a better understanding, could lead to more contribution and less pollution in terms of forums and stuffs. |
I've changed my mind and agree now that having stub pages is better than nothing. Let's use #27034 to track the addition of these pages. |
Description
I often miss great features that are present in the examples (the latest for me is NURBS) and are not:
Solution
I would be in favor of at least referencing the features present in the source code, even if they are not documented for two reasons:
For point number 2, the people who will finally stumble upon the "hidden" feature in question, they will have to search in the source code how to use it, to understand how it works. If individually, we take this step of understanding, it would be great to go further and actually update the doc (that was a blank page) so that it is finally complete.
My point is to make it obvious and visible that we need contribution on this specific features.
Alternatives
It can be cool also to have some kind of metrics somewhere about the documentation coverage.
Additional context
This happened to me in multiple occasions:
As a beginner it could be tremendous to see what is actually "required" to know about when exploring what three.js has to offer. Even with a blank "Marching cubes" page, I would have wanted to know more about, and make my research aside. Then I plan to contribute to the documentation itself about this addon.
No response
The text was updated successfully, but these errors were encountered: