SkillAgentSearch skills...

AnimationLib

A nonlinear-animation lib for Java. It can be used in various graphic animations like Minecraft GUI , Software UI Animations.

Install / Use

/learn @itscola/AnimationLib
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

AnimationLib

An animation lib for Java. It can be used in various graphic animations.

Demo:

protected Animation displayAnimation = new Animation();
protected Animation closeAnimation = new Animation();

displayAnimation.setMin(0).setMax(150).setFunction(new CubicOutFunction()).setTotalTime(260);
closeAnimation.setMin(150).setMax(0).setFunction(new CubicOutFunction()).setTotalTime(150);

if(!needClose){
    // The update method will return the max value, after the total time.
    Render2DUtils.drawRect(x , y , x1, displayAnimation.update());
    
}else{
    Render2DUtils.drawRect(x , y , x1, closeAnimation.update());
}


if(displayAnimation.isFinish()){
    // displayAnimation is finish.
}


displayAnimation.reset();

protected Animation displayAnimation = new Animation();
protected long time;

displayAnimation.setMin(0).setMax(150).setFunction(new CubicOutFunction()).setTotalTime(260);

//init
this.time = System.currentTimeMillis()


Render2DUtils.drawRect(x , y , x1, closeAnimation.update(System.currentTimeMillis() - this.time));

protected Animation displayAnimation = new Animation();

Render2DUtils.drawRect(x , y , x1, 
displayAnimation.setMin(0).setMax(150).setFunction(new CubicOutFunction()).setTotalTime(260).setLock(true).update()
);


float value = enableAnimation.update();
   if(!enableAnimation.isFinish()){
   yPosition = 16 + value;
}

Related Skills

View on GitHub
GitHub Stars8
CategoryDevelopment
Updated1y ago
Forks0

Languages

Java

Security Score

75/100

Audited on Jan 11, 2025

No findings