mirror of https://github.com/Leinnan/rpack.git
WASM F
This commit is contained in:
parent
7fe34786c7
commit
a0486df8ae
|
|
@ -11,12 +11,14 @@ basis = ["dep:basis-universal"]
|
|||
dds = ["dep:image_dds"]
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4", features = ["derive"], optional = true }
|
||||
bevy_rpack = { default-features = false, path = "../bevy_rpack" }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
texture_packer = { version = "0.29", features = ["common"] }
|
||||
image = { version = "0.25", features = ["jpeg", "png"] }
|
||||
glob = { version = "0.3", optional = true }
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
clap = { version = "4", features = ["derive"], optional = true }
|
||||
basis-universal = { version = "0.3.1", optional = true }
|
||||
image_dds = { version = "0.6.2", optional = true }
|
||||
glob = { version = "0.3", optional = true }
|
||||
|
|
@ -92,7 +92,7 @@ impl Spritesheet {
|
|||
})
|
||||
}
|
||||
|
||||
#[cfg(feature = "dds")]
|
||||
#[cfg(all(feature = "dds", not(target_arch = "wasm32")))]
|
||||
pub fn save_as_dds<R>(&self, output_path: R)
|
||||
where
|
||||
R: AsRef<str>,
|
||||
|
|
@ -112,7 +112,7 @@ impl Spritesheet {
|
|||
dds.write(&mut writer).unwrap();
|
||||
}
|
||||
|
||||
#[cfg(feature = "basis")]
|
||||
#[cfg(all(feature = "basis", not(target_arch = "wasm32")))]
|
||||
pub fn save_as_basis<R>(&self, output_path: R)
|
||||
where
|
||||
R: AsRef<str>,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
use std::{fmt::Display, io::Write, path::Path};
|
||||
|
||||
use clap::{Parser, ValueEnum};
|
||||
use rpack_cli::{ImageFile, Spritesheet};
|
||||
use std::{fmt::Display, io::Write, path::Path};
|
||||
|
||||
#[derive(Clone, Debug, Default, Copy, ValueEnum)]
|
||||
pub enum SaveImageFormat {
|
||||
|
|
|
|||
Loading…
Reference in New Issue