playAnimation method

  1. @override
Future playAnimation(
  1. ThermionEntity entity,
  2. int index, {
  3. bool loop = false,
  4. bool reverse = false,
  5. bool replaceActive = true,
  6. double crossfade = 0.0,
})
override

Schedules the glTF animation at index in entity to start playing on the next frame.

Implementation

@override
Future playAnimation(ThermionEntity entity, int index,
    {bool loop = false,
    bool reverse = false,
    bool replaceActive = true,
    double crossfade = 0.0}) async {
  _module.ccall(
      "play_animation",
      "void",
      [
        "void*".toJS,
        "int32_t".toJS,
        "int32_t".toJS,
        "bool".toJS,
        "bool".toJS,
        "bool".toJS,
        "float".toJS
      ].toJS,
      [
        _sceneManager!,
        entity.toJS,
        index.toJS,
        loop.toJS,
        reverse.toJS,
        replaceActive.toJS,
        crossfade.toJS
      ].toJS,
      null);
}