Skip to content

Commit

Permalink
Fix a few doclinks (djeedai#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
djeedai authored May 28, 2024
1 parent 11de897 commit fa23246
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 28 deletions.
2 changes: 2 additions & 0 deletions src/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ impl EffectAsset {
/// Panics if the modifier doesn't support the context specified (that is,
/// `modifier.context()` returns a flag which doesn't include `context`).
///
/// [`BoxedModifier`]: crate::BoxedModifier
/// [`add_render_modifier()`]: crate::EffectAsset::add_render_modifier
pub fn add_modifier(self, context: ModifierContext, modifier: Box<dyn Modifier>) -> Self {
self.add_modifier_to_groups(context, modifier, ParticleGroupSet::all())
Expand All @@ -441,6 +442,7 @@ impl EffectAsset {
/// Panics if the modifier doesn't support the context specified (that is,
/// `modifier.context()` returns a flag which doesn't include `context`).
///
/// [`BoxedModifier`]: crate::BoxedModifier
/// [`add_render_modifier()`]: crate::EffectAsset::add_render_modifier
pub fn add_modifier_to_groups(
mut self,
Expand Down
8 changes: 2 additions & 6 deletions src/graph/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,8 @@ pub enum ExprError {
/// Error resolving a property.
///
/// An unknown property was not defined in the evaluation context, which
/// usually means that the property was not defined
/// with [`EffectAsset::with_property()`] or
/// [`EffectAsset::add_property()`].
///
/// [`EffectAsset::with_property()`]: crate::EffectAsset::with_property
/// [`EffectAsset::add_property()`]: crate::EffectAsset::add_property
/// usually means that the property was not defined with
/// [`Module::add_property()`].
#[error("Property error: {0:?}")]
PropertyError(String),

Expand Down
15 changes: 3 additions & 12 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1891,10 +1891,7 @@ else { return c1; }
// Spawn particle effect
let entity = world
.spawn((
ParticleEffect {
handle: handle.clone(),
..default()
},
ParticleEffect::new(handle.clone()),
CompiledParticleEffect::default(),
))
.id();
Expand Down Expand Up @@ -1998,20 +1995,14 @@ else { return c1; }
.spawn((
visibility,
InheritedVisibility::default(),
ParticleEffect {
handle: handle.clone(),
..default()
},
ParticleEffect::new(handle.clone()),
CompiledParticleEffect::default(),
))
.id()
} else {
world
.spawn((
ParticleEffect {
handle: handle.clone(),
..default()
},
ParticleEffect::new(handle.clone()),
CompiledParticleEffect::default(),
))
.id()
Expand Down
8 changes: 2 additions & 6 deletions src/modifier/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
//!
//! - **Init modifiers** influence the initializing of particles when they
//! spawn. They typically configure the initial position and/or velocity of
//! particles. Init modifiers implement the [`InitModifier`] trait.
//! particles. Init modifiers implement the [`Modifier`] trait.
//! - **Update modifiers** influence the particle update loop each frame. For
//! example, an update modifier can apply a gravity force to all particles.
//! Update modifiers implement the [`UpdateModifier`] trait.
//! Update modifiers implement the [`Modifier`] trait.
//! - **Render modifiers** influence the rendering of each particle. They can
//! change the particle's color, or orient it to face the camera. Render
//! modifiers implement the [`RenderModifier`] trait.
Expand All @@ -19,10 +19,6 @@
//! [`SetAttributeModifier`] can be used either to initialize a particle's
//! attribute on spawning, or to assign a value to that attribute each frame
//! during simulation (update).
//!
//! [`InitModifier`]: crate::modifier::InitModifier
//! [`UpdateModifier`]: crate::modifier::UpdateModifier
//! [`RenderModifier`]: crate::modifier::RenderModifier
use bevy::{
asset::Handle,
Expand Down
2 changes: 2 additions & 0 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ pub enum EffectSystems {
///
/// This system runs during the [`PostUpdate`] schedule. This is largely an
/// internal task which can be ignored by most users.
///
/// [`CompiledParticleEffect`]: crate::CompiledParticleEffect
CompileEffects,

/// Update the properties of the effect instance based on the declared
Expand Down
8 changes: 4 additions & 4 deletions src/properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
//! ```
//!
//! [`Module`]: crate::Module
//! [`Module::add_property()`]: crate::Module::add_property
//! [`EffectAsset`]: crate::EffectAsset
//! [`add_property()`]: crate::Module::add_property
//! [`ParticleEffect`]: crate::ParticleEffect
Expand Down Expand Up @@ -118,12 +119,10 @@ impl Property {
/// Create a new property.
///
/// In general properties are created internally by the [`EffectAsset`]
/// they're defined on, when calling [`EffectAsset::with_property()`] or
/// [`EffectAsset::add_property()`].
/// they're defined on, when calling [`Module::add_property()`].
///
/// [`EffectAsset`]: crate::EffectAsset
/// [`EffectAsset::with_property()`]: crate::EffectAsset::with_property
/// [`EffectAsset::add_property()`]: crate::EffectAsset::add_property
/// [`Module::add_property()`]: crate::Module::add_property
#[inline]
pub fn new(name: impl Into<String>, default_value: impl Into<Value>) -> Self {
Self {
Expand Down Expand Up @@ -291,6 +290,7 @@ impl EffectProperties {
/// Note that this behavior is not symmetric with [`set()`], which allows
/// setting any property even if not declared.
///
/// [`Module`]: crate::Module
/// [`EffectAsset`]: crate::asset::EffectAsset
/// [`EffectSystems::UpdatePropertiesFromAsset`]: crate::EffectSystems::UpdatePropertiesFromAsset
/// [`get_stored()`]: crate::EffectProperties::get_stored
Expand Down

0 comments on commit fa23246

Please sign in to comment.