Skip to content

Commit 1aa7824

Browse files
committed
edit docs for SpatialBasicNode, fix typo
1 parent 87738f9 commit 1aa7824

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

crates/firewheel-nodes/src/fast_rms.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub struct FastRmsNode {
3131
pub enabled: bool,
3232
/// The size of the window used for measuring the RMS value.
3333
///
34-
/// Smaller values are better at detecting short bursts of loundess (transients),
34+
/// Smaller values are better at detecting short bursts of loudness (transients),
3535
/// while larger values are better for measuring loudness on a broader time scale.
3636
///
3737
/// By default this is set to `0.05` (50ms).

crates/firewheel-nodes/src/spatial_basic.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
//! A 3D spatial positioning node using a basic (and naive) algorithm. It does
2-
//! not make use of any fancy binaural algorithms, rather it just applies basic
3-
//! panning and filtering.
1+
//! A 3D spatial positioning node using a basic (and naive) algorithm. (It can also
2+
//! be used for 2D audio.) It does not make use of any fancy binaural algorithms,
3+
//! rather it just applies basic panning and filtering.
44
55
#[cfg(not(feature = "std"))]
66
use num_traits::Float;
@@ -27,8 +27,9 @@ use firewheel_core::{
2727
vector::Vec3,
2828
};
2929

30-
/// A 3D spatial positioning node using a basic but fast algorithm. It does not make use
31-
/// of any fancy binaural algorithms, rather it just applies basic panning and filtering.
30+
/// A 3D spatial positioning node using a basic but fast algorithm. (It can also be used
31+
/// for 2D audio). It does not make use of any fancy binaural algorithms, rather it just
32+
/// applies basic panning and filtering.
3233
#[derive(Diff, Patch, Debug, Clone, Copy, PartialEq)]
3334
#[cfg_attr(feature = "bevy", derive(bevy_ecs::prelude::Component))]
3435
#[cfg_attr(feature = "bevy_reflect", derive(bevy_reflect::Reflect))]
@@ -40,11 +41,13 @@ pub struct SpatialBasicNode {
4041
/// A 3D vector representing the offset between the listener and the
4142
/// sound source.
4243
///
43-
/// The coordinates are `(x, y, z)`.
44+
/// The coordinates are `(x, y, z)`. (This node can also be used for 2D audio by
45+
/// setting the z value to `0.0`.)
4446
///
45-
/// * `-x` is to the left of the listener, and `+x` is the the right of the listener
46-
/// * `-y` is below the listener, and `+y` is above the listener.
47-
/// * `-z` is in front of the listener, and `+z` is behind the listener
47+
/// * `-x` is to the left of the listener, and `+x` is to the right of the listener
48+
/// * Larger absolute `y` and `z` values will make the signal sound farther away.
49+
/// (The algorithm used by this node makes no distinction between `-y`, `+y`, `-z`,
50+
/// and `+z`).
4851
///
4952
/// By default this is set to `(0.0, 0.0, 0.0)`
5053
pub offset: Vec3,

0 commit comments

Comments
 (0)