Skip to content

Commit

Permalink
Merge branch 'main' of github.com:AtomCAD/atomCAD into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlansneff committed Oct 4, 2020
2 parents 1b12f53 + 1a91b80 commit bb603fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 44 deletions.
6 changes: 3 additions & 3 deletions crates/periodic-table/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ impl PeriodicTable {
radius: 1.5, // van der waals relative to hydrogen
};

for repr in &mut element_reprs {
repr.radius *= 0.85;
}
// for repr in &mut element_reprs {
// repr.radius *= 0.85;
// }

Self { element_reprs }
}
Expand Down
42 changes: 1 addition & 41 deletions crates/render/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ impl Renderer {
)
.await
.expect("failed to create device");
let device = device;

let bgl = BindGroupLayouts::create(&device);

Expand Down Expand Up @@ -290,6 +289,7 @@ impl Renderer {
self.render_all_fragments(world, &frame.output.view, &mut encoder);

if interactions.selected_fragments.len() != 0 {
log::warn!("trying to render to stencil");
// currently broken
self.render_fragments_to_stencil(
world,
Expand Down Expand Up @@ -401,46 +401,6 @@ impl Renderer {
}
}

/// TODO: Re-upload any transforms that have changed
// fn update_transforms(&mut self, encoder: &mut wgpu::CommandEncoder, world: &mut World) {
// if world.added_fragments.len() + world.added_parts.len() == 0
// && world.modified_fragments.len() + world.modified_parts.len() == 0
// {
// // no work to be done
// return;
// }

// let mut dedup_fragments: HashSet<FragmentId> = HashSet::from_iter(world.modified_fragments.drain(..));

// for part_id in world.modified_parts.drain(..) {
// dedup_fragments.extend(world.parts[&part_id].fragments());
// }

// // tune this number
// if dedup_fragments.len() <= 1 {

// } else {

// }

// // let transform_count: usize = parts
// // .iter()
// // .map(|part| part.fragments().len() * mem::size_of::<Mat4>())
// // .sum();

// // self.atom_transform_buffer.write_to_buffer(
// // &self.device,
// // encoder,
// // transform_count as u64,
// // |buffer| {
// // for part in parts.iter() {
// // let part_transform = todo!();
// // let fragment_transform = todo!();
// // }
// // },
// // );
// }

fn render_all_fragments(
&self,
world: &World,
Expand Down

0 comments on commit bb603fd

Please sign in to comment.