pub struct HaloZone {
pub color: String,
pub x: f32,
pub y: f32,
pub radius: f32,
pub opacity: f32,
}Expand description
A single glow zone for the “halo” animated-background preset.
Fields§
§color: StringZone color (hex string). May itself carry an alpha channel
(#rrggbbaa); see HaloZone::opacity for how the two combine.
x: f32X position as a fraction of the surface the halo is painted on:
the viewport in a slide view, the world the camera travels in a
world view (WorldTimeline::world_extent). 0.0 = left, 1.0 = right.
y: f32Y position as a fraction of that same surface. 0.0 = top, 1.0 = bottom.
radius: f32Radius as a fraction of that surface’s max(width, height) — so the
same value covers proportionally the same area whichever view it is in.
opacity: f32Zone opacity, multiplied with any alpha already encoded in color.
Default 1.0 is a true no-op: it leaves color’s own alpha (opaque
or hex-encoded) untouched, so scenarios written before this field
existed — including ones that hid alpha inside the hex string, e.g.
#1E3A8A55 — keep rendering identically. Values are clamped to
0.0..=1.0.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HaloZone
impl<'de> Deserialize<'de> for HaloZone
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for HaloZone
impl JsonSchema for HaloZone
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for HaloZone
impl RefUnwindSafe for HaloZone
impl Send for HaloZone
impl Sync for HaloZone
impl Unpin for HaloZone
impl UnsafeUnpin for HaloZone
impl UnwindSafe for HaloZone
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more