Skip to content

Commit

Permalink
Add "Swimming Pool" to exhibits.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpreid committed Apr 11, 2021
1 parent 4c8c68d commit 5085007
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion all-is-cubes/src/content/exhibits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ use crate::space::{Grid, Space};

pub(crate) static DEMO_CITY_EXHIBITS: &[Exhibit] = &[
Exhibit {
name: "Transparency WIP",
name: "Transparency",
factory: |_this, _universe| {
// TODO: Add some partial-block transparency once we're any good at implementing it
let mut space = Space::empty(Grid::new([-3, 0, -3], [7, 5, 7]));

let colors = [
Expand Down Expand Up @@ -200,4 +201,24 @@ pub(crate) static DEMO_CITY_EXHIBITS: &[Exhibit] = &[
},
}
},
{
Exhibit {
name: "Swimming Pool",
factory: |_this, _universe| {
let width = 6;
let depth = 6;
let water_area = Grid::new([0, -depth, 0], [width, depth, width]);
let mut space = Space::empty(water_area);
space.fill_uniform(
water_area,
Block::builder()
.display_name("Not entirely unlike water")
.color(Rgba::new(0.96, 0.96, 1.0, 0.1))
.collision(BlockCollision::None)
.build(),
)?;
Ok(space)
},
}
},
];

0 comments on commit 5085007

Please sign in to comment.