Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Update Factory.lua #18

Open
wants to merge 2 commits into
base: experimental
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ Network Trash Folder
Temporary Items
.apdisk

@Resources/images/coverSpotify.png
@Resources/images/coverSpotify.png
@Resources/include/MeterBars.inc
@Resources/variables.ini
10 changes: 5 additions & 5 deletions @Resources/scripts/Factory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ function Initialize()
shapeY = shapeY - (realWidth * barCount + width) /2 * sinAmount
end
end
--else
-- shapeY = height * cosAmount
else
shapeY = height * cosAmount
end

meterFile:write('[MeterBar]\n'
,'Meter=Shape\n'
,'X='..shapeX..'\n'
,'Y='..shapeY..'\n'
,'X='..(shapeX-realWidth)..'\n'
,'Y='..(shapeY-height)..'\n'
,'Group=GroupBars | GroupDynamicColors\n'
,'Trait=Fill Color #Color# | StrokeWidth 0\n'
,'DynamicVariables=1\n')
Expand All @@ -50,7 +50,7 @@ for i=1,barCount do
local barY = height + realWidth * i * sinAmount
local barHeight = width - height
if i == barCount then X1,Y1 = barX, barY end
meterFile:write('Shape'..(i == 1 and '' or i)..'= Rectangle '..barX..','..barY..','..width..',('..barHeight..'*[MeasureAudioSmoothed'..i..']-'..width..'),'..(width/2)..' | rotate '..degree..','..(width/2)..',('..-barHeight..'*[MeasureAudioSmoothed'..i..']+'..width..') | Extend Trait\n')
meterFile:write('Shape'..(i == 1 and '' or i)..'= Rectangle '..barX..','..barY..','..width..',('..barHeight..'*([MeasureAudioSmoothed'..i..']>1?1:[MeasureAudioSmoothed'..i..'])-'..width..'),'..(width/2)..' | rotate '..degree..','..(width/2)..',('..-barHeight..'*([MeasureAudioSmoothed'..i..']>1?1:[MeasureAudioSmoothed'..i..'])+'..width..') | Extend Trait\n')

end
meterFile:write('Shape'..(barCount+1)..'=Line '..X1..','..Y1..','..(X1+(width+height)*sinAmount)..','..(Y1-(width+height)*cosAmount)..' | StrokeWidth 0 | StrokeColor 0,0,0,0')
Expand Down