bak
This commit is contained in:
1 parent
6b6157d786
commit
3ef5fb5a2d
19 files changed
+1244
-94
No files matched your search
@@ -49,6 +49,19 @@ function lerpProps(a: AnimatableProps, b: AnimatableProps, t: number): Animatabl
|
||||
if (a.fill && b.fill) out.fill = lerpColor(a.fill, b.fill, t)
|
||||
else if (b.fill) out.fill = b.fill
|
||||
else if (a.fill) out.fill = a.fill
|
||||
if (a.blur !== undefined && b.blur !== undefined) out.blur = lerp(a.blur, b.blur, t)
|
||||
else if (b.blur !== undefined) out.blur = b.blur
|
||||
else if (a.blur !== undefined) out.blur = a.blur
|
||||
for (const key of ['shadowBlur', 'shadowOpacity', 'shadowAngle', 'shadowDistance'] as const) {
|
||||
const av = a[key]
|
||||
const bv = b[key]
|
||||
if (av !== undefined && bv !== undefined) out[key] = lerp(av, bv, t)
|
||||
else if (bv !== undefined) out[key] = bv
|
||||
else if (av !== undefined) out[key] = av
|
||||
}
|
||||
if (a.shadowColor && b.shadowColor) out.shadowColor = lerpColor(a.shadowColor, b.shadowColor, t)
|
||||
else if (b.shadowColor) out.shadowColor = b.shadowColor
|
||||
else if (a.shadowColor) out.shadowColor = a.shadowColor
|
||||
return out
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user