More animation testing
This commit is contained in:
parent
e7b80c834b
commit
cf33e492a4
23391
javascript/classes.js
23391
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,21 @@
|
|||
package dev.resent.animation.impl;
|
||||
|
||||
import dev.resent.animation.Animation;
|
||||
import dev.resent.animation.Direction;
|
||||
|
||||
public class SmoothStepAnimation extends Animation {
|
||||
|
||||
public SmoothStepAnimation(int ms, double endPoint) {
|
||||
super(ms, endPoint);
|
||||
}
|
||||
|
||||
public SmoothStepAnimation(int ms, double endPoint, Direction direction) {
|
||||
super(ms, endPoint, direction);
|
||||
}
|
||||
|
||||
protected double getEquation(double x) {
|
||||
double x1 = x / (double) duration; //Used to force input to range from 0 - 1
|
||||
return -2 * Math.pow(x1, 3) + (3 * Math.pow(x1, 2));
|
||||
}
|
||||
|
||||
}
|
|
@ -5,8 +5,7 @@ import java.io.IOException;
|
|||
import dev.resent.Resent;
|
||||
import dev.resent.animation.Animation;
|
||||
import dev.resent.animation.Direction;
|
||||
import dev.resent.animation.impl.EaseInOutQuad;
|
||||
import dev.resent.animation.impl.ElasticAnimation;
|
||||
import dev.resent.animation.impl.SmoothStepAnimation;
|
||||
import dev.resent.module.base.Mod;
|
||||
import dev.resent.module.setting.BooleanSetting;
|
||||
import dev.resent.module.setting.ModeSetting;
|
||||
|
@ -123,7 +122,7 @@ public class ClickGUI extends GuiScreen {
|
|||
}
|
||||
}
|
||||
|
||||
GlUtils.startScale(((this.x) + (this.x + this.width)) / 2, ((this.y) + (this.y + this.height)) / 2, (float) introAnimation.getValue());
|
||||
GlUtils.startScale((this.x + this.width)/2, (this.y + this.height) / 2, (float) introAnimation.getValue());
|
||||
|
||||
// background
|
||||
drawRect(x - 10, y + 20, width + 35, height - 10, new Color(35, 39, 42, 200).getRGB());
|
||||
|
@ -257,7 +256,7 @@ public class ClickGUI extends GuiScreen {
|
|||
@Override
|
||||
public void initGui() {
|
||||
mc.gameSettings.loadOptions();
|
||||
introAnimation = new EaseInOutQuad(750, 1);
|
||||
introAnimation = new SmoothStepAnimation(750, 1);
|
||||
//introAnimation = new ElasticAnimation(750, 1, 3.8f, 1.35f, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user