Struct ogmo3::level::Decal[][src]

pub struct Decal {
    pub x: f32,
    pub y: f32,
    pub scale_x: Option<f32>,
    pub scale_y: Option<f32>,
    pub rotation: Option<f32>,
    pub texture: String,
    pub values: HashMap<String, Value>,
}
Expand description

A decal instance.

Fields

x: f32

The X position of the decal.

Decals have their origin at the center of the image, so you may need to correct for this when rendering.

y: f32

The Y position of the decal.

Decals have their origin at the center of the image, so you may need to correct for this when rendering.

scale_x: Option<f32>

The scale of the decal on the X axis. Will only be present if the decal template was defined as scalable.

scale_y: Option<f32>

The scale of the decal on the Y axis. Will only be present if the decal template was defined as scalable.

rotation: Option<f32>

The rotation of the decal. Will only be present if the decal template was defined as rotatable.

texture: String

The name of the decal’s texture.

values: HashMap<String, Value>

Custom values associated with the decal.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.