• Amministratore
  •  
    Support Ukraine
    If you experience any problems with the forum (it is not visible, there is no way to post messages, or some functionality does not work), please let us know. If you have problems with registration or you did not receive confirmation letter, let us know and we will activate your account manually.
    If you get an "The submitted form was invalid. Try submitting again" error, delete cookies, then try again.
     

GTR3 calculations

Topics related to the creation, development, and designing of the watch faces.

Moderatori: asoo, Watchmens

Regole del forum
When adding a new topic, use the template: Topic title [device name]
For example: How to create watch face [GTR 3 Pro]
All communication in this branch should only be in English.
Rispondi
wbshrk
Messaggi: 3
Iscritto il: 31 dic 2021, 13:16
Località: USA
Contatta:

GTR3 calculations

Messaggio da wbshrk »

Does anyone know can you do equations in the jscipt for the watch face? I would like to do a more accurate moon phase.
wbshrk
Messaggi: 3
Iscritto il: 31 dic 2021, 13:16
Località: USA
Contatta:

Messaggio da wbshrk »

Ok I have the calculation working, but only when I change the watch face. I have tried everything I can think of from putting each image in an if statement to running the code in and out of the AOD if. Yet Nothing will refresh the moon image. Can anyone help?
Allegati
IWC-Black-Moon.zip
(482.29 KiB) Scaricato 80 volte
Avatar utente
SashaCX75
Messaggi: 820
Iscritto il: 26 ott 2019, 15:18
Località: Ukraine
Has thanked: 13 times
Been thanked: 1029 times
Contatta:

Messaggio da SashaCX75 »

I don't know how much it can help you, but you can put this code in the watch face after all the elements have been defined. You can insert your code with calculations after the "console.log ('ui resume');" and it will run every time you turn on the watch face.

Codice: Seleziona tutto

const widgetDelegate = hmUI.createWidget(hmUI.widget.WIDGET_DELEGATE, {
      resume_call: (function () {

           console.log('ui resume');
                
      }),
  });
wbshrk
Messaggi: 3
Iscritto il: 31 dic 2021, 13:16
Località: USA
Contatta:

Messaggio da wbshrk »

Ok I got the moon phase done. Now I am trying to do a sunrise sunset image that is on the dial. Is there any way to get all the sensors/datatypes and each element they have? I need the Sunrise and sunset hours and minutes separate so I can calculate the angle of the image.
Rispondi

Torna a “Watchfaces discussion”

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite