pbutler6 wrote: ↑August 26th, 2020, 7:26 pm
Yincognito -- Thank you son much.
I have the Roundline arcs and Rotator images working with my Skin. The images for Sun & Moon are a real improvement.
Is there a way to have a container for the sun and moon images? I tried the following, but it doesn't work:
Code: Select all
[ContainerSun]
Meter=Shape
Shape=Rectangle (#size#*0),(#size#*0),(#size#*40),(#size#*40),(#size#*70)
DynamicVariables=1
[Sun]
Meter=Rotator
MeasureName=SinceSunrise
ImageName=#@#Sun.png
Container=ContainerSun
X=390+#Radius#
Y=170+#Radius#
W=(#ImageW#)
H=(#ImageW#)
OffsetX=(-#Radius#+#ImageW#/2)
OffsetY=(#ImageW#/2)
StartAngle=(PI)
RotationAngle=(PI*2)
DynamicVariables=1
I'm not sure why you'd want a disk-like container for the sun and moon images, I mean ... it's not like they will get out of their orbit, right (assuming
X=#Radius# and
Y=#Radius# for
[Sun], that is)? When first seeing your reply I thought you wanted a container to hide the sun and moon movement on their 'down' arc, basically trying to simulate how a sun / moon rise would look like in real life - but then saw that it was a disk and hence my confusion as to what purpose could it have.
Anyway, to answer your question, yes, it's possible, but you have to remember that the coordinates of the meters in a container are relative to the container coordinates, so, if by any chance you kept the
#Radius# and
#ImageW# values of 90 and 32 from my posted code, it might be that the 390 and 170 values you add in the
X and
Y options of
[Sun] are too large, and the sun's orbit is entirely "out of view" because of the container masking things.
Bear in mind that I have no idea what you're trying to accomplish, so I can't tailor the dimensions or positions to achieve such a thing, but for me, assuming
Radius=90,
SizeW=32 and
size=5.3, adding just 30 to
#Radius# in the
X and
Y options of
[Sun] works. It might not be exactly what you want, but it will give you an idea where things are positioned and what to do to place and size them properly.
P.S. Other than that, I made my code work with the forecasted sun and moon rise times from the weather.com's JSON, and kept the animation to test how it looks. As expected and mentioned already, there is this small "jump" of the moon when the data for the following day is applied, but that's just because I didn't bother to "choose" the right moonset and just went straight for the moonset from the same day as the moonrise (even though that moonset may "belong" to, say, the moonrise of the previous day). I guess that's up for each skin designer to make his choice regarding how he choses the moonset, and I'll probably have to tweak that aspect later on, but the bottom line is that it works great otherwise. Avoiding or greatly alleviating the "jump" (which is happening just once per day when the day changes anyway, so no tragedy) is purely a matter of choosing the right moonset when parsing, that's all. After that the "jump" will become more or less as insignificant as the sun's (which is undetectabe with the naked eye, as it's only a couple of minutes difference in rise and set times from day to day).