M13.5: stroke taper/wave/multi-dashes, radial gradient highlight, variable-width mask feather, adaptive motion-blur samples
Shapes (SHP-2): Stroke Taper (pixels/percent start/end length, width, ease) and Wave (amount, pixels/cycles, wavelength, phase) rendered as a variable-width outline; Dash 2/Gap 2/Dash 3/Gap 3 (shape.dashes.add/remove, timeline +/- buttons); radial gradient Highlight Length/Angle as a focal gradient. Masks (MSK-1): mask feather points on the Mask Path (mask.featherPoint.*, Mask Feather tool add/drag), per-point signed radius and tension, rendered from the signed distance to the path; carried through vertex edits. Motion blur (LYR-10): Adaptive Sample Limit comp setting; 2D layers take one sample per pixel of shutter travel between Samples Per Frame and the limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c406b71cba
commit
bbaee1fa0f
@@ -49,6 +49,7 @@ pub(crate) fn to_path(j: &Json) -> Option<Value> {
|
||||
out_tangents: fit(pts("o")),
|
||||
vertices,
|
||||
closed: o.get("c").and_then(Json::as_bool).unwrap_or(false),
|
||||
feather: Vec::new(),
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -137,11 +138,17 @@ fn stroke_fields(o: &mut Out) {
|
||||
o.raw("lc", json!(o.e("cap") + 1));
|
||||
o.raw("lj", json!(o.e("join") + 1));
|
||||
o.raw("ml", json!(o.f("miter")));
|
||||
let used = |g: Option<&PropGroup>, m: &str| g.and_then(|g| g.get(m)).is_some_and(|p| p.is_animated() || p.value.as_f64().abs() > 1e-9);
|
||||
let (taper, wave) = (o.g.sub("taper"), o.g.sub("wave"));
|
||||
if used(taper, "startLength") || used(taper, "endLength") || used(wave, "amount") {
|
||||
let msg = format!("{}: stroke Taper and Wave have no Lottie equivalent (uniform width exported)", o.label);
|
||||
o.ex.warn(msg);
|
||||
}
|
||||
if let Some(d) = o.g.sub("dashes") {
|
||||
let dash = d.get("dash").map(|p| p.value.as_f64()).unwrap_or(0.0);
|
||||
if dash > 0.0 || d.any_animated() {
|
||||
let mut list = vec![];
|
||||
for (n, m) in [("d", "dash"), ("g", "gap"), ("o", "offset")] {
|
||||
for (n, m) in [("d", "dash"), ("g", "gap"), ("d", "dash2"), ("g", "gap2"), ("d", "dash3"), ("g", "gap3"), ("o", "offset")] {
|
||||
if let Some(p) = d.get(m) {
|
||||
let v = export_prop(o.ex, p, &anim::num, &format!("{} ▸ Dashes ▸ {}", o.label, p.name));
|
||||
list.push(json!({"n": n, "nm": p.name, "v": v}));
|
||||
|
||||
@@ -280,6 +280,7 @@ fn shape_contents_roundtrip() {
|
||||
in_tangents: vec![[0.0, 0.0], [-10.0, 0.0], [0.0, 0.0]],
|
||||
out_tangents: vec![[0.0, 0.0], [10.0, 0.0], [0.0, 0.0]],
|
||||
closed: true,
|
||||
feather: Vec::new(),
|
||||
},
|
||||
);
|
||||
let grad = Gradient {
|
||||
|
||||
Reference in New Issue
Block a user