Fix some grammatical errors in the docs (#6109)
Co-authored-by: devil-ira <justthecooldude@gmail.com>
This commit is contained in:
parent
39467e30fd
commit
92e78a4bc5
@ -1,28 +1,27 @@
|
|||||||
use bevy_ecs::prelude::Entity;
|
use bevy_ecs::prelude::Entity;
|
||||||
|
|
||||||
/// A [`Event`] that is fired whenever there is a change in the world's
|
/// An [`Event`] that is fired whenever there is a change in the world's hierarchy.
|
||||||
/// hierarchy.
|
|
||||||
///
|
///
|
||||||
/// [`Event`]: bevy_ecs::event::Event
|
/// [`Event`]: bevy_ecs::event::Event
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub enum HierarchyEvent {
|
pub enum HierarchyEvent {
|
||||||
/// Fired whenever an [`Entity`] is added as a child to a new parent.
|
/// Fired whenever an [`Entity`] is added as a child to a parent.
|
||||||
ChildAdded {
|
ChildAdded {
|
||||||
/// The child that added
|
/// The child that was added
|
||||||
child: Entity,
|
child: Entity,
|
||||||
/// The parent the child was added to
|
/// The parent the child was added to
|
||||||
parent: Entity,
|
parent: Entity,
|
||||||
},
|
},
|
||||||
/// Fired whenever an child [`Entity`] is removed from is parent.
|
/// Fired whenever a child [`Entity`] is removed from its parent.
|
||||||
ChildRemoved {
|
ChildRemoved {
|
||||||
/// The child that removed
|
/// The child that was removed
|
||||||
child: Entity,
|
child: Entity,
|
||||||
/// The parent the child was removed from
|
/// The parent the child was removed from
|
||||||
parent: Entity,
|
parent: Entity,
|
||||||
},
|
},
|
||||||
/// Fired whenever an child [`Entity`] is moved to a new parent.
|
/// Fired whenever a child [`Entity`] is moved to a new parent.
|
||||||
ChildMoved {
|
ChildMoved {
|
||||||
/// The child that moved
|
/// The child that was moved
|
||||||
child: Entity,
|
child: Entity,
|
||||||
/// The parent the child was removed from
|
/// The parent the child was removed from
|
||||||
previous_parent: Entity,
|
previous_parent: Entity,
|
||||||
|
@ -58,8 +58,8 @@ impl Stopwatch {
|
|||||||
///
|
///
|
||||||
/// # See Also
|
/// # See Also
|
||||||
///
|
///
|
||||||
/// [`elapsed_secs`](Stopwatch::elapsed_secs) - if a `f32` value is desirable instead.
|
/// [`elapsed_secs`](Stopwatch::elapsed_secs) - if an `f32` value is desirable instead.
|
||||||
/// [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if a `f64` is desirable instead.
|
/// [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if an `f64` is desirable instead.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn elapsed(&self) -> Duration {
|
pub fn elapsed(&self) -> Duration {
|
||||||
self.elapsed
|
self.elapsed
|
||||||
@ -80,7 +80,7 @@ impl Stopwatch {
|
|||||||
/// # See Also
|
/// # See Also
|
||||||
///
|
///
|
||||||
/// [`elapsed`](Stopwatch::elapsed) - if a `Duration` is desirable instead.
|
/// [`elapsed`](Stopwatch::elapsed) - if a `Duration` is desirable instead.
|
||||||
/// [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if a `f64` is desirable instead.
|
/// [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if an `f64` is desirable instead.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn elapsed_secs(&self) -> f32 {
|
pub fn elapsed_secs(&self) -> f32 {
|
||||||
self.elapsed().as_secs_f32()
|
self.elapsed().as_secs_f32()
|
||||||
@ -92,7 +92,7 @@ impl Stopwatch {
|
|||||||
/// # See Also
|
/// # See Also
|
||||||
///
|
///
|
||||||
/// [`elapsed`](Stopwatch::elapsed) - if a `Duration` is desirable instead.
|
/// [`elapsed`](Stopwatch::elapsed) - if a `Duration` is desirable instead.
|
||||||
/// [`elapsed_secs`](Stopwatch::elapsed_secs) - if a `f32` is desirable instead.
|
/// [`elapsed_secs`](Stopwatch::elapsed_secs) - if an `f32` is desirable instead.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn elapsed_secs_f64(&self) -> f64 {
|
pub fn elapsed_secs_f64(&self) -> f64 {
|
||||||
self.elapsed().as_secs_f64()
|
self.elapsed().as_secs_f64()
|
||||||
|
@ -98,7 +98,7 @@ impl Timer {
|
|||||||
self.stopwatch.elapsed()
|
self.stopwatch.elapsed()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the time elapsed on the timer as a `f32`.
|
/// Returns the time elapsed on the timer as an `f32`.
|
||||||
/// See also [`Timer::elapsed`](Timer::elapsed).
|
/// See also [`Timer::elapsed`](Timer::elapsed).
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn elapsed_secs(&self) -> f32 {
|
pub fn elapsed_secs(&self) -> f32 {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Runtime Flame Graph: `tracing` spans
|
## Runtime Flame Graph: `tracing` spans
|
||||||
|
|
||||||
Bevy has built-in [tracing](https://github.com/tokio-rs/tracing) spans to make it cheap and easy to profile Bevy ECS systems, render logic, engine iternals, and user app code. Enable the `trace` cargo feature to enable Bevy's built-in spans.
|
Bevy has built-in [tracing](https://github.com/tokio-rs/tracing) spans to make it cheap and easy to profile Bevy ECS systems, render logic, engine internals, and user app code. Enable the `trace` cargo feature to enable Bevy's built-in spans.
|
||||||
|
|
||||||
If you also want to include `wgpu` tracing spans when profiling, they are emitted at the `tracing` `info` level so you will need to make sure they are not filtered out by the `LogSettings` resource's `filter` member which defaults to `wgpu=error`. You can do this by setting the `RUST_LOG=info` environment variable when running your application.
|
If you also want to include `wgpu` tracing spans when profiling, they are emitted at the `tracing` `info` level so you will need to make sure they are not filtered out by the `LogSettings` resource's `filter` member which defaults to `wgpu=error`. You can do this by setting the `RUST_LOG=info` environment variable when running your application.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user