{"repo":"atomicptr/anima","free":true,"listed":false,"github":"https://github.com/atomicptr/anima","clone":"git clone https://github.com/atomicptr/anima.git","description":"A 2D animation library for Odin","language":"Odin","stars":45,"topics":["2d","2d-graphics","animation","animation-library","animations","game-dev","game-development","gamedev","odin-lang","odin-lib"],"license":"MIT","category":"game-templates","readme_excerpt":"anima A 2D animation library for Odin Inspired by the LÖVE library anim8 Compatibility This library is implemented to be renderer agnostic, however there is a raylib implementation available in anima/anima raylib . Installation Copy the anima directory somewhere into your project as this is the package, feel free to delete the sub directories inside that you do not need like anima/anima raylib if you for instance do not use raylib. (You might also want to use git submodules) Usage Check out one of the examples: - anim8 1945 example (port of the anim8 demo) - cat fighter fsm - Animations with a finite state machine Simple Example Documentation Grids Grids exist to make it as easy as possible to quickly define animations using rectangles of the same size. You can define a grid like this: (Took this explanation from the anim8 repo) To get frames from a grid you need to call the anima.grid frames procedure odin animation := anima.new animation( frames, // the frames to play, this should be supplied using grids duration, // the duration each frame will take until the next one will play playing, // (optional) is the animation playing? Default is true oneshot, // (optional) should the animation only play once? Default is false on finished, // (optional) a callback that will be called every time the current animation has finished ) odin anima.destroy animation(animation) after you are done with it. The animation structs also has a flip\\ h and flip\\ v property in case you want to flip","default_branch":null,"files":null,"tree":[],"storefront":"/r/atomicptr","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/atomicptr/anima/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}