Skip to content

Commit

Permalink
feat: update bevy_vello package
Browse files Browse the repository at this point in the history
rename BevyMotionGfxPlugin -> MotionGfxPlugin
  • Loading branch information
nixon-voxell committed Sep 6, 2024
1 parent 2adb726 commit a82a4b0
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 21 deletions.
12 changes: 8 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/motiongfx_core/src/f32lerp/vello_f32lerp.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use bevy::prelude::*;
use bevy_vello_graphics::prelude::*;
use bevy_vello_graphics::bevy_vello::vello::{kurbo, peniko};

use super::F32Lerp;

Expand Down
4 changes: 2 additions & 2 deletions crates/motiongfx_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ pub mod prelude {
};
}

pub struct MotionGfxPlugin;
pub struct MotionGfxCorePlugin;

impl Plugin for MotionGfxPlugin {
impl Plugin for MotionGfxCorePlugin {
fn build(&self, app: &mut App) {
app.add_systems(
Update,
Expand Down
2 changes: 1 addition & 1 deletion crates/motiongfx_vello/src/motion/fill_motion.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use bevy::prelude::*;
use bevy_vello_graphics::prelude::*;
use bevy_vello_graphics::{bevy_vello::vello::peniko, prelude::*};
use motiongfx_core::prelude::*;

pub trait FillMotion<const N: usize> {
Expand Down
4 changes: 2 additions & 2 deletions examples/easings.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use bevy::{core_pipeline::bloom::BloomSettings, pbr::NotShadowCaster, prelude::*};
use bevy_motiongfx::{prelude::*, BevyMotionGfxPlugin};
use bevy_motiongfx::{prelude::*, MotionGfxPlugin};

fn main() {
App::new()
// Bevy plugins
.add_plugins(DefaultPlugins)
// Custom plugins
.add_plugins(BevyMotionGfxPlugin)
.add_plugins(MotionGfxPlugin)
.add_systems(Startup, (setup, easings))
.add_systems(Update, timeline_movement)
.run();
Expand Down
4 changes: 2 additions & 2 deletions examples/hello_world.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use bevy::{core_pipeline::tonemapping::Tonemapping, pbr::NotShadowCaster, prelude::*};
use bevy_motiongfx::{prelude::*, BevyMotionGfxPlugin};
use bevy_motiongfx::{prelude::*, MotionGfxPlugin};

fn main() {
App::new()
// Bevy plugins
.add_plugins(DefaultPlugins)
// Custom plugins
.add_plugins(BevyMotionGfxPlugin)
.add_plugins(MotionGfxPlugin)
.add_systems(Startup, (setup, hello_world))
.add_systems(Update, timeline_movement)
.run();
Expand Down
4 changes: 2 additions & 2 deletions examples/slide_basic.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use bevy::{core_pipeline::bloom::BloomSettings, pbr::NotShadowCaster, prelude::*};
use bevy_motiongfx::{prelude::*, BevyMotionGfxPlugin};
use bevy_motiongfx::{prelude::*, MotionGfxPlugin};

fn main() {
App::new()
// Bevy plugins
.add_plugins(DefaultPlugins)
// Custom plugins
.add_plugins(BevyMotionGfxPlugin)
.add_plugins(MotionGfxPlugin)
.add_systems(Startup, (setup, slide_basic))
.add_systems(Update, slide_movement)
.run();
Expand Down
8 changes: 4 additions & 4 deletions examples/vello_basic.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use bevy::{math::DVec2, prelude::*};
use bevy_motiongfx::{prelude::*, BevyMotionGfxPlugin};
use bevy_motiongfx::motiongfx_vello::bevy_vello_graphics::bevy_vello::{prelude::*, VelloPlugin};
use bevy_motiongfx::{prelude::*, MotionGfxPlugin};

fn main() {
App::new()
// Bevy plugins
.add_plugins(DefaultPlugins)
.add_plugins((DefaultPlugins, VelloPlugin::default()))
// Custom plugins
.add_plugins(BevyMotionGfxPlugin)
.add_plugins(MotionGfxPlugin)
.add_systems(Startup, (setup, vello_basic))
.add_systems(Update, timeline_movement)
.run();
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ pub mod prelude {
pub use motiongfx_vello::prelude::*;
}

pub struct BevyMotionGfxPlugin;
pub struct MotionGfxPlugin;

impl Plugin for BevyMotionGfxPlugin {
impl Plugin for MotionGfxPlugin {
fn build(&self, app: &mut App) {
app.add_plugins(motiongfx_core::MotionGfxPlugin);
app.add_plugins(motiongfx_core::MotionGfxCorePlugin);
#[cfg(feature = "common")]
app.add_plugins(motiongfx_common::MotionGfxCommonPlugin);
#[cfg(feature = "vello_graphics")]
Expand Down

0 comments on commit a82a4b0

Please sign in to comment.