pub struct Tween4D { /* private fields */ }Expand description
Vector tween.
Implementations§
Source§impl Tween4D
impl Tween4D
Sourcepub fn new(
from_x: f32,
from_y: f32,
from_z: f32,
from_w: f32,
to_x: f32,
to_y: f32,
to_z: f32,
to_w: f32,
duration: f32,
) -> Self
pub fn new( from_x: f32, from_y: f32, from_z: f32, from_w: f32, to_x: f32, to_y: f32, to_z: f32, to_w: f32, duration: f32, ) -> Self
Create a vector tween.
Sourcepub fn to_array(&self) -> Float32Array
pub fn to_array(&self) -> Float32Array
Return all vector components.
Sourcepub fn eased_progress(&self) -> f32
pub fn eased_progress(&self) -> f32
Current eased progress in [0, 1].
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether playback is complete.
Sourcepub fn set_time_scale(&self, scale: f32)
pub fn set_time_scale(&self, scale: f32)
Set playback time scale.
Trait Implementations§
Source§impl FromWasmAbi for Tween4D
impl FromWasmAbi for Tween4D
Source§impl IntoWasmAbi for Tween4D
impl IntoWasmAbi for Tween4D
Source§impl LongRefFromWasmAbi for Tween4D
impl LongRefFromWasmAbi for Tween4D
Source§impl OptionFromWasmAbi for Tween4D
impl OptionFromWasmAbi for Tween4D
Source§impl OptionIntoWasmAbi for Tween4D
impl OptionIntoWasmAbi for Tween4D
Source§impl RefFromWasmAbi for Tween4D
impl RefFromWasmAbi for Tween4D
Source§type Abi = WasmPtr<WasmRefCell<Tween4D>>
type Abi = WasmPtr<WasmRefCell<Tween4D>>
The Wasm ABI type references to
Self are recovered from.Source§impl RefMutFromWasmAbi for Tween4D
impl RefMutFromWasmAbi for Tween4D
Source§impl TryFromJsValue for Tween4D
impl TryFromJsValue for Tween4D
Source§impl VectorFromWasmAbi for Tween4D
impl VectorFromWasmAbi for Tween4D
Source§impl VectorIntoWasmAbi for Tween4D
impl VectorIntoWasmAbi for Tween4D
impl SupportsConstructor for Tween4D
impl SupportsInstanceProperty for Tween4D
impl SupportsStaticProperty for Tween4D
Auto Trait Implementations§
impl Freeze for Tween4D
impl RefUnwindSafe for Tween4D
impl Send for Tween4D
impl Sync for Tween4D
impl Unpin for Tween4D
impl UnsafeUnpin for Tween4D
impl UnwindSafe for Tween4D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.