Skip to content

Commit

Permalink
rework dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
salam99823 committed Oct 21, 2024
1 parent 91f4b86 commit e7ab40a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
20 changes: 14 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,29 @@ cast_precision_loss = { level = "allow", priority = 1 }
pedantic = { level = "warn", priority = 0 }

[features]
default = []
bevy = ["dep:bevy"]
default = ["glam-latest"]
glam-latest = ["dep:glam"]
bevy = ["dep:bevy_math", "dep:bevy_render"]

[dependencies]
glam = "0.29.0"
hashbrown = "0.15"
image = "0.25"
mashmap = "0.2.1"
mashmap = "0.2"
ordered-float = "4.2"
thiserror = "1.0"

[dependencies.bevy]
[dependencies.glam]
version = "0.29"
optional = true

[dependencies.bevy_math]
version = "0.14"
default-features = false
optional = true

[dependencies.bevy_render]
version = "0.14"
default-features = false
features = ["bevy_render"]
optional = true

[dev-dependencies]
Expand Down
12 changes: 5 additions & 7 deletions examples/bevy-image.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use bevy::{
use bevy_render::{
prelude::Image,
render::{
render_asset::RenderAssetUsages,
texture::{CompressedImageFormats, ImageSampler, ImageType},
},
render_asset::RenderAssetUsages,
texture::{CompressedImageFormats, ImageSampler, ImageType},
};
use edges::Edges;
use raqote::{DrawOptions, DrawTarget, PathBuilder, SolidSource, Source, StrokeStyle};
Expand Down Expand Up @@ -34,8 +32,8 @@ fn main() {
)
.unwrap();

draw_png(boulders, "boulders.png");
draw_png(more_lines, "more-lines.png");
draw_png(boulders, "boulders");
draw_png(more_lines, "more-lines");
}

fn draw_png(image: Image, img_path: &str) {
Expand Down

0 comments on commit e7ab40a

Please sign in to comment.