Thread Tools Display Modes
07-16-15, 09:04 AM   #1
lynce
A Cyclonian
 
lynce's Avatar
Join Date: Jul 2008
Posts: 48
Animate textures

Anyone got any knowledge on how to animate textures, say like a healthbar texture, in oUF?
  Reply With Quote
07-16-15, 09:42 AM   #2
Munglunch
Premium Member
 
Munglunch's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 34
Originally Posted by lynce View Post
Anyone got any knowledge on how to animate textures, say like a healthbar texture, in oUF?
What exactly did you have in mind?
  Reply With Quote
07-16-15, 01:12 PM   #3
lynce
A Cyclonian
 
lynce's Avatar
Join Date: Jul 2008
Posts: 48
Well i was sort of fascinated how SyncUI does animation on the unitframes. And i was wondering if someone have any experience doing this in oUF.
  Reply With Quote
07-17-15, 01:57 AM   #4
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by lynce View Post
Well i was sort of fascinated how SyncUI does animation on the unitframes. And i was wondering if someone have any experience doing this in oUF.
It has nothing to do with oUF or anything, it's done old school way and pretty simple. Basically it's just a slideshow, he has a texture with 60 "slides", and an OnUpdate script running for a statusbar, that goes through 60 slides.
__________________
  Reply With Quote
07-17-15, 03:54 AM   #5
lynce
A Cyclonian
 
lynce's Avatar
Join Date: Jul 2008
Posts: 48
I see. Thanks.

Hm looks quite complicated:P
  Reply With Quote
07-17-15, 06:05 AM   #6
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by lynce View Post
I see. Thanks.

Hm looks quite complicated:P
It's really simple though. First you make a map of "slides", then you make a table of coordinates for each slide, in SyncUI case he has a table of 60 items. He has a function that continuously runs through this list for certain statusbars, as the result you have a fluid animation.

You can check his code in \SyncUI\Modules\Elements\StatusBar\StatusBar.lua file, table of coordinates is the biggest part of it Syncrow's code is pretty easy to read, so you shouldn't have any problems.

And that's his "slide" map \SyncUI\Media\Textures\Elements\Statusbar\StatusBar_Animated_Fluid.tga.
__________________
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Animate textures


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off