Remove dynamic neighbor caching (more work is needed to adjust walls generated for keeping distance to the walls when opening and closing doors)

This partially reverts commit db7dd1c1c9.
This commit is contained in:
Manuel Vögele
2022-02-14 17:08:42 +01:00
parent e2afe05e4e
commit c11899fb17
2 changed files with 36 additions and 124 deletions
+1 -8
View File
@@ -24,9 +24,6 @@ extern "C" {
pub type JsWall;
pub type JsWallData;
#[wasm_bindgen(method, getter)]
fn id(this: &JsWall) -> String;
#[wasm_bindgen(method, getter)]
fn data(this: &JsWall) -> JsWallData;
@@ -100,9 +97,8 @@ impl TryFrom<usize> for DoorType {
}
}
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Copy)]
pub struct Wall {
pub id: String,
pub p1: Point,
pub p2: Point,
pub door_type: DoorType,
@@ -111,14 +107,12 @@ pub struct Wall {
impl Wall {
pub fn new(
id: String,
p1: Point,
p2: Point,
door_type: DoorType,
door_state: DoorState,
) -> Self {
Self {
id,
p1,
p2,
door_type,
@@ -141,7 +135,6 @@ impl Wall {
let mut c = data.c();
c.iter_mut().for_each(|val| *val = val.round());
Self::new(
wall.id(),
Point::new(c[0], c[1]),
Point::new(c[2], c[3]),
data.door_type(),