Skip to content

EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust

test(effects): pin the AE defaults of CC Blobbylize

Camille Moine6e85c762c145
diff --git a/crates/effects/src/distort3.rs b/crates/effects/src/distort3.rs
index ca6e5ba83..88be62e99 100644
--- a/crates/effects/src/distort3.rs
+++ b/crates/effects/src/distort3.rs
@@ -1169,6 +1169,22 @@ mod tests {
}
}
+ #[test]
+ fn blobbylize_defaults_match_ae() {
+ let s = crate::find("ec.distort.ccblobbylize").unwrap();
+ let default = |id: &str| s.params.iter().find(|p| p.id == id).unwrap().default.clone();
+ assert_eq!(default("property"), Value::Enum(0), "Property defaults to Red");
+ assert_eq!(default("softness"), num(20.0));
+ assert_eq!(default("cutAway"), num(25.0));
+ assert_eq!(default("lightHeight"), num(65.0));
+ assert_eq!(default("lightPosition"), pt(0.5, 0.5));
+ assert_eq!(default("ambient"), num(75.0));
+ assert_eq!(default("diffuse"), num(25.0));
+ assert_eq!(default("specular"), num(100.0));
+ assert_eq!(default("roughness"), num(0.025));
+ assert_eq!(default("metal"), num(100.0));
+ }
+
#[test]
fn blobbylize_cut_away_thresholds_a_height_ramp() {
// AE oracle: Cut Away is a linear height threshold with a ~1 px antialiased edge.