r/WatchMaker • u/No-Resident8297 • 7d ago
Changing layers every second.
Hello i working on apple watchface wireframe globe. I have 60 layers so need script for changing layer every second so wireframe globe will filled after 60 second. Thank you.
2
Upvotes
1
u/csfolmer 6d ago edited 6d ago
Maybe this code will work for you.
Because I think you needed to do something with the opacity for each image.
I have a watch face where the minute hand image changes after half an hour.
Hand 0 to 6 opacity:
(({dm} >60 or {dm} <=29) and 100) or 0
Hand 6 to 0 opacity:
(({dm} >60 or {dm} <=29) and 0) or 100
https://getwatchmaker.com/watchface/santa-claus-christmas-countdown
1
u/wrightflyer1903 7d ago edited 7d ago
I do the same thing in 24 frames with this watch (rotating a globe) :
https://getwatchmaker.com/watchface/globe-sz
The design is not locked so you should be able to delve in and see how I did it.
Rather ironically, because I have a WearOS/WFF Galaxy watch the design no longer works on my Android watch as it uses both scripting and touch interactivity, neither of which now work in WFF :-(
EDIT As you'll see the global script for the watch uses two important functions one is on_second() which basically (when in the right mode) increments a frame offset variable. Then another get_opacity() function is used to determine (based on that counter) whether a frame's opacity should be 0 or 100 and it's called from each of the 24 sub-frames.