It is currently March 28th, 2024, 3:09 pm

Animation...

Get help with creating, editing & fixing problems with skins
Post Reply
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Animation...

Post by brax64 »

Hello folks,
I'm pretty new at RAinmeter coding... I did a simple animation for a weather icon; was trying to use the ActionTimer plugin with no success tho... so I came up with an alternative (actually working fine...) shown below.
Basically it shows the icon with a sort of "3D effect" animation, pause for the amount of time defined by maxcycle2 and then repeat...
For learning sake can anybody apply the ActionTimer plugin to this?

Code: Select all

[Rainmeter]
Update=50
DefaultUpdateDivider=40
BackgroundMode=2
SolidColor=0,0,0,1
AccurateText=1
AntiAlias=1
DynamicWindowSize=1

[Variables]
maxcycle1=512
maxcycle2=(#maxcycle1#*5)
Start=0
End=255
Incr=1
;-------------------------------------------------------------
[Cycle1]
Measure=Calc
Formula=(Cycle1+1)%(#maxcycle1#+1)
IfEqualValue=#maxcycle1#
IfEqualAction=[!DisableMeasure IconLoop][!PauseMeasure  Cycle1]
UpdateDivider=1

[Cycle2]
Measure=Calc
Formula=(Cycle2+1)%(#maxcycle2#+1)
IfEqualValue=#maxcycle2#
IfEqualAction=[!EnableMeasure IconLoop][!UnpauseMeasure  Cycle1]
UpdateDivider=1

[IconLoop]
Measure=Loop
StartValue=#Start#
EndValue=#End#
Increment=#Incr#
UpdateDivider=1

[PingPong]
Measure=Calc
IfCondition=IconLoop >= #End#
IfTrueAction=[!SetOption IconLoop InvertMeasure 1][!UpdateMeasure IconLoop]
IfCondition2=IconLoop <= #Start#
IfTrueAction2=[!SetOption IconLoop InvertMeasure 0][!UpdateMeasure IconLoop]
UpdateDivider=1

[MeterWeatherIcon]
Meter=Image
MeasureName=MeasureIcon
ImagePath=#ImageFolder2#
SolidColor=0,0,0,1
X=([IconLoop]-60)
Y=0
W=[IconLoop]
AntiAlias=1
PreserveAspectRatio=1
DynamicVariables=1
ImageAlpha=[IconLoop]
UpdateDivider=1
Thanks in advance!!!!
Post Reply