pub fn mesh_generator_system<Map: VoxelMap>(
    mut commands: Commands,
    pool: Res<ComputeTaskPool>,
    voxel_map: Res<Map>,
    local_mesh_buffers: ecs::system::Local<ThreadLocalMeshBuffers<Map>>,
    mesh_materials: Res<MeshMaterials>,
    mut mesh_commands: ResMut<MeshCommandQueue>,
    mut mesh_assets: ResMut<Assets<Mesh>>,
    mut chunk_meshes: ResMut<ChunkMeshes>,
) {
    let new_chunk_meshes = apply_mesh_commands(
        &*voxel_map,
        &*local_mesh_buffers,
        &*pool,
        &mut *mesh_commands,
        &mut *chunk_meshes,
        &mut commands,
    );
    spawn_mesh_entities(
        new_chunk_meshes,
        &*mesh_materials,
        &mut commands,
        &mut *mesh_assets,
        &mut *chunk_meshes,
    );
}
/// Generates new meshes for all dirty chunks.
Generates new meshes for all dirty chunks.
Generates new meshes for all dirty chunks .
pub fn mesh_generator_system<Map: VoxelMap>(
    mut commands: Commands,
    pool: Res<ComputeTaskPool>,
    voxel_map: Res<Map>,
    local_mesh_buffers: ecs::system::Local<ThreadLocalMeshBuffers<Map>>,
    mesh_materials: Res<MeshMaterials>,
    mut mesh_commands: ResMut<MeshCommandQueue>,
    mut mesh_assets: ResMut<Assets<Mesh>>,
    mut chunk_meshes: ResMut<ChunkMeshes>,
) {
    let new_chunk_meshes = apply_mesh_commands(
        &*voxel_map,
        &*local_mesh_buffers,
        &*pool,
        &mut *mesh_commands,
        &mut *chunk_meshes,
        &mut commands,
    );
    spawn_mesh_entities(
        new_chunk_meshes,
        &*mesh_materials,
        &mut commands,
        &mut *mesh_assets,
        &mut *chunk_meshes,
    );
}
pub fn mesh_generator_system < Map : VoxelMap > ( mut commands : Commands , pool : Res < ComputeTaskPool > , voxel_map : Res < Map > , local_mesh_buffers : ecs :: system :: Local < ThreadLocalMeshBuffers < Map > > , mesh_materials : Res < MeshMaterials > , mut mesh_commands : ResMut < MeshCommandQueue > , mut mesh_assets : ResMut < Assets < Mesh > > , mut chunk_meshes : ResMut < ChunkMeshes > , ) { let new_chunk_meshes = apply_mesh_commands ( & * voxel_map , & * local_mesh_buffers , & * pool , & mut * mesh_commands , & mut * chunk_meshes , & mut commands , ) ; spawn_mesh_entities ( new_chunk_meshes , & * mesh_materials , & mut commands , & mut * mesh_assets , & mut * chunk_meshes , ) ; }
Generates new meshes for all dirty chunks.
Generates new meshes for all dirty chunks .
commands
Commands
pool
Res<ComputeTaskPool>
voxel_map
Res<Map>
local_mesh_buffers
ecs::system::Local<ThreadLocalMeshBuffers<Map>>
mesh_materials
Res<MeshMaterials>
mesh_commands
ResMut<MeshCommandQueue>
mesh_assets
ResMut<Assets<Mesh>>
chunk_meshes
ResMut<ChunkMeshes>
commands
Commands
pool
Res<ComputeTaskPool>
voxel_map
Res<Map>
local_mesh_buffers
ecs::system::Local<ThreadLocalMeshBuffers<Map>>
mesh_materials
Res<MeshMaterials>
mesh_commands
ResMut<MeshCommandQueue>
mesh_assets
ResMut<Assets<Mesh>>
chunk_meshes
ResMut<ChunkMeshes>