M0.9–M0.10: egui frontend (AE-style panels, viewer, timeline, effect controls, dialogs), desktop app with control channel, host wiring; cargo fmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e2ba01a11f
commit
3a59a8470d
@@ -16,11 +16,11 @@ use std::sync::Arc;
|
||||
use effectcraft_color::BlendMode;
|
||||
use effectcraft_effects::{Buf, EffectCtx, Params};
|
||||
use effectcraft_geom::{Mat3, vec2};
|
||||
pub use eval::{EvalCtx, ExprHost, source_size};
|
||||
use effectcraft_project::{Comp, Footage, GroupKind, ItemId, ItemKind, Layer, LayerSource, MatteKind, Node, Project, Quality, Sampling};
|
||||
pub use effectcraft_raster::Image;
|
||||
use effectcraft_raster::{WarpOpts, composite_warp};
|
||||
use effectcraft_time::Tick;
|
||||
pub use eval::{EvalCtx, ExprHost, source_size};
|
||||
use rayon::prelude::*;
|
||||
|
||||
/// Supplies decoded footage frames (implemented by the media layer).
|
||||
|
||||
@@ -19,7 +19,13 @@ fn coverage(ctx: &EvalCtx, layer: &Layer, g: &effectcraft_project::PropGroup, bu
|
||||
let mut cov = effectcraft_path::fill_coverage(std::slice::from_ref(&path), &m, w, h, FillRule::NonZero);
|
||||
let exp = ctx.f(layer, g, "expansion", 0.0);
|
||||
if exp.abs() > 0.01 {
|
||||
let ring = effectcraft_path::stroke_coverage(std::slice::from_ref(&path), &StrokeStyle { width: exp.abs() * 2.0, join: effectcraft_path::Join::Round, ..Default::default() }, &m, w, h);
|
||||
let ring = effectcraft_path::stroke_coverage(
|
||||
std::slice::from_ref(&path),
|
||||
&StrokeStyle { width: exp.abs() * 2.0, join: effectcraft_path::Join::Round, ..Default::default() },
|
||||
&m,
|
||||
w,
|
||||
h,
|
||||
);
|
||||
cov.data.par_iter_mut().zip(ring.data.par_iter()).for_each(|(c, r)| {
|
||||
*c = if exp > 0.0 { (*c + r - *c * r).min(1.0) } else { (*c * (1.0 - r)).max(0.0) };
|
||||
});
|
||||
|
||||
@@ -29,17 +29,30 @@ pub struct CharXf {
|
||||
|
||||
impl Default for CharXf {
|
||||
fn default() -> Self {
|
||||
CharXf { offset: [0.0; 2], anchor: [0.0; 2], scale: [100.0; 2], rotation: 0.0, skew: 0.0, opacity: 100.0, fill: None, fill_k: 0.0, stroke: None, stroke_k: 0.0, stroke_width: 0.0, tracking: 0.0 }
|
||||
CharXf {
|
||||
offset: [0.0; 2],
|
||||
anchor: [0.0; 2],
|
||||
scale: [100.0; 2],
|
||||
rotation: 0.0,
|
||||
skew: 0.0,
|
||||
opacity: 100.0,
|
||||
fill: None,
|
||||
fill_k: 0.0,
|
||||
stroke: None,
|
||||
stroke_k: 0.0,
|
||||
stroke_width: 0.0,
|
||||
tracking: 0.0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn shape_value(shape: u32, f: f64) -> f64 {
|
||||
let f = f.clamp(0.0, 1.0);
|
||||
match shape {
|
||||
1 => f, // ramp up
|
||||
2 => 1.0 - f, // ramp down
|
||||
3 => 1.0 - (2.0 * f - 1.0).abs(), // triangle
|
||||
4 => (1.0 - (2.0 * f - 1.0).powi(2)).sqrt(), // round
|
||||
1 => f, // ramp up
|
||||
2 => 1.0 - f, // ramp down
|
||||
3 => 1.0 - (2.0 * f - 1.0).abs(), // triangle
|
||||
4 => (1.0 - (2.0 * f - 1.0).powi(2)).sqrt(), // round
|
||||
5 => {
|
||||
let t = 1.0 - (2.0 * f - 1.0).abs();
|
||||
t * t * (3.0 - 2.0 * t)
|
||||
|
||||
Reference in New Issue
Block a user