voon-fx
The CPU side of the VFX system. Effects are RON files; a World simulates particles, ribbons, beams, smoke, fog, fire, fluids, weather, decals, shells, meshes, lights and camera shake, then extracts one FramePacket per frame. New since the last tag: GPU sub-emitters, mesh debris, global haze, fireballs, sand and ash weather, the open ocean with wakes, gusts in a shared wind field, and views that render voon-fluid fire and floods. No ash.
- Every random number is a hash of (seed, element, index), so Rust and the shaders agree bit for bit.
- Meters, Y up, right-handed, reverse-Z, premultiplied linear HDR.
[dependencies]
voon-fx = { git = "https://scm.oiko.lol/plus3/voon.git", tag = "v0.1.0" }use std::sync::Arc;
use glam::{Vec2, Vec3};
use voon_fx::view::ViewDesc;
use voon_fx::{FramePacket, Library, Settings, SpawnParams, Tier, View, World};
let mut lib = Library::new();
lib.load_dir(std::path::Path::new(voon_fx::EFFECTS)); // stock effects; load your own dir too
lib.finish();
let mut world = World::new(Arc::new(lib), Settings::tier(Tier::High));
world.spawn_by_name("combo_explosion", SpawnParams::at(Vec3::ZERO));
let mut packet = FramePacket::default();
// Each frame:
world.update(dt, &scene, camera_pos); // scene: impl voon_fx::SceneQuery (voon-phys has one)
world.extract(&View::new(&ViewDesc {
view, proj, prev_view_proj: None, near: 0.05, size: [w, h],
time, dt, frame, jitter: Vec2::ZERO, cut: false,
}), &mut packet);
// packet.lights -> your lighting, packet.shake -> your camera, packet -> voon-fx-gpu// effects/combo_missile.ron: effects compose other effects
(
bounds: (min: (-2.0, -2.0, -2.0), max: (2.0, 2.0, 2.0)),
duration: Loop,
priority: 3,
elements: [
(kind: Sub((effect: "ribbon_missile", inherit_velocity: 0.0))),
(kind: Sub((effect: "combo_explosion", at: Stop))), // boom when it stops
],
)



































































































