Skip to content

Commit

Permalink
Update non-bevy deps
Browse files Browse the repository at this point in the history
  • Loading branch information
naomijub committed Dec 8, 2024
1 parent 4374bdf commit 8e82b8a
Show file tree
Hide file tree
Showing 10 changed files with 965 additions and 861 deletions.
1,782 changes: 943 additions & 839 deletions Cargo.lock

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[package]
name = "vx_bevy"
version = "0.2.0"
version = "0.2.1"
authors = ["Lucas A. <[email protected]>"]
edition = "2021"
resolver = "2"
Expand All @@ -13,16 +13,16 @@ bevy = "0.14"
ndshape = "0.3.0"
block-mesh = "0.2.0"
ndcopy = "0.3.0"
thread_local = "1.1.7"
bevy_egui = "0.28"
thread_local = "1.1.8"
bevy_egui = "0.30"
float-ord = "0.3.2"
futures-lite = "1.12.0"
once_cell = "1.17.1"
futures-lite = "2.5.0"
once_cell = "1.20.2"
bevy_atmosphere = "0.10"
bitflags = "2.0.2"
ilattice = { version = "0.3.0", features = ["glam", "morton-encoding"] }
ilattice = { version = "0.4.0", features = ["glam", "morton-encoding"] }
noise = "0.8.2"
itertools = "0.11.0"
itertools = "0.13.0"


[profile.dev]
Expand Down
2 changes: 1 addition & 1 deletion src/debug/debug_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fn display_material_editor(
mat_index as u8,
mat.name,
);
})
});
});

ui.heading("Material properties");
Expand Down
4 changes: 2 additions & 2 deletions src/voxel/material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ impl VoxelMaterialRegistry {
impl Default for VoxelMaterialRegistry {
fn default() -> Self {
let mut registry = Self {
materials: Default::default(),
mat_ids: Default::default(),
materials: Vec::default(),
mat_ids: HashMap::default(),
};

registry.register_material::<Void>(MaterialRegistryInfo {
Expand Down
2 changes: 1 addition & 1 deletion src/voxel/render/mesh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub fn mesh_buffer<T, S>(
.zip(RIGHT_HANDED_Y_UP_CONFIG.faces.iter())
.enumerate()
{
for quad in group.iter() {
for quad in group {
indices.extend_from_slice(&face.quad_mesh_indices(positions.len() as u32));
positions.extend_from_slice(&face.quad_mesh_positions(quad, scale));
data.extend_from_slice(
Expand Down
2 changes: 1 addition & 1 deletion src/voxel/storage/chunk_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ where
{
pub fn new(chunk_shape: S) -> Self {
Self {
chunks: Default::default(),
chunks: BTreeMap::default(),
shape_mask: !(IVec3::from(chunk_shape.as_array().map(|x| x as i32)) - IVec3::ONE),
shape: chunk_shape,
}
Expand Down
2 changes: 1 addition & 1 deletion src/voxel/terraingen/biomes/layered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl<T: LayeredBiomeTerrainGenerator> BiomeTerrainGenerator for T {
let remaining_height = local_height.checked_sub(h);

if let Some(uh) = remaining_height {
*buffer.voxel_at_mut([pos.x, uh, pos.y].into()) = self.fill_strata(h)
*buffer.voxel_at_mut([pos.x, uh, pos.y].into()) = self.fill_strata(h);
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions src/voxel/terraingen/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub fn terrain_generate_world_bottom_border(buffer: &mut VoxelBuffer<Voxel, Chun
buffer.fill_extent(
Extent::from_min_and_shape(UVec3::ZERO, UVec3::new(CHUNK_LENGTH, 2, CHUNK_LENGTH)),
Bedrock::into_voxel(),
)
);
}

/// Carve the general terrain shape for a chunk.
Expand Down Expand Up @@ -73,13 +73,13 @@ pub fn make_pine_tree<T: VoxelMaterial, L: VoxelMaterial>(
})
.for_each(|(trunk_distance, leaves_distance, position)| {
if trunk_distance {
*buffer.voxel_at_mut(position) = T::into_voxel()
*buffer.voxel_at_mut(position) = T::into_voxel();
}

if leaves_distance {
*buffer.voxel_at_mut(position) = L::into_voxel()
*buffer.voxel_at_mut(position) = L::into_voxel();
}
})
});
}

/// Make a tree using SDF functions
Expand All @@ -106,11 +106,11 @@ pub fn make_tree<T: VoxelMaterial, L: VoxelMaterial>(
})
.for_each(|(trunk_distance, leaves_distance, position)| {
if trunk_distance {
*buffer.voxel_at_mut(position) = T::into_voxel()
*buffer.voxel_at_mut(position) = T::into_voxel();
}

if leaves_distance {
*buffer.voxel_at_mut(position) = L::into_voxel()
*buffer.voxel_at_mut(position) = L::into_voxel();
}
});
}
Expand All @@ -133,7 +133,7 @@ pub fn make_rock<V: VoxelMaterial>(
})
.for_each(|(rock, position)| {
if rock {
*buffer.voxel_at_mut(position) = V::into_voxel()
*buffer.voxel_at_mut(position) = V::into_voxel();
}
});
}
2 changes: 1 addition & 1 deletion src/voxel/terraingen/noise.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use bevy::math::{IVec3, Vec2, Vec2Swizzles, Vec3, Vec3Swizzles};
use noise::{utils::NoiseMapBuilder, MultiFractal};

pub fn rand2to1(p: Vec2, dot: Vec2) -> f32 {
let sp: Vec2 = p.to_array().map(|x| x.sin()).into();
let sp: Vec2 = p.to_array().map(f32::sin).into();
let random = sp.dot(dot);
(random.sin() * 143_758.55).fract()
}
Expand Down
2 changes: 1 addition & 1 deletion src/voxel/world/sky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn update_light_position(
let player_translation = queries
.p1()
.get_single()
.map_or_else(|_| Default::default(), |ply| ply.translation);
.map_or_else(|_| Vec3::default(), |ply| ply.translation);

{
let mut binding = queries.p0();
Expand Down

0 comments on commit 8e82b8a

Please sign in to comment.