Merge branch 'zesterer/meta' into 'master'
Optimising for size See merge request veloren/veloren!2468
2
.gitattributes
vendored
@ -1,4 +1,6 @@
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.jpg filter=lfs diff=lfs merge=lfs -text
|
||||
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
||||
*.vox filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.wav filter=lfs diff=lfs merge=lfs -text
|
||||
|
@ -13,7 +13,7 @@ variables:
|
||||
# https://docs.gitlab.com/ee/ci/yaml/#shallow-cloning
|
||||
GIT_DEPTH: 3
|
||||
GIT_CLEAN_FLAGS: -f
|
||||
CACHE_IMAGE_TAG: 8490f4b9
|
||||
CACHE_IMAGE_TAG: c6476744
|
||||
|
||||
default:
|
||||
# https://docs.gitlab.com/ee/ci/pipelines/settings.html#auto-cancel-pending-pipelines
|
||||
|
21
Cargo.toml
@ -86,8 +86,27 @@ opt-level = 3
|
||||
overflow-checks = false
|
||||
debug-assertions = false
|
||||
lto = true
|
||||
debug = 1 # line tables so we can have useful backtraces
|
||||
debug = false
|
||||
panic = "abort" # don't need unwinding so we can skip including the landing pads for that
|
||||
# line tables so we can have useful backtraces for in-house crates
|
||||
[profile.release.package."veloren-network"]
|
||||
debug = 1
|
||||
[profile.release.package."veloren-network-protocol"]
|
||||
debug = 1
|
||||
[profile.release.package."veloren-common"]
|
||||
debug = 1
|
||||
[profile.release.package."veloren-common-systems"]
|
||||
debug = 1
|
||||
[profile.release.package."veloren-client"]
|
||||
debug = 1
|
||||
[profile.release.package."veloren-server"]
|
||||
debug = 1
|
||||
[profile.release.package."veloren-server-cli"]
|
||||
debug = 1
|
||||
[profile.release.package."veloren-voxygen"]
|
||||
debug = 1
|
||||
[profile.release.package."veloren-world"]
|
||||
debug = 1
|
||||
|
||||
# used for cargo bench
|
||||
[profile.bench]
|
||||
|
BIN
assets/voxygen/background/bg_1.jpg
Normal file
After Width: | Height: | Size: 221 KiB |
Before Width: | Height: | Size: 1018 KiB |
BIN
assets/voxygen/background/bg_10.jpg
Normal file
After Width: | Height: | Size: 897 KiB |
Before Width: | Height: | Size: 2.7 MiB |
BIN
assets/voxygen/background/bg_11.jpg
Normal file
After Width: | Height: | Size: 868 KiB |
Before Width: | Height: | Size: 3.1 MiB |
BIN
assets/voxygen/background/bg_12.jpg
Normal file
After Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 493 KiB |
BIN
assets/voxygen/background/bg_13.jpg
Normal file
After Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 1.2 MiB |
BIN
assets/voxygen/background/bg_2.jpg
Normal file
After Width: | Height: | Size: 200 KiB |
Before Width: | Height: | Size: 939 KiB |
BIN
assets/voxygen/background/bg_3.jpg
Normal file
After Width: | Height: | Size: 819 KiB |
Before Width: | Height: | Size: 2.2 MiB |
BIN
assets/voxygen/background/bg_4.jpg
Normal file
After Width: | Height: | Size: 354 KiB |
Before Width: | Height: | Size: 877 KiB |
BIN
assets/voxygen/background/bg_5.jpg
Normal file
After Width: | Height: | Size: 605 KiB |
Before Width: | Height: | Size: 1.9 MiB |
BIN
assets/voxygen/background/bg_6.jpg
Normal file
After Width: | Height: | Size: 511 KiB |
Before Width: | Height: | Size: 2.0 MiB |
BIN
assets/voxygen/background/bg_7.jpg
Normal file
After Width: | Height: | Size: 204 KiB |
Before Width: | Height: | Size: 1.0 MiB |
BIN
assets/voxygen/background/bg_8.jpg
Normal file
After Width: | Height: | Size: 188 KiB |
Before Width: | Height: | Size: 644 KiB |
BIN
assets/voxygen/background/bg_9.jpg
Normal file
After Width: | Height: | Size: 420 KiB |
Before Width: | Height: | Size: 1.5 MiB |
BIN
assets/voxygen/background/bg_main.jpg
Normal file
After Width: | Height: | Size: 319 KiB |
Before Width: | Height: | Size: 914 KiB |
@ -97,19 +97,20 @@ impl Image {
|
||||
pub fn to_image(&self) -> Arc<DynamicImage> { Arc::clone(&self.0) }
|
||||
}
|
||||
|
||||
pub struct PngLoader;
|
||||
impl Loader<Image> for PngLoader {
|
||||
fn load(content: Cow<[u8]>, _: &str) -> Result<Image, BoxedError> {
|
||||
let format = image::ImageFormat::Png;
|
||||
pub struct ImageLoader;
|
||||
impl Loader<Image> for ImageLoader {
|
||||
fn load(content: Cow<[u8]>, ext: &str) -> Result<Image, BoxedError> {
|
||||
let format = image::ImageFormat::from_extension(ext)
|
||||
.ok_or_else(|| format!("Invalid file extension {}", ext))?;
|
||||
let image = image::load_from_memory_with_format(&content, format)?;
|
||||
Ok(Image(Arc::new(image)))
|
||||
}
|
||||
}
|
||||
|
||||
impl Asset for Image {
|
||||
type Loader = PngLoader;
|
||||
type Loader = ImageLoader;
|
||||
|
||||
const EXTENSION: &'static str = "png";
|
||||
const EXTENSIONS: &'static [&'static str] = &["png", "jpg"];
|
||||
}
|
||||
|
||||
pub struct DotVoxAsset(pub DotVoxData);
|
||||
|