1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
| public class TigerAnimation {
public static final Animation IDLE = Animation.Builder.create(2f).looping() .addBoneAnimation("head", new Transformation(Transformation.Targets.TRANSLATE, new Keyframe(0f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1f, AnimationHelper.createTranslationalVector(0f, -0.5f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(2f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR))) .addBoneAnimation("body", new Transformation(Transformation.Targets.TRANSLATE, new Keyframe(0f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1f, AnimationHelper.createTranslationalVector(0f, -0.5f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(2f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR))) .addBoneAnimation("tail", new Transformation(Transformation.Targets.TRANSLATE, new Keyframe(0f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1f, AnimationHelper.createTranslationalVector(0f, -0.5f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(2f, AnimationHelper.createTranslationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR))) .addBoneAnimation("tail", new Transformation(Transformation.Targets.ROTATE, new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(0.5f, AnimationHelper.createRotationalVector(0f, -20f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1.5f, AnimationHelper.createRotationalVector(0f, 20f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(2f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR))).build(); public static final Animation WALK = Animation.Builder.create(2f).looping() .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(0.5f, AnimationHelper.createRotationalVector(-15f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1.5f, AnimationHelper.createRotationalVector(15f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(2f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR))) .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(0.5f, AnimationHelper.createRotationalVector(15f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1.5f, AnimationHelper.createRotationalVector(-15f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(2f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR))) .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(0.5f, AnimationHelper.createRotationalVector(15f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1.5f, AnimationHelper.createRotationalVector(-15f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(2f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR))) .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(0.5f, AnimationHelper.createRotationalVector(-15f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1.5f, AnimationHelper.createRotationalVector(15f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(2f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR))) .addBoneAnimation("tail", new Transformation(Transformation.Targets.ROTATE, new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(0.5f, AnimationHelper.createRotationalVector(0f, -20f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1.5f, AnimationHelper.createRotationalVector(0f, 20f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(2f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR))).build(); public static final Animation ATTACK = Animation.Builder.create(2f).looping() .addBoneAnimation("head", new Transformation(Transformation.Targets.ROTATE, new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1f, AnimationHelper.createRotationalVector(20f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(1.0416767f, AnimationHelper.createRotationalVector(-16.67f, 0f, 0f), Transformation.Interpolations.LINEAR), new Keyframe(2f, AnimationHelper.createRotationalVector(-0.83f, 0f, 0f), Transformation.Interpolations.LINEAR))).build(); }
|