Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@ description = "A fast and ergonomic surface-mesh/halfedge-mesh implementation an
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
glam = "0.30.1" # Tracking bevys glam version for convencience
glam = "0.32" # Tracking bevys glam version for convencience
slotmap = "1.0.7"
itertools = "0.14.0"
thiserror = "2.0.9"
xatlas-rs-v2 = { version = "0.1.4", optional = true } # Optional dependency for UV unwrapping

# Adapter dependencies
bevy = { version = "0.17", default-features = false, features = [
bevy = { version = "0.19", default-features = false, features = [
"bevy_pbr",
"bevy_ui",
"bevy_gizmos",
"bevy_log",
], optional = true }

[dev-dependencies]
bevy = "0.17.2"
bevy_panorbit_camera = { version = "0.32.0", features = ["bevy_egui"] }
bevy-inspector-egui = "0.35.0"
bevy = "0.19"
bevy_panorbit_camera = "0.35"
bevy-inspector-egui = "0.37"
fastrand = "2.3.0"
fastrand-contrib = "0.1.0"

Expand Down
10 changes: 5 additions & 5 deletions examples/extrude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,17 @@ fn init_system(
Transform::from_translation(vec3(0.0, 5.0, 7.0)),
PanOrbitCamera::default(),
Msaa::Sample4,
AmbientLight {
color: Color::WHITE,
brightness: 300.0,
affects_lightmapped_meshes: true,
},
));
}

fn main() {
App::new()
.insert_resource(ClearColor(Color::BLACK))
.insert_resource(AmbientLight {
color: Color::WHITE,
brightness: 300.0,
affects_lightmapped_meshes: true,
})
.add_plugins((
DefaultPlugins,
PanOrbitCameraPlugin,
Expand Down
24 changes: 10 additions & 14 deletions examples/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::f32::consts::PI;

use bevy::{math::cubic_splines::LinearSpline, prelude::*};
use bevy_inspector_egui::{
bevy_egui::EguiPlugin,
inspector_options::ReflectInspectorOptions, quick::ResourceInspectorPlugin, InspectorOptions,
bevy_egui::EguiPlugin, inspector_options::ReflectInspectorOptions,
quick::ResourceInspectorPlugin, InspectorOptions,
};
use bevy_panorbit_camera::{PanOrbitCamera, PanOrbitCameraPlugin};
use fastrand_contrib::RngExt;
Expand Down Expand Up @@ -44,7 +44,7 @@ fn generate_tree(params: TreeParameters) -> SMeshResult<SMesh> {

let n_control_points = params.height.floor() as usize;
// let n_control_points = 3;
for i in (1..n_control_points) {
for i in 1..n_control_points {
control_points.push(vec3(
rng.f32_range(-0.5..0.5),
i as f32 / n_control_points as f32,
Expand Down Expand Up @@ -168,7 +168,7 @@ fn init_system(
commands.spawn((
DirectionalLight {
illuminance: light_consts::lux::OVERCAST_DAY * 2.0,
shadows_enabled: true,
shadow_maps_enabled: true,
..default()
},
Transform::from_rotation(Quat::from_euler(EulerRot::ZYX, 0.0, PI / 2., -PI / 4.)),
Expand All @@ -180,22 +180,18 @@ fn init_system(
Msaa::Sample4,
Transform::from_translation(Vec3::new(0.0, 5.0, 10.0)),
PanOrbitCamera::default(),
AmbientLight {
color: Color::WHITE,
brightness: 300.0,
affects_lightmapped_meshes: true,
},
));
}

fn main() {
App::new()
.insert_resource(ClearColor(Color::BLACK))
.insert_resource(AmbientLight {
color: Color::WHITE,
brightness: 300.0,
affects_lightmapped_meshes: true,
})
.add_plugins((
DefaultPlugins,
PanOrbitCameraPlugin,
SMeshDebugDrawPlugin,
))
.add_plugins((DefaultPlugins, PanOrbitCameraPlugin, SMeshDebugDrawPlugin))
.add_plugins(EguiPlugin::default())
.add_plugins(ResourceInspectorPlugin::<TreeParameters>::default())
.add_systems(Startup, init_system)
Expand Down
13 changes: 6 additions & 7 deletions examples/visualizer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use bevy::color::palettes::css::{BLACK, WHITE};
use bevy::color::palettes::css::BLACK;
use bevy::prelude::*;
use bevy_inspector_egui::bevy_egui::EguiPlugin;
use bevy_inspector_egui::quick::WorldInspectorPlugin;
use bevy_panorbit_camera::{PanOrbitCamera, PanOrbitCameraPlugin};

use itertools::Itertools;
Expand Down Expand Up @@ -39,17 +38,17 @@ fn init_system(mut commands: Commands) {
Msaa::Sample4,
Transform::from_translation(Vec3::new(0.0, 1.5, 17.0)),
PanOrbitCamera::default(),
AmbientLight {
color: Color::WHITE,
brightness: 300.0,
affects_lightmapped_meshes: true,
},
));
}

fn main() {
App::new()
.insert_resource(ClearColor(BLACK.into()))
.insert_resource(AmbientLight {
color: WHITE.into(),
brightness: 0.3,
affects_lightmapped_meshes: true,
})
.add_plugins((
DefaultPlugins,
PanOrbitCameraPlugin,
Expand Down