←  APIs and Utilities

ComputerCraft | Programmable Computers for Minecraft

»

paintutils loadAnim/drawAnim

exosceleton's Photo exosceleton 02 Jan 2017

As some of you might know, you can create images, animations [and text(?)] in npaintpro. in the paintutils API they are two functions that can handle images:
paintutils.loadImage(imageFilePath) -- loads Image file to Image Table
paintutils.drawImage(imageTable,x,y) -- draws an Image using an Image Table
So, since npaintpro can make animations too I looked through the inter-webs to see if anyone made similar functions for animations. When I found none, I decided to make my own. So here you go people, Happy days.
loadAnim
drawAnim
Constructive feedback appreciated.
Edited by exosceleton, 02 February 2017 - 01:29 PM.
Quote

Bomb Bloke's Photo Bomb Bloke 02 Jan 2017

Great Glob of Stuff

Edited by Bomb Bloke, 03 January 2017 - 12:04 AM.
Quote

exosceleton's Photo exosceleton 03 Jan 2017

Thanks for the feedback. Fixed!
Edited by exosceleton, 03 January 2017 - 03:13 PM.
Quote

ReBraLaCC's Photo ReBraLaCC 04 Jan 2017

with drawAnim() just for shorter code and i dont know if it is faster but its easier because lua kinda does the if statement for you
x = x or 1
y = y or 1
delay = delay or 0.25
loop = loop or false
Quote

exosceleton's Photo exosceleton 04 Jan 2017

Fixed!
Quote