apply method

void apply(
  1. double time,
  2. {required CoreContext coreContext,
  3. double mix = 1}
)

Pass in a different core context if you want to apply the animation to a different instance. This isn't meant to be used yet but left as mostly a note to remember that at runtime we have to support applying animations to instances. We do a nice job of not duping all that data at runtime (so animations exist once but entire Rive file can be instanced multiple times playing different positions).

Implementation

void apply(double time, {required CoreContext coreContext, double mix = 1}) {
  if (quantize) {
    // ignore: parameter_assignments
    time = (time * fps).floor() / fps;
  }
  for (final keyedObject in _keyedObjects.values) {
    keyedObject.apply(time, mix, coreContext);
  }
}