From 50850070bf8fe5fec6543f40d9b217febcf18824 Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Sat, 10 Apr 2021 21:03:08 -0700 Subject: [PATCH] Add "Swimming Pool" to exhibits. --- all-is-cubes/src/content/exhibits.rs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/all-is-cubes/src/content/exhibits.rs b/all-is-cubes/src/content/exhibits.rs index 3b03ac933..f59eae93d 100644 --- a/all-is-cubes/src/content/exhibits.rs +++ b/all-is-cubes/src/content/exhibits.rs @@ -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 = [ @@ -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) + }, + } + }, ];