The ring theory part two - WoWInterface
03-02-13, 09:46 AM   #1
zork
A Pyroguard Emberseer

Join Date: Jul 2008
Posts: 1,740
The ring theory part two

Based on this:
http://www.wowinterface.com/forums/s...ght=discokugel
http://www.wowinterface.com/forums/s...ad.php?t=45817

Today after finishing my config I had some time to think about stuff. What really got me is that no-one has ever used scrollFrames to do stuff. I set up an experiment that I may try to prove if I have time.

I made the following graphics:

Basic ring setup:

We put a scrollFrame with an inline texture into ring segment 1:

This will happen if we change the setpoint of the scrollFrame and the setpoint of the texture inside the scrollFrame:

This is what is going to happen if we only adjust the size of the scrollframe:

What about rotation? Let's see. Hmm the offset does not fit.

So this is what happens if we correct the offset.

What we are doing in the last screenshot. We rotate the scrollFrame right while adjusting the setpoint properly. Additionally we rotate the ringTexture inside the scrollFrame in opposite direction.

*edit*

Ahhh...got an even better idea. Why would you rotate the scrollFrame at all? We can just leave as it is and just rotate the texture inside.

This is what will happen:

The pink thingy is the alpha layer of the ring texture.

Now if we rotate the texture inside the scrollFrame it will adjust on it's own.

This should make it very simple to create any kind of rings. Just set up 4 scrollFrames and throw in any ring texture you want. The number of rings per scrollFrames is unlimited. Each ring texture can be rotated individually.

Only one limitation. Start and end point of a ring segment can only be in one segment if at least one point is at 0° or 90°.

It even should be possible to do full half-rings with only 2 scrollFrames. Your ring texture would span 180° then.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

 "I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 08-07-14 at 04:08 AM.

03-02-13, 10:22 AM   #2
Nibelheim
local roygbi-

Join Date: Jan 2010
Posts: 1,600
Tripped out

03-02-13, 11:04 AM   #3
zork
A Pyroguard Emberseer

Join Date: Jul 2008
Posts: 1,740
Hmm...actually I set down to prove the concept.

It works!

Addon:
http://www.wowinterface.com/download...rTestRing.html

SVN:
http://code.google.com/p/rothui/sour...5.0/rTestRing/

Free your mind.

If I look at how simple that actually is I want back my time when I did rRingThing. Damnit.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

 "I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 03-02-13 at 11:13 AM.

03-02-13, 11:29 AM   #4
Nibelheim
local roygbi-

Join Date: Jan 2010
Posts: 1,600
 Originally Posted by zork Hmm...actually I set down to prove the concept. If I look at how simple that actually is I want back my time when I did rRingThing. Damnit.
Many a scientist must have thought that throughout history

03-03-13, 05:04 AM   #5
humfras
A Flamescale Wyrmkin
Join Date: Oct 2009
Posts: 131
This is superb.

There are just some major drawbacks to the texture rotation:
It only works for mono-color and symmetrical textures.
Otherwise, the illusion fails.
__________________
Author of VuhDo CursorCastBar OptiTaunt Poisoner RaidMobMarker

03-03-13, 05:47 AM   #6
Haleth
This Space For Rent

Join Date: Sep 2008
Posts: 1,173
Looks great, zork. I love your ideas. Your 'scroll frame revelation' made me laugh

It actually inspired me to try and use a scroll frame myself for some to-do list I'm working on. Sliding panel with transparent frames (so no lazy moving behind the parent frame) \o/

The possibilities... they are endless.

Edit: You could also make a pretty cool experience bar with it. A full circle represents one level. You have a segment for the current experience, then a second segment starting at the end of the first one representing rested experience. If you make the second one semi-transparent, you could see how far it overlaps into the next level as well, something which traditional experience bars can't do.

Last edited by Haleth : 03-03-13 at 06:40 AM.

03-03-13, 07:18 AM   #7
zork
A Pyroguard Emberseer

Join Date: Jul 2008
Posts: 1,740
@Haleth
Nice one.

@humfras

You can cheat alot more if you have to. Atleast it's a huge improvement of what we currently had to do.

The texture can use blending and gradients are possible aswell. Additonally you can use overlays or backgrounds. You can recolor on value change. You can even position another texture (spark) ontop of the ring.

Lua Code:
`local function calc_health_spark(self,value)    local spark = self.health_spark.texture      local adjust = 0.009    value = 1-value+adjust    local mult = 1    local radian = math.rad(90) + math.rad(value * (mult*90*self.config.health.segments_used))    spark:SetPoint("CENTER", spark.radius * math.cos(radian), spark.radius * math.sin(radian))    spark:SetRotation(radian - spark.shiftradian)    end`

On that note...I have not tested frame rotation which should be possible via animationgroups. Thus some could try to stack textures on a frame and rotate the full frame inside the scrollFrame.

Another big plus is the ability of AnimationGroups. Sth like Animation > SetSmoothing is just nice to have.

 Sets the smoothing type for the animation. This setting affects the rate of change in the animation's progress value as it plays. Signature: Animation:SetSmoothing("smoothType") Arguments: smoothType - Type of smoothing for the animation (string)IN - Initially progressing slowly and accelerating towards the end IN_OUT - Initially progressing slowly and accelerating towards the middle, then slowing down towards the end NONE - Progresses at a constant rate from beginning to end OUT - Initially progressing quickly and slowing towards the end
http://wowprogramming.com/docs/widge...n/SetSmoothing

__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

 "I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 03-03-13 at 07:36 AM.

 WoWInterface » The ring theory part two

 Thread Tools Display Modes Hybrid Mode

 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