apply method

  1. @override
void apply(
  1. ActorComponent? component,
  2. double mix
)
override

Implementation

@override
void apply(ActorComponent? component, double mix) {
  ActorShadow shadow = component as ActorShadow;
  int l = _value.length;
  Float32List wr = shadow.color;
  if (mix == 1.0) {
    for (int i = 0; i < l; i++) {
      wr[i] = _value[i];
    }
  } else {
    double mixi = 1.0 - mix;
    for (int i = 0; i < l; i++) {
      wr[i] = wr[i] * mixi + _value[i] * mix;
    }
  }
}