pub struct Animate {
pub kind: String,
pub speed: f32,
pub amp: f32,
pub points: Vec<[f32; 3]>,
}Expand description
Declarative idle motion for a placement. Kinds (v0.1): "spin" (rotate
about the object’s own Y axis), "bob" (rise and fall around the base
position), and "path" (travel a looping polyline of points, offsets
from the placement’s position — a patrol, a tour, a journey retraced).
speed scales time (metres/second for path); amp is metres of travel
for bob. Browsers phase-shift instances so fields of movers don’t march
in lockstep.
Fields§
§kind: String§speed: f32§amp: f32§points: Vec<[f32; 3]>Waypoints for "path", as offsets from the placement position. The
loop closes from the last point back to the first.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Animate
impl<'de> Deserialize<'de> for Animate
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Animate
Auto Trait Implementations§
impl Freeze for Animate
impl RefUnwindSafe for Animate
impl Send for Animate
impl Sync for Animate
impl Unpin for Animate
impl UnsafeUnpin for Animate
impl UnwindSafe for Animate
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
Mutably borrows from an owned value. Read more