Revert "feat(engine): per-theme nearest-sampling opt-in for pixel-art themes"
This reverts commit 17e3112502.
This commit is contained in:
@@ -164,18 +164,6 @@ pub struct ThemeMeta {
|
||||
/// the artwork's intended proportions when the player resizes the
|
||||
/// window. Standard playing cards are 2:3.
|
||||
pub card_aspect: (u32, u32),
|
||||
/// Whether this theme's art should render with nearest-neighbor
|
||||
/// (point) sampling instead of Bevy's default bilinear filtering.
|
||||
///
|
||||
/// Set `true` for pixel-art themes (each face is a small grid of
|
||||
/// hand-placed pixels) so non-integer scales preserve crisp edges.
|
||||
/// Leave `false` for SVG-rasterised or photographic art where
|
||||
/// bilinear smooths downscale aliasing.
|
||||
///
|
||||
/// `#[serde(default)]` keeps older manifests (which pre-date this
|
||||
/// field) loading cleanly with the smooth-sampling default.
|
||||
#[serde(default)]
|
||||
pub pixel_art: bool,
|
||||
}
|
||||
|
||||
/// Errors surfaced by [`ThemeMeta::validate`].
|
||||
@@ -283,7 +271,6 @@ mod tests {
|
||||
author: "Solitaire Quest".into(),
|
||||
version: "1.0.0".into(),
|
||||
card_aspect: (2, 3),
|
||||
pixel_art: false,
|
||||
};
|
||||
assert_eq!(meta.validate(), Ok(()));
|
||||
}
|
||||
@@ -296,7 +283,6 @@ mod tests {
|
||||
author: "x".into(),
|
||||
version: "x".into(),
|
||||
card_aspect: (2, 3),
|
||||
pixel_art: false,
|
||||
};
|
||||
assert_eq!(meta.validate(), Err(ThemeMetaError::EmptyId));
|
||||
}
|
||||
@@ -309,7 +295,6 @@ mod tests {
|
||||
author: "x".into(),
|
||||
version: "x".into(),
|
||||
card_aspect: (2, 3),
|
||||
pixel_art: false,
|
||||
};
|
||||
assert!(matches!(
|
||||
meta.validate(),
|
||||
@@ -325,7 +310,6 @@ mod tests {
|
||||
author: "x".into(),
|
||||
version: "x".into(),
|
||||
card_aspect: (0, 3),
|
||||
pixel_art: false,
|
||||
};
|
||||
assert_eq!(meta.validate(), Err(ThemeMetaError::ZeroNumerator));
|
||||
meta.card_aspect = (2, 0);
|
||||
|
||||
Reference in New Issue
Block a user