EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
Expressions: offer bezier in the language menu and auto-complete (#1884)
Camille Moine06bdd7e2b653
diff --git a/crates/engine/src/cmd/expr_tools.rs b/crates/engine/src/cmd/expr_tools.rsindex fae74a5b5..cb39077af 100644--- a/crates/engine/src/cmd/expr_tools.rs+++ b/crates/engine/src/cmd/expr_tools.rs@@ -163,6 +163,8 @@ pub fn language_menu() -> Vec<(&'static str, Vec<(&'static str, &'static str)>)>("easeIn(t, tMin, tMax, value1, value2)", "easeIn(t, tMin, tMax, value1, value2)"),("easeOut(t, value1, value2)", "easeOut(t, value1, value2)"),("easeOut(t, tMin, tMax, value1, value2)", "easeOut(t, tMin, tMax, value1, value2)"),+ ("bezier(t, value1, value2, [x1, y1, x2, y2])", "bezier(t, value1, value2, [x1, y1, x2, y2])"),+ ("bezier(t, tMin, tMax, value1, value2, [x1, y1, x2, y2])", "bezier(t, tMin, tMax, value1, value2, [x1, y1, x2, y2])"),],),(diff --git a/crates/ui-egui/src/panels/expr_editor.rs b/crates/ui-egui/src/panels/expr_editor.rsindex 157288b94..6d742dc4e 100644--- a/crates/ui-egui/src/panels/expr_editor.rs+++ b/crates/ui-egui/src/panels/expr_editor.rs@@ -111,6 +111,7 @@ pub const COMPLETIONS: &[&str] = &["ease","easeIn","easeOut",+ "bezier","clamp","random","gaussRandom",