-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v0.4 : feature-gate svg and lottie, move to linebender (#54)
- Loading branch information
Showing
62 changed files
with
1,846 additions
and
470 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "lottie" | ||
version.workspace = true | ||
license.workspace = true | ||
edition.workspace = true | ||
repository.workspace = true | ||
publish = false | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
[dependencies] | ||
bevy_vello = { path = "../../", features = ["lottie"] } | ||
bevy = { workspace = true } |
File renamed without changes.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use bevy::asset::{embedded_asset, AssetMetaCheck}; | ||
use bevy::prelude::*; | ||
use bevy_vello::{prelude::*, VelloPlugin}; | ||
|
||
fn main() { | ||
let mut app = App::new(); | ||
app.insert_resource(AssetMetaCheck::Never) | ||
.add_plugins(DefaultPlugins) | ||
.add_plugins(VelloPlugin) | ||
.add_systems(Startup, load_lottie); | ||
embedded_asset!(app, "assets/Tiger.json"); | ||
app.run(); | ||
} | ||
|
||
fn load_lottie(mut commands: Commands, asset_server: ResMut<AssetServer>) { | ||
commands.spawn(Camera2dBundle::default()); | ||
|
||
// Yes, it's this simple. | ||
commands.spawn(VelloAssetBundle { | ||
vector: asset_server.load("embedded://lottie/assets/Tiger.json"), | ||
debug_visualizations: DebugVisualizations::Visible, | ||
transform: Transform::from_scale(Vec3::splat(0.5)), | ||
..default() | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "svg" | ||
version.workspace = true | ||
license.workspace = true | ||
edition.workspace = true | ||
repository.workspace = true | ||
publish = false | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
[dependencies] | ||
bevy_vello = { path = "../../", features = ["svg"] } | ||
bevy = { workspace = true } |
Oops, something went wrong.