addBoneAnimation method
- ThermionEntity entity,
- BoneAnimationData animation, {
- int skinIndex = 0,
- double fadeInInSecs = 0.0,
- double fadeOutInSecs = 0.0,
- double maxDelta = 1.0,
Enqueues and plays the animation
for the specified bone(s).
By default, frame data is interpreted as being in parent bone space;
a 45 degree around Y means the bone will rotate 45 degrees around the
Y axis of the parent bone in its current orientation.
(i.e NOT the parent bone's rest position!).
Currently, only Space.ParentBone
and Space.Model
are supported; if you want
to transform to another space, you will need to do so manually.
fadeInInSecs
/fadeOutInSecs
/maxDelta
are used to cross-fade between
the current active glTF animation ("animation1") and the animation you
set via this method ("animation2"). The bone orientations will be
linearly interpolated between animation1 and animation2; at time 0,
the orientation will be 100% animation1, at time fadeInInSecs
, the
animation will be ((1 - maxDelta) * animation1) + (maxDelta * animation2).
This will be applied in reverse after fadeOutInSecs
.
Implementation
@override
Future addBoneAnimation(ThermionEntity entity, BoneAnimationData animation,
{int skinIndex = 0,
double fadeInInSecs = 0.0,
double fadeOutInSecs = 0.0,
double maxDelta = 1.0}) {
// TODO: implement addBoneAnimation
throw UnimplementedError();
}