mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 14:10:19 +00:00
Doc warnings (#2577)
Fixes #2576 Add <> to links where needed, fix typo and refactored names, and add docs.rs links for external items.
This commit is contained in:
parent
b91541b6ef
commit
34f0085ba0
5 changed files with 14 additions and 9 deletions
|
@ -440,8 +440,9 @@ impl App {
|
|||
|
||||
/// Sets the main runner loop function for this Bevy App
|
||||
///
|
||||
/// Usually the main loop is handled by Bevy integrated plugins ([`WinitPlugin`]), but
|
||||
/// in some cases one might wish to implement their own main loop.
|
||||
/// Usually the main loop is handled by Bevy integrated plugins
|
||||
/// ([`WinitPlugin`](https://docs.rs/bevy/*/bevy/winit/struct.WinitPlugin.html)),
|
||||
/// but in some cases one might wish to implement their own main loop.
|
||||
///
|
||||
/// This method sets the main loop function, overwriting a previous runner if any.
|
||||
///
|
||||
|
@ -491,7 +492,9 @@ impl App {
|
|||
/// Bevy plugins can be grouped into a set of plugins. Bevy provides
|
||||
/// built-in PluginGroups that provide core engine functionality.
|
||||
///
|
||||
/// The plugin groups available by default are [`DefaultPlugins`] and [`MinimalPlugins`].
|
||||
/// The plugin groups available by default are
|
||||
/// [`DefaultPlugins`](https://docs.rs/bevy/*/bevy/struct.DefaultPlugins.html)
|
||||
/// and [`MinimalPlugins`](https://docs.rs/bevy/*/bevy/struct.MinimalPlugins.html).
|
||||
///
|
||||
/// ## Example
|
||||
/// ```
|
||||
|
|
|
@ -218,7 +218,8 @@ impl AssetServer {
|
|||
/// The absolute Path to the asset is "ROOT/ASSET_FOLDER_NAME/path".
|
||||
///
|
||||
/// By default the ROOT is the directory of the Application, but this can be overridden by
|
||||
/// setting the `"CARGO_MANIFEST_DIR"` environment variable (see https://doc.rust-lang.org/cargo/reference/environment-variables.html)
|
||||
/// setting the `"CARGO_MANIFEST_DIR"` environment variable
|
||||
/// (see <https://doc.rust-lang.org/cargo/reference/environment-variables.html>)
|
||||
/// to another directory. When the application is run through Cargo, then
|
||||
/// `"CARGO_MANIFEST_DIR"` is automatically set to the root folder of your crate (workspace).
|
||||
///
|
||||
|
|
|
@ -36,10 +36,10 @@ use std::{any::TypeId, collections::HashMap};
|
|||
/// ```
|
||||
///
|
||||
/// # Safety
|
||||
/// [Bundle::component_id] must return the ComponentId for each component type in the bundle, in the
|
||||
/// [Bundle::component_ids] must return the ComponentId for each component type in the bundle, in the
|
||||
/// _exact_ order that [Bundle::get_components] is called.
|
||||
/// [Bundle::from_components] must call `func` exactly once for each [ComponentId] returned by
|
||||
/// [Bundle::component_id]
|
||||
/// [Bundle::component_ids]
|
||||
pub unsafe trait Bundle: Send + Sync + 'static {
|
||||
/// Gets this [Bundle]'s component ids, in the order of this bundle's Components
|
||||
fn component_ids(components: &mut Components) -> Vec<ComponentId>;
|
||||
|
|
|
@ -152,7 +152,7 @@ impl_debug!(ResMut<'a, T>, Component);
|
|||
|
||||
/// Unique borrow of a non-[`Send`] resource.
|
||||
///
|
||||
/// Only [`Send`] resources may be accessed with the [`ResMut`] [`SystemParam`]. In case that the
|
||||
/// Only [`Send`] resources may be accessed with the [`ResMut`] [`crate::system::SystemParam`]. In case that the
|
||||
/// resource does not implement `Send`, this `SystemParam` wrapper can be used. This will instruct
|
||||
/// the scheduler to instead run the system on the main thread so that it doesn't send the resource
|
||||
/// over to another thread.
|
||||
|
|
|
@ -3,7 +3,7 @@ use bevy_reflect::TypeUuid;
|
|||
use bevy_render::{color::Color, renderer::RenderResources, shader::ShaderDefs, texture::Texture};
|
||||
|
||||
/// A material with "standard" properties used in PBR lighting
|
||||
/// Standard property values with pictures here https://google.github.io/filament/Material%20Properties.pdf
|
||||
/// Standard property values with pictures here <https://google.github.io/filament/Material%20Properties.pdf>
|
||||
#[derive(Debug, RenderResources, ShaderDefs, TypeUuid)]
|
||||
#[uuid = "dace545e-4bc6-4595-a79d-c224fc694975"]
|
||||
pub struct StandardMaterial {
|
||||
|
@ -59,7 +59,8 @@ impl Default for StandardMaterial {
|
|||
// This is just a default for mostly-dielectric
|
||||
metallic: 0.01,
|
||||
// Minimum real-world reflectance is 2%, most materials between 2-5%
|
||||
// Expressed in a linear scale and equivalent to 4% reflectance see https://google.github.io/filament/Material%20Properties.pdf
|
||||
// Expressed in a linear scale and equivalent to 4% reflectance see
|
||||
// https://google.github.io/filament/Material%20Properties.pdf
|
||||
metallic_roughness_texture: None,
|
||||
reflectance: 0.5,
|
||||
normal_map: None,
|
||||
|
|
Loading…
Reference in a new issue