pub struct FrameEvent {
pub kind: u32,
pub entity: u32,
pub position: [f32; 3],
pub intensity: f32,
pub data: [f32; 4],
}Expand description
A single one-shot event extracted from the ECS for TS consumption.
Fixed schema optimised for audio/VFX triggers: event type, source entity, world-space position (for spatial audio), intensity (for volume/scale), and a 4-float payload for arbitrary extra data (color, direction, variant).
Fields§
§kind: u32Stable event-type identifier. Each distinct event type returns a unique
constant via RenderEvent::KIND.
entity: u32Source entity index, or 0 if not entity-specific.
position: [f32; 3]World-space position for spatial audio. [0.0, 0.0, 0.0] if not spatial.
intensity: f32Intensity/magnitude for volume or scale. 1.0 is the default.
data: [f32; 4]Extra payload for event-specific data (color, direction, variant ID, etc.).
[0.0; 4] when unused.
Trait Implementations§
Source§impl Clone for FrameEvent
impl Clone for FrameEvent
impl Copy for FrameEvent
Source§impl Debug for FrameEvent
impl Debug for FrameEvent
Source§impl PartialEq for FrameEvent
impl PartialEq for FrameEvent
impl StructuralPartialEq for FrameEvent
Auto Trait Implementations§
impl Freeze for FrameEvent
impl RefUnwindSafe for FrameEvent
impl Send for FrameEvent
impl Sync for FrameEvent
impl Unpin for FrameEvent
impl UnsafeUnpin for FrameEvent
impl UnwindSafe for FrameEvent
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