Skip to main content

ss_player_crossfade

Function ss_player_crossfade 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ss_player_crossfade( handle: *mut SsPlayer, track: u32, anim_name: *const c_char, duration_ms: f32, ) -> i32
Expand description

Fade track to anim_name over duration_ms, starting from whatever it is playing. Advanced by ss_scene_update. On track 0, anim_name takes over from the call on: it is the current animation, its state is what ss_player_is_finished reports, and it plays with the speed, direction and loop count the host set. The instance tree is not rebuilt; the instance and effect parts belong to the pack, so the running children carry on.

ยงSafety

handle must be a live handle or null; anim_name a NUL-terminated UTF-8 string.