released vdf-reader

This commit is contained in:
Robin Appelman 2023-12-21 20:42:40 +01:00
commit f39661ca95
21 changed files with 395 additions and 31 deletions

25
src/material/modulate.rs Normal file
View file

@ -0,0 +1,25 @@
use super::deserialize_path;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ModulateMaterial {
/// Multiplies the color behind it with this surface's texture.
#[serde(rename = "$basetexture", deserialize_with = "deserialize_path")]
pub base_texture: String,
/// Doubles the modulation, making it appear brighter. 1 enables this, 0 disables. Disabled by default.
#[serde(rename = "$mod2x", default)]
pub mod_2x: bool,
/// Disables backface culling.
#[serde(rename = "$nocull", default)]
pub no_cull: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "snake_case")]
pub enum SpriteOrientation {
ParallelUpright,
#[default]
VpParallel,
Oriented,
VpParallelOriented,
}