Haskells Animation Class ( HAC ) is a simple to use animation class for moving HUD elements such as text and boxes bounce and grow and move around your screen in all sorts of interesting ways and methods, it was designed for people who are not very good with lua, and for people who want to make their HUD interesting and full of stuff, the functions are super easy to call and they take two seconds to write, and you have results instantly! I’ve also included circle theorem into this version also known as ‘Haskell Draw’ which I’ll be constructing more and more, remember to check back for this thread for updates!
The syntax is as I’ve said, very simple. And you see results almost instantly, here’s how it works.
Now, lets explain what everything means, Here’s a list below of all the functions you can call.
Animations:BouncingText( Direction, Distance, Speed, Text, Font, LeftRight, UpDown, Color1, Color2 ) Animations:BouncingBox(Direction, Distance, Speed, Rounded, LeftRight, UpDown, Width, Height, Color1 ) Animations:BouncingCircle(Direction, Distance, Speed, X, Y, Radius, Linewidth, Color1) //First argument is a 'clamp', and the last argument is a minimum width and height! Animations:ResizeBox(true, 1000,50,0,000,0, Color ( 0, 0, 250, 130 ), 200)
There are currently 3 types of movement in this version, I’ll be updated it to allow free keyframe movement soon, the three types of movement are as follows:-
"Longitude" // Meaning Up And Down. "Latitude" // Meaning Left and Right. "Diagonal" // Meaning Diagonal ( Can be flipped using a minus! ).
Everything else is just how you would normally draw a text or a box, here’s some neat stuff you can do with it.
Create an awesome spectrogram!
Animations:BouncingBox("Longitude",40,600,8,50,50,50,50, Color ( 0, 0, 250, 130 ) ) Animations:BouncingBox("Latitude",-30,600,8,50,50,50,50, Color ( 250, 0, 0, 130 ) ) Animations:BouncingBox("Diagonal",30,300,8,50,50,50,50, Color ( 0, 250, 0, 130 ) )
I have also included some circle drawing techniques, here’s how to call them.
HDraw:Circle(100, 200, 100, 120, 1, Color(250,0,0,250))
Will draw a red circle. And this next code:-
HDraw:PartialCircle( 100, 200, 10, 100, 360, 180, 1, Color(250,0,0,250))
Will draw an amazing thing!?!?
Where can I use this!
This was designed to be small and efficient, it can be used in any draw hook. This means that you can make an awesome hud out of this stuff! You are free to use this and then upload your work to coderhire, you have my full permission!
You will need to include ‘haskell_animation’ and ‘haskell_draw’ in your projects, they are just two lua files used to make your life a tad easier! The link to these two files can be found below. You can also merge these two files into a games ‘hud’ lua file, if you want to call these commands from else where, or you can tell the server it needs to send these files, its up to you!
Thanks and I hope you enjoy!