transform method
Computes the tween
Implementation
@override
Movie transform(double t) {
final propertyItems = <MovieTweenPropertyType, List<_AbsoluteSceneItem>>{};
final now = t * duration.inMicroseconds;
final valueMap = <MovieTweenPropertyType, dynamic>{};
final allItems = _generateAbsoluteItems();
/// Presort all items by begin.
allItems.sort((a, b) => a.begin - b.begin);
/// Group items by property.
for (var item in allItems) {
propertyItems.putIfAbsent(item.property, () => []);
propertyItems[item.property]!.add(item);
}
/// Transform each property for current time [t].
for (var property in propertyItems.keys) {
_transformProperty(propertyItems[property]!, property, now, valueMap);
}
return Movie(map: valueMap);
}