setMixByName method

void setMixByName(
  1. String fromName,
  2. String toName,
  3. double duration
)

Sets a mix duration by animation name.

See setMix.

Implementation

void setMixByName(String fromName, String toName, double duration) {
  final fromNative = fromName.toNativeUtf8(allocator: _allocator);
  final toNative = toName.toNativeUtf8(allocator: _allocator);
  _bindings.spine_animation_state_data_set_mix_by_name(_data, fromNative.cast(), toNative.cast(), duration);
  _allocator.free(fromNative);
  _allocator.free(toNative);
}