library: texture: enum: add deserialization
This commit is contained in:
parent
3f1a166edf
commit
02874c9c22
|
@ -1,10 +1,14 @@
|
||||||
use super::core::LinearColor;
|
use super::core::LinearColor;
|
||||||
use super::Point2D;
|
use super::Point2D;
|
||||||
|
use serde::Deserialize;
|
||||||
|
|
||||||
/// All the existing `Texture` implementation.
|
/// All the existing `Texture` implementation.
|
||||||
|
#[serde(tag = "type")]
|
||||||
|
#[serde(rename_all = "lowercase")]
|
||||||
#[enum_dispatch::enum_dispatch]
|
#[enum_dispatch::enum_dispatch]
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq, Deserialize)]
|
||||||
pub enum TextureEnum {
|
pub enum TextureEnum {
|
||||||
|
#[serde(rename = "uniform")]
|
||||||
UniformTexture,
|
UniformTexture,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue