This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

✨ Make .bind_amplitude non-layer-specific

+3 -3
+3 -3
src/video/hooks.rs
··· 1 1 use super::animation::LayerAnimationUpdateFunction; 2 2 use super::context::Context; 3 + use crate::animation::AnimationUpdateFunction; 3 4 use crate::synchronization::audio::MusicalDurationUnit; 4 5 use crate::{Canvas, Object}; 5 6 use anyhow::Result; ··· 358 359 359 360 fn bind_amplitude( 360 361 self, 361 - layer: &'static str, 362 362 stem: &'static str, 363 - update: &'static LayerAnimationUpdateFunction, 363 + update: &'static AnimationUpdateFunction, 364 364 ) -> Self { 365 365 self.with_hook(Hook { 366 366 when: Box::new(move |_, _, _, _| true), 367 367 render_function: Box::new(move |canvas, context| { 368 368 let amplitude = context.stem(stem).amplitude_relative(); 369 - update(amplitude, canvas.layer(layer)?, context.ms)?; 369 + update(amplitude, canvas, context.ms)?; 370 370 Ok(()) 371 371 }), 372 372 })