Skip to content

Commit

Permalink
Final clean-ups before release (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
djeedai authored Jul 9, 2024
1 parent 4874c48 commit 358e76c
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ commands

## Examples

See the [`examples/`](https://github.com/djeedai/bevy_hanabi/tree/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples) folder.
See the [`examples/`](https://github.com/djeedai/bevy_hanabi/tree/4874c48f2d92c9a8a1f980bf808add9378c74402/examples) folder.

Note for Linux users: The examples build with the `bevy/x11` feature by default to enable support for the X11 display server. If you want to use the Wayland display server instead, add the `bevy/wayland` feature.

Expand All @@ -136,7 +136,7 @@ Combine the `SetPositionSphereModifier` for spawning and `LinearDragModifier` to
cargo run --example firework --features="bevy/bevy_winit bevy/bevy_pbr bevy/png 3d"
```

![firework](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/firework.gif)
![firework](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/firework.gif)

### Portal

Expand All @@ -146,7 +146,7 @@ Combine the `SetVelocityTangentModifier` for tangential rotation of particles ar
cargo run --example portal --features="bevy/bevy_winit bevy/bevy_pbr bevy/png 3d"
```

![portal](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/portal.gif)
![portal](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/portal.gif)

### Expressions

Expand All @@ -156,7 +156,7 @@ Demonstrate the use of the Expression API to build a visual effect simulated and
cargo run --example expr --features="bevy/bevy_winit bevy/bevy_pbr 3d"
```

![expr](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/expr.gif)
![expr](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/expr.gif)

### Gradient

Expand All @@ -166,7 +166,7 @@ Animate an emitter by moving its `Transform` component, and emit textured quad p
cargo run --example gradient --features="bevy/bevy_winit bevy/bevy_pbr bevy/png 3d"
```

![gradient](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/gradient.gif)
![gradient](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/gradient.gif)

### Force Field

Expand All @@ -176,7 +176,7 @@ This example demonstrates the force field modifier `ForceFieldModifier`, which a
cargo run --example force_field --features="bevy/bevy_winit bevy/bevy_pbr 3d"
```

![force_field](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/force_field.gif)
![force_field](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/force_field.gif)

### 2D

Expand All @@ -188,7 +188,7 @@ The white square mesh is moving forward and backward along the camera depth. The
cargo run --example 2d --features="bevy/bevy_winit bevy/bevy_sprite 2d"
```

![2d](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/2d.gif)
![2d](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/2d.gif)

### Multi-camera

Expand All @@ -198,7 +198,7 @@ The example demonstrates the use of multiple cameras and render layers to select
cargo run --example multicam --features="bevy/bevy_winit bevy/bevy_pbr 3d"
```

![multicam](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/multicam.gif)
![multicam](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/multicam.gif)

### Activate

Expand All @@ -208,7 +208,7 @@ This example demonstrates manual activation and deactivation of a `Spawner`, fro
cargo run --example activate --features="bevy/bevy_winit bevy/bevy_pbr 3d"
```

![activate](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/activate.gif)
![activate](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/activate.gif)

### Spawn

Expand All @@ -224,7 +224,7 @@ It also shows the applying of constant acceleration to all particles. The right
cargo run --example spawn --features="bevy/bevy_winit bevy/bevy_pbr 3d"
```

![spawn](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/spawn.gif)
![spawn](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/spawn.gif)

### Spawn on command

Expand All @@ -234,7 +234,7 @@ This example demonstrates how to emit a burst of particles when an event occurs.
cargo run --example spawn_on_command --features="bevy/bevy_winit bevy/bevy_pbr 3d"
```

![spawn_on_command](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/spawn_on_command.gif)
![spawn_on_command](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/spawn_on_command.gif)

### Circle

Expand All @@ -246,7 +246,7 @@ The example also uses the `FlipbookModifier` to animate the particles with a spr
cargo run --example circle --features="bevy/bevy_winit bevy/bevy_pbr bevy/png 3d"
```

![circle](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/circle.gif)
![circle](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/circle.gif)

### Visibility

Expand All @@ -259,7 +259,7 @@ This example demonstrates the difference between the default `SimulationConditio
cargo run --example visibility --features="bevy/bevy_winit bevy/bevy_pbr 3d"
```

![circle](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/visibility.gif)
![circle](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/visibility.gif)

### Random

Expand All @@ -269,7 +269,7 @@ This example spawns particles with randomized parameters.
cargo run --example random --features="bevy/bevy_winit bevy/bevy_pbr 3d"
```

![random](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/random.gif)
![random](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/random.gif)

### Lifetime

Expand All @@ -283,7 +283,7 @@ This example demonstrates particle effects with different lifetimes. Each effect
cargo run --example lifetime --features="bevy/bevy_winit bevy/bevy_pbr 3d"
```

![lifetime](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/lifetime.gif)
![lifetime](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/lifetime.gif)

### Billboard

Expand All @@ -293,11 +293,11 @@ This example demonstrates particles with the billboard render modifier, making t
cargo run --example billboard --features="bevy/bevy_winit bevy/bevy_pbr bevy/png 3d"
```

![billboard](https://raw.githubusercontent.com/djeedai/bevy_hanabi/cabb3cb03f1934ca8230adc129aa9e939a11d102/examples/billboard.gif)
![billboard](https://raw.githubusercontent.com/djeedai/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/examples/billboard.gif)

## Feature List

This list contains the major fixed features provided by 🎆 Hanabi. Beyond that, with the power of the [Expressions API](https://docs.rs/bevy_hanabi/latest/bevy_hanabi/graph/expr/index.html), visual effect authors can further customize their effects by assigning individual particle attributes (position, color, _etc._).
This list contains the major fixed features provided by 🎆 Hanabi. Beyond that, with the power of the [Expressions API](https://docs.rs/bevy_hanabi/4874c48f2d92c9a8a1f980bf808add9378c74402/bevy_hanabi/graph/expr/index.html), visual effect authors can further customize their effects by assigning individual particle attributes (position, color, _etc._).

- Spawn
- [x] Constant rate
Expand Down
18 changes: 11 additions & 7 deletions src/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ pub enum AlphaMode {
/// Similar to [`AlphaMode::Blend`], however assumes RGB channel values are
/// [premultiplied](https://en.wikipedia.org/wiki/Alpha_compositing#Straight_versus_premultiplied).
///
/// For otherwise constant RGB values, behaves more like [`AlphaMode::Blend`] for
/// alpha values closer to 1.0, and more like [`AlphaMode::Add`] for
/// alpha values closer to 0.0.
/// For otherwise constant RGB values, behaves more like
/// [`AlphaMode::Blend`] for alpha values closer to 1.0, and more like
/// [`AlphaMode::Add`] for alpha values closer to 0.0.
///
/// Can be used to avoid “border” or “outline” artifacts that can occur
/// when using plain alpha-blended textures.
Expand All @@ -142,17 +142,21 @@ pub enum AlphaMode {
/// Combines the color of the fragments with the colors behind them in an
/// additive process, (i.e. like light) producing lighter results.
///
/// Black produces no effect. Alpha values can be used to modulate the result.
/// Black produces no effect. Alpha values can be used to modulate the
/// result.
///
/// Useful for effects like holograms, ghosts, lasers and other energy beams.
/// Useful for effects like holograms, ghosts, lasers and other energy
/// beams.
Add,

/// Combines the color of the fragments with the colors behind them in a
/// multiplicative process, (i.e. like pigments) producing darker results.
///
/// White produces no effect. Alpha values can be used to modulate the result.
/// White produces no effect. Alpha values can be used to modulate the
/// result.
///
/// Useful for effects like stained glass, window tint film and some colored liquids.
/// Useful for effects like stained glass, window tint film and some colored
/// liquids.
Multiply,

/// Render the effect with alpha masking.
Expand Down
6 changes: 2 additions & 4 deletions src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -909,11 +909,9 @@ impl Attribute {
/// encoded as `0xAABBGGRR`, with a single byte per component, where the
/// alpha value is stored in the most significant byte and the red value in
/// the least significant byte. Note that this representation is the
/// same as the one returned by [`Color::as_rgba_u32()`] and
/// [`Color::as_linear_rgba_u32()`].
/// same as the one returned by [`LinearRgba::as_u32()`].
///
/// [`Color::as_rgba_u32()`]: bevy::render::color::Color::as_rgba_u32
/// [`Color::as_linear_rgba_u32()`]: bevy::render::color::Color::as_linear_rgba_u32
/// [`LinearRgba::as_u32()`]: bevy::color::LinearRgba::as_u32
pub const COLOR: Attribute = Attribute(AttributeInner::COLOR);

/// The particle's base color (HDR).
Expand Down
10 changes: 4 additions & 6 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ pub enum EffectSystems {
/// properties in the [`EffectAsset`], updating the associated
/// [`EffectProperties`] component.
///
/// This system runs during Bevy's own [`UpdateAssets`] schedule, after the
/// assets have been updated. Any system which modifies an
/// [`EffectAsset`]'s declared properties should run before [`UpdateAssets`]
/// in order for changes to be taken into account in the same frame.
///
/// [`UpdateAssets`]: bevy::asset::UpdateAssets
/// This system runs during the [`PostUpdate`] schedule, after the assets
/// have been updated. Any system which modifies an [`EffectAsset`]'s
/// declared properties should run before this set in order for changes to
/// be taken into account in the same frame.
UpdatePropertiesFromAsset,

/// Gather all removed [`ParticleEffect`] components during the
Expand Down
2 changes: 1 addition & 1 deletion src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2902,7 +2902,7 @@ pub(crate) fn queue_effects(
// .rangefinder3d()
// .distance_translation(&batch.translation_3d),
// batch_range: 0..1,
//extra_index: PhaseItemExtraIndex::NONE,
// extra_index: PhaseItemExtraIndex::NONE,
},
#[cfg(feature = "2d")]
PipelineMode::Camera3d,
Expand Down

0 comments on commit 358e76c

Please sign in to comment.