pub enum TrackCommand {
Show 19 variants
SetAnimation {
track: u32,
animation: String,
},
Crossfade {
track: u32,
animation: String,
duration_ms: f32,
},
FadeTrack {
track: u32,
target: f32,
duration_ms: f32,
},
CancelFade {
track: u32,
},
Clear {
track: u32,
},
SetAlpha {
track: u32,
alpha: f32,
},
SetBlend {
track: u32,
blend: TrackBlend,
},
SetSync {
track: u32,
sync: TrackSync,
},
SetFrame {
track: u32,
frame: f32,
},
SetSpeed {
track: u32,
speed: f32,
},
SetFrameRate {
track: u32,
fps: i32,
},
SetFrameSkipEnabled {
track: u32,
enabled: bool,
},
SetPlaybackDirection {
track: u32,
direction: PlaybackDirection,
style: PlaybackStyle,
},
SetLoopCount {
track: u32,
count: i32,
},
SetOutgoingEventThreshold {
track: u32,
threshold: f32,
},
AddSource {
track: u32,
animation: String,
weight: f32,
},
SetSourceWeight {
source: u32,
weight: f32,
},
SetSourceFrame {
source: u32,
frame: f32,
},
SetSourceEventThreshold {
source: u32,
threshold: f32,
},
}Expand description
What an SsTrackCommand does. Each variant is the
ssplayer_wgpu::SSPlayer call of the same name.
A track’s playback settings (SetSpeed to SetPlaybackDirection) are the
track’s: they reach every animation on it, and every one laid on it later.
Track 0’s come from SsPlayback, as its loop count does, so these
commands are refused on track 0.
Variants§
SetAnimation
Lay animation on track, replacing what it played. Not on track 0,
which SsPlayer::animation sets.
Crossfade
Fade track over to animation in duration_ms. Not on track 0: change
SsPlayer::animation with SsPlayer::transition_ms set.
FadeTrack
Drive track’s alpha to target in duration_ms.
CancelFade
Stop the fade on track where it stands.
Clear
Silence track. Track 0 is refused.
SetAlpha
track’s strength.
SetBlend
How track layers onto what is below.
SetSync
Where the animations laid on track from now on start. Send it before
the animation it is for.
SetFrame
Seek track — how a continuous-control axis is driven.
SetSpeed
track’s own speed; 0 parks it.
SetFrameRate
The frame rate track plays at instead of the authored one; 0 clears it.
SetFrameSkipEnabled
Whether track drops frames to keep to the wall clock.
SetPlaybackDirection
Which way track plays, and what it does at the far end.
SetLoopCount
How many times track’s animation plays before it holds its last
frame; -1 (or 0) loops forever. It belongs to the animation: send it
after the one it is for, since each is laid looping forever. Not on
track 0, whose count is SsPlayback::loop_count.
SetOutgoingEventThreshold
How far into a crossfade on track the outgoing animation keeps firing
events: while its share of the track, 1 - progress, is at least this.
f32::INFINITY (the default) silences it from the start of the fade.
AddSource
Lay animation on track beside what it carries, mixed by weight. Its
handle comes back in SsTrackState::sources.
SetSourceWeight
A source’s share within its track.
SetSourceFrame
Seek one source.
SetSourceEventThreshold
The weight at or above which a source fires its events; only track 0’s main source fires by default.
Trait Implementations§
Source§impl Clone for TrackCommand
impl Clone for TrackCommand
Source§impl Debug for TrackCommand
impl Debug for TrackCommand
Source§impl PartialEq for TrackCommand
impl PartialEq for TrackCommand
impl StructuralPartialEq for TrackCommand
Auto Trait Implementations§
impl Freeze for TrackCommand
impl RefUnwindSafe for TrackCommand
impl Send for TrackCommand
impl Sync for TrackCommand
impl Unpin for TrackCommand
impl UnsafeUnpin for TrackCommand
impl UnwindSafe for TrackCommand
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T [ShaderType] for self. When used in [AsBindGroup]
derives, it is safe to assume that all images in self exist.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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Settings for T
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a [Template::Output].§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.§impl<T> TypeData for T
impl<T> TypeData for T
§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
self.