-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Merged by Bors] - Improve bevy_ecs and bevy_app API docs where referenced by the new Bevy Book #2365
Conversation
The appbuilder methods are where a lot of the interesting content is. I kind of want those documented, but then migrate them over to the new API. |
Ok. I may be able to do that in a couple of days. |
Status updateI added stub documentation for all the Design decisions to be taken
Further work
|
Co-authored-by: MinerSebas <66798382+MinerSebas@users.noreply.github.com>
Co-authored-by: MinerSebas <66798382+MinerSebas@users.noreply.github.com>
@alice-i-cecile I added in the last commit a link stub for the book. I think this may make a good addition for people who want to have a better insight into Bevy's design philosophy, if you find it appropriate. This would likely go into chapter 2. I thought about expanding the scope of this PR to cover chapters 1 and 2, since they extensively touch topics that span over |
@alice-i-cecile, @mockersf Merge conflicts resolved. I also deleted references in documentation to the removed @Ratysz I also documented part of the schedule API. Probably you can spot potential inaccuracies here better than many others. Switching from draft to regular PR. |
I fixed all rustdoc warnings when generating with command |
@cart, when you get a chance could you do a quick skim and then merge this? I think this is critical to get in for 0.6 and the sooner we merge it the less of a merge-conflict risk it poses (and the better the developer experience on main). |
Sure thing! I'll throw it on the review stack :) |
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.
Lots of solid improvements here. Great work!
crates/bevy_ecs/src/world/mod.rs
Outdated
/// | ||
/// # Resources | ||
/// | ||
/// The world can store information not associated to entity data, called *resources*. They |
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 prefer a slight rewording of this: "Worlds can also store Resources, which are unique instances of a given type that don't belong to a specific Entity. There are also "non send resources", which can only be accessed on the main thread."
I wouldn't call Local a resource. It isn't stored the same way / World doesn't store them. Therefore we don't need to distinguish between "global" and "local" resources. Resources are "global" by definition.
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.
Interesting. They tend to behave like resources from the end-user's perspective in other ways, but I see your point. The main problems from a pedagogical perspective are a) "local" is an adjective, not a noun so it begs the "local what" question b) where should they be discussed from a teaching perspective.
Would you just call them "local unstructured data storages" or something? Do we start describing the ECS as having 3 places it can store data?
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.
@alice-i-cecile maybe we can call it "system local persistent data". It's persistent in the sense that it lasts across system calls but I hope it doesn't get confused with the more general "persistent storage" concept, opposed to "volatile storage".
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.
Right 🤔 I think I like that.
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.
Or "system local state". This time it can be confused with states though 😬
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 think "system local persistent data" is fine if it's followed by the explanation that it's only persistent between frames
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.
Yeah I think its enough to say that Local is "a persistent value stored locally in the system".
@cart Thanks for the review. I think I've applied all the suggestions. |
Looks good to me! |
bors r+ |
…vy Book (#2365) ## Objective The upcoming Bevy Book makes many references to the API documentation of bevy. Most references belong to the first two chapters of the Bevy Book: - bevyengine/bevy-website#176 - bevyengine/bevy-website#182 This PR attempts to improve the documentation of `bevy_ecs` and `bevy_app` in order to help readers of the Book who want to delve deeper into technical details. ## Solution - Add crate and level module documentation - Document the most important items (basically those included in the preludes), with the following style, where applicable: - **Summary.** Short description of the item. - **Second paragraph.** Detailed description of the item, without going too much in the implementation. - **Code example(s).** - **Safety or panic notes.** ## Collaboration Any kind of collaboration is welcome, especially corrections, wording, new ideas and guidelines on where the focus should be put in. --- ### Related issues - Fixes #2246
Objective
The upcoming Bevy Book makes many references to the API documentation of bevy.
Most references belong to the first two chapters of the Bevy Book:
This PR attempts to improve the documentation of
bevy_ecs
andbevy_app
in order to help readers of the Book who want to delve deeper into technical details.Solution
Collaboration
Any kind of collaboration is welcome, especially corrections, wording, new ideas and guidelines on where the focus should be put in.
Related issues