Jump to content




paintutils loadAnim/drawAnim

api lua computer

4 replies to this topic

#1 exosceleton

  • Members
  • 52 posts
  • LocationUmm... Mars.

Posted 02 January 2017 - 06:39 PM

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.


#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 02 January 2017 - 11:58 PM

Great Glob of Stuff

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


#3 exosceleton

  • Members
  • 52 posts
  • LocationUmm... Mars.

Posted 03 January 2017 - 03:12 PM

Thanks for the feedback. Fixed!

Edited by exosceleton, 03 January 2017 - 03:13 PM.


#4 ReBraLaCC

  • Members
  • 100 posts
  • LocationSublime Text 2

Posted 04 January 2017 - 06:24 AM

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


#5 exosceleton

  • Members
  • 52 posts
  • LocationUmm... Mars.

Posted 04 January 2017 - 04:06 PM

Fixed!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users