Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
//! This example demonstrates how to bypass effects.
use bevy::prelude::*;
use bevy_seedling::prelude::*;
fn main() {
App::new()
.add_plugins((DefaultPlugins, SeedlingPlugins))
.add_systems(Startup, route_input)
.add_systems(Update, bypass)
.run();
}
/// Here we route the input node, `AudioGraphInput`, to the `MainBus`.
fn route_input(
input: Single<Entity, With<SamplerPool<DefaultPool>>>,
server: Res<AssetServer>,
mut commands: Commands,
) {
commands
.entity(*input)
.disconnect(MainBus)
// route the sound through a ton of reverb
.chain_node(FreeverbNode {
room_size: 0.9,
damping: 0.8,
width: 0.8,
..Default::default()
})
.connect(MainBus);
commands.spawn(SamplePlayer::new(server.load("divine_comedy.ogg")));
}
fn bypass(
interaction: Res<ButtonInput<KeyCode>>,
freeverb: Single<(Entity, Has<AudioBypass>), With<FreeverbNode>>,
mut commands: Commands,
) {
if interaction.just_pressed(KeyCode::Space) {
let (entity, bypassed) = freeverb.into_inner();
if bypassed {
info!("Removing bypass...");
commands.entity(entity).remove::<AudioBypass>();
} else {
info!("Bypassing reverb...");
commands.entity(entity).insert(AudioBypass);
}
}
}