Skip to content

Commit 08f4d9b

Browse files
committed
Use brs 0.2.0
1 parent ae3e6b9 commit 08f4d9b

File tree

3 files changed

+63
-65
lines changed

3 files changed

+63
-65
lines changed

Cargo.lock

Lines changed: 58 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ crate-type = ["cdylib", "rlib"]
1111
default = ["console_error_panic_hook", "chrono/wasmbind"]
1212

1313
[dependencies]
14-
brs = "0.1"
14+
brs = "0.2.0"
1515
image = { version = "0.23.0", default-features = false, features = ["gif", "jpeg", "ico", "png", "pnm", "tga", "tiff", "webp", "bmp", "hdr", "dxt", "dds"] }
1616
wasm-bindgen-futures = "0.4.12"
1717
js-sys = "0.3.39"
@@ -33,4 +33,4 @@ features = [
3333
"File",
3434
"FileReader",
3535
"FilePropertyBag"
36-
]
36+
]

src/convert.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ fn pixel_to_brick(x: u32, y: u32, size: (u32, u32, u32), vertical: bool, px: Rgb
110110
visibility: true,
111111
material_index: 0,
112112
color: color_mode,
113-
owner_index: 0
113+
owner_index: None,
114114
};
115115

116116
return brick;
@@ -122,13 +122,6 @@ fn write_brs<T: Write>(mut writer: &mut T, bricks: Vec<Brick>, asset_name_index:
122122
name: String::from("PUBLIC")
123123
};
124124

125-
let brick_owners = vec![
126-
User {
127-
id: Uuid::parse_str("ffffffff-ffff-ffff-ffff-ffffffffffff").unwrap(),
128-
name: String::from("PUBLIC")
129-
}
130-
];
131-
132125
let brick_name = lists::get_brick_assets()[asset_name_index as usize].clone();
133126
let material_name = lists::get_materials()[material_index as usize].clone();
134127

@@ -141,9 +134,9 @@ fn write_brs<T: Write>(mut writer: &mut T, bricks: Vec<Brick>, asset_name_index:
141134
brick_assets: vec![brick_name],
142135
colors: vec![],
143136
materials: vec![material_name],
144-
brick_owners,
137+
brick_owners: vec![],
145138
bricks
146139
};
147140

148141
brs::write_save(&mut writer, &write_data).unwrap();
149-
}
142+
}

0 commit comments

Comments
 (0)