Merge branch 'zesterer/meta' into 'master'

Optimising for size

See merge request veloren/veloren!2468
This commit is contained in:
Joshua Barretto 2021-06-18 12:35:16 +00:00
commit 05c375a8b0
32 changed files with 72 additions and 50 deletions

2
.gitattributes vendored
View File

@ -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

View File

@ -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

View File

@ -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 (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_1.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/background/bg_10.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_10.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/background/bg_11.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_11.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/background/bg_12.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_12.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/background/bg_13.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_13.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/background/bg_2.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_2.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/background/bg_3.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_3.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/background/bg_4.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_4.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/background/bg_5.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_5.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/background/bg_6.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_6.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/background/bg_7.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_7.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/background/bg_8.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_8.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/background/bg_9.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_9.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/background/bg_main.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/background/bg_main.png (Stored with Git LFS)

Binary file not shown.

View File

@ -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);