Beatsaber Rust Utilities: A Beatsaber V3 parsing library.
beatsaber beatmap
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Added `bevy_color` feature flag.

AlephCubed 09480fc8 6784ef90

+102 -1
+71
Cargo.lock
··· 20 20 checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 21 21 22 22 [[package]] 23 + name = "bevy_color" 24 + version = "0.16.2" 25 + source = "registry+https://github.com/rust-lang/crates.io-index" 26 + checksum = "5c101cbe1e26b8d701eb77263b14346e2e0cbbd2a6e254b9b1aead814e5ca8d3" 27 + dependencies = [ 28 + "bevy_math", 29 + "bytemuck", 30 + "derive_more", 31 + "thiserror", 32 + ] 33 + 34 + [[package]] 23 35 name = "bevy_macro_utils" 24 36 version = "0.16.1" 25 37 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 30 42 "quote", 31 43 "syn", 32 44 "toml_edit", 45 + ] 46 + 47 + [[package]] 48 + name = "bevy_math" 49 + version = "0.16.1" 50 + source = "registry+https://github.com/rust-lang/crates.io-index" 51 + checksum = "68553e0090fe9c3ba066c65629f636bd58e4ebd9444fdba097b91af6cd3e243f" 52 + dependencies = [ 53 + "derive_more", 54 + "glam", 55 + "itertools", 56 + "smallvec", 57 + "thiserror", 58 + "variadics_please", 33 59 ] 34 60 35 61 [[package]] ··· 106 132 name = "bsru" 107 133 version = "0.1.0" 108 134 dependencies = [ 135 + "bevy_color", 109 136 "bevy_reflect", 110 137 "serde", 111 138 "serde_json", ··· 119 146 checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" 120 147 121 148 [[package]] 149 + name = "bytemuck" 150 + version = "1.23.1" 151 + source = "registry+https://github.com/rust-lang/crates.io-index" 152 + checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" 153 + dependencies = [ 154 + "bytemuck_derive", 155 + ] 156 + 157 + [[package]] 158 + name = "bytemuck_derive" 159 + version = "1.9.3" 160 + source = "registry+https://github.com/rust-lang/crates.io-index" 161 + checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1" 162 + dependencies = [ 163 + "proc-macro2", 164 + "quote", 165 + "syn", 166 + ] 167 + 168 + [[package]] 122 169 name = "cfg-if" 123 170 version = "1.0.1" 124 171 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 157 204 checksum = "ea8a8b81cacc08888170eef4d13b775126db426d0b348bee9d18c2c1eaf123cf" 158 205 159 206 [[package]] 207 + name = "either" 208 + version = "1.15.0" 209 + source = "registry+https://github.com/rust-lang/crates.io-index" 210 + checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 211 + 212 + [[package]] 160 213 name = "equivalent" 161 214 version = "1.0.2" 162 215 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 191 244 ] 192 245 193 246 [[package]] 247 + name = "glam" 248 + version = "0.29.3" 249 + source = "registry+https://github.com/rust-lang/crates.io-index" 250 + checksum = "8babf46d4c1c9d92deac9f7be466f76dfc4482b6452fc5024b5e8daf6ffeb3ee" 251 + dependencies = [ 252 + "bytemuck", 253 + ] 254 + 255 + [[package]] 194 256 name = "hashbrown" 195 257 version = "0.15.4" 196 258 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 208 270 dependencies = [ 209 271 "equivalent", 210 272 "hashbrown", 273 + ] 274 + 275 + [[package]] 276 + name = "itertools" 277 + version = "0.14.0" 278 + source = "registry+https://github.com/rust-lang/crates.io-index" 279 + checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" 280 + dependencies = [ 281 + "either", 211 282 ] 212 283 213 284 [[package]]
+2
Cargo.toml
··· 4 4 edition = "2024" 5 5 6 6 [features] 7 + bevy_color = ["dep:bevy_color"] 7 8 bevy_reflect = ["dep:bevy_reflect"] 8 9 9 10 [dependencies] 11 + bevy_color = { version = "0.16.2", optional = true, default-features = false } 10 12 bevy_reflect = { version = "0.16.1", optional = true, default-features = false } 11 13 serde = { version = "1.0.219", features = ["derive"] } 12 14 serde_json = "1.0.140"
+29 -1
src/info/color_scheme.rs
··· 91 91 } 92 92 } 93 93 94 - #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 94 + #[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)] 95 95 #[cfg_attr( 96 96 feature = "bevy_reflect", 97 97 derive(bevy_reflect::Reflect), ··· 118 118 } 119 119 } 120 120 } 121 + 122 + #[cfg(feature = "bevy_color")] 123 + mod color_conversions { 124 + use crate::info::color_scheme::Color; 125 + use bevy_color::Srgba; 126 + 127 + impl From<Srgba> for Color { 128 + fn from(value: Srgba) -> Self { 129 + Self { 130 + red: value.red, 131 + green: value.green, 132 + blue: value.blue, 133 + alpha: value.alpha, 134 + } 135 + } 136 + } 137 + 138 + impl From<Color> for Srgba { 139 + fn from(value: Color) -> Self { 140 + Self { 141 + red: value.red, 142 + green: value.green, 143 + blue: value.blue, 144 + alpha: value.alpha, 145 + } 146 + } 147 + } 148 + }