pub struct Tween3D { /* private fields */ }Expand description
Vector tween.
Implementations§
Source§impl Tween3D
impl Tween3D
Sourcepub fn new(
from_x: f32,
from_y: f32,
from_z: f32,
to_x: f32,
to_y: f32,
to_z: f32,
duration: f32,
) -> Self
pub fn new( from_x: f32, from_y: f32, from_z: f32, to_x: f32, to_y: f32, to_z: 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 Tween3D
impl FromWasmAbi for Tween3D
Source§impl IntoWasmAbi for Tween3D
impl IntoWasmAbi for Tween3D
Source§impl LongRefFromWasmAbi for Tween3D
impl LongRefFromWasmAbi for Tween3D
Source§impl OptionFromWasmAbi for Tween3D
impl OptionFromWasmAbi for Tween3D
Source§impl OptionIntoWasmAbi for Tween3D
impl OptionIntoWasmAbi for Tween3D
Source§impl RefFromWasmAbi for Tween3D
impl RefFromWasmAbi for Tween3D
Source§type Abi = WasmPtr<WasmRefCell<Tween3D>>
type Abi = WasmPtr<WasmRefCell<Tween3D>>
The Wasm ABI type references to
Self are recovered from.Source§impl RefMutFromWasmAbi for Tween3D
impl RefMutFromWasmAbi for Tween3D
Source§impl TryFromJsValue for Tween3D
impl TryFromJsValue for Tween3D
Source§impl VectorFromWasmAbi for Tween3D
impl VectorFromWasmAbi for Tween3D
Source§impl VectorIntoWasmAbi for Tween3D
impl VectorIntoWasmAbi for Tween3D
impl SupportsConstructor for Tween3D
impl SupportsInstanceProperty for Tween3D
impl SupportsStaticProperty for Tween3D
Auto Trait Implementations§
impl Freeze for Tween3D
impl RefUnwindSafe for Tween3D
impl Send for Tween3D
impl Sync for Tween3D
impl Unpin for Tween3D
impl UnsafeUnpin for Tween3D
impl UnwindSafe for Tween3D
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.