lerp static method
-
Linearly interpolate between two
AnaglyphStyleData
s. -
a
andb
are theAnaglyphStyleData
instances that you want to interpolate between. -
The
t
argument represents the position on the timeline. -
depth
is the only value that is currently being interpolated accurately.
Implementation
static AnaglyphStyleData lerp(
AnaglyphStyleData a,
AnaglyphStyleData b,
double t,
) {
return AnaglyphStyleData(
clipOuters: t < 0.5 ? a.clipOuters : b.clipOuters,
depth: Tween<double>(
begin: a.depth,
end: b.depth,
).transform(t),
filterQuality: t < 0.5 ? a.filterQuality : b.filterQuality,
stereoPairStyle: b.stereoPairStyle,
);
}