Skip to main content

ss_effect_slot_step

Function ss_effect_slot_step 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ss_effect_slot_step( slot: *mut c_void, ev: ss_effect_event_info, parent_frame: f32, delta_seconds: f32, fps: f32, parent_looped: bool, y_flip: bool, vert_stride: u8, draw: bool, ) -> ss_effect_step_result
Expand description

Advance the slot one frame. The caller resolves the active effect event (via ss_runtime_get_active_effect_event) and feeds it here together with timing inputs. parent_looped re-arms transition detection across the parent’s loop edge.

y_flip = true mirrors each particle’s Y position, rotation sign and quad, for Y-down rendering of Y-up authored content (Godot, pixi.js). Pass false for Y-up engines (Unity 2D).

vert_stride selects the vertex layout of the returned EffectDrawPlan: 2 packs (x, y) pairs (Godot, pixi.js, wgpu); 3 packs (x, y, 0) triples (Unity Mesh, Unreal procedural mesh). Other values fall back to 2.

draw is whether the part is in this frame’s draw_order. Step a hidden part’s slot anyway, with draw = false: it keeps the effect’s clock and transitions moving and builds no plan, and the next drawn step builds the plan an always-drawn slot would. A caller that steps before it has this frame’s draw_order passes true.

Returns EffectDrawPlan FlatBuffer pointer + length when visible. Buffer is valid only until the next call on the same slot.