This commit is contained in:
Bunny67
2020-08-03 00:12:52 +03:00
parent fcd7277800
commit 9956fb7ede
20 changed files with 2562 additions and 4746 deletions
+20 -5
View File
@@ -27,6 +27,7 @@ local default = {
yOffset = 0,
radius = 200,
rotation = 0,
fullCircle = true,
arcLength = 360,
constantFactor = "RADIUS",
frameStrata = 1,
@@ -574,7 +575,7 @@ local growers = {
local radius = data.radius or 0
local limit = data.useLimit and data.limit or math.huge
local sAngle = (data.rotation or 0) * math.pi / 180
local arc = (data.arcLength or 0) * math.pi / 180
local arc = (data.fullCircle and 360 or data.arcLength or 0) * math.pi / 180
local anchorPerUnitFunc = data.useAnchorPerUnit and createAnchorPerUnitFunc(data)
return function(newPositions, activeRegions)
local frames = {}
@@ -596,7 +597,14 @@ local growers = {
end
end
local theta = sAngle
local dAngle = arc / numVisible
local dAngle
if numVisible == 1 then
dAngle = 0
elseif not data.fullCircle then
dAngle = arc / (numVisible - 1)
else
dAngle = arc / numVisible
end
newPositions[frame] = {}
for i, regionData in ipairs(regionDatas) do
if i <= numVisible then
@@ -615,7 +623,7 @@ local growers = {
local radius = data.radius or 0
local limit = data.useLimit and data.limit or math.huge
local sAngle = (data.rotation or 0) * math.pi / 180
local arc = (data.arcLength or 0) * math.pi / 180
local arc = (data.fullCircle and 360 or data.arcLength or 0) * math.pi / 180
local anchorPerUnitFunc = data.useAnchorPerUnit and createAnchorPerUnitFunc(data)
return function(newPositions, activeRegions)
local frames = {}
@@ -637,7 +645,14 @@ local growers = {
end
end
local theta = sAngle
local dAngle = arc / -numVisible
local dAngle
if numVisible == 1 then
dAngle = 0
elseif not data.fullCircle then
dAngle = arc / (1 - numVisible)
else
dAngle = arc / -numVisible
end
newPositions[frame] = {}
for i, regionData in ipairs(regionDatas) do
if i <= numVisible then
@@ -1010,7 +1025,7 @@ local function modify(parent, region, data)
self.needToPosition = false
if #self.sortedChildren > 0 then
if animate then
WeakAuras.RegisterGroupForPositioning(data.id, self)
Private.RegisterGroupForPositioning(data.id, self)
else
self:DoPositionChildren()
end