Sie sind nicht angemeldet.

Helmar

Anfänger

  • »Helmar« ist der Autor dieses Themas

Beiträge: 5

Wohnort: Cape Town

Beruf: Create something out of nothing

  • Nachricht senden

1

Donnerstag, 27. Juli 2023, 19:18

nwjs experts here?

Title says it all. Am busy creating a standalone version of my "panorama" on MacOS using nwjs, but am anything but an expert. Managed to get the baby running nicely, but would love to get some custom menus in the MacOS menu bar, accessing some functions created in the panorama.

This, for instance, doesn't work. The submenu item is created, the shortcut shown, but the krpano.call doesn't yield a result. The pano.js has been called up earlier, and i am not aware of anything else I would have to do. Or do I?

Zitat

// Bind a callback to item
submenu.append(new nw.MenuItem({
label: "Randomize Horizon",
click: function() {
krpano.call("action(randomizehorizon);");
},
key: "s",
modifiers: "ctrl+alt",
}));


I also get a "unknown version" when using krpano.version from the sample code given in the docs, so I am stumped, as it looks as if krpano has NOT been loaded.

Any help is appreciated.

Happy days,

Helmar

Beiträge: 141

Wohnort: Russia, Komi republic, Uhta

Beruf: developer

  • Nachricht senden

2

Freitag, 28. Juli 2023, 13:28

are you trying to make a menu in the device interface?
maybe it would be enough to make it on the krpano or html page side?
I use nwjs and similar for the shell/container to package the tour into an apk and run offline on devices.

Hello from uhta3d )))
I'm in telegram: Lastromantik

3

Freitag, 28. Juli 2023, 17:13

if you're just starting, also have a look at electron.
i used nwjs for some yrs but then switched bc electron is better maintained

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »indexofrefraction« (28. Juli 2023, 17:25)


Beiträge: 141

Wohnort: Russia, Komi republic, Uhta

Beruf: developer

  • Nachricht senden

4

Freitag, 28. Juli 2023, 17:32

Or Apache Cordova: https://cordova.apache.org/

Hello from uhta3d )))
I'm in telegram: Lastromantik

Helmar

Anfänger

  • »Helmar« ist der Autor dieses Themas

Beiträge: 5

Wohnort: Cape Town

Beruf: Create something out of nothing

  • Nachricht senden

5

Mittwoch, 9. August 2023, 13:54

Thanks guys!

I'll have a look at what you suggested. I would love to make it as "native" as possible, at least for MacOS. That said, I'm still at a loss as to the correct syntax to call krpano functions via JS, because I've not been successful with the samples given in the krpano documentation.

Cheers,

Helmar

Helmar

Anfänger

  • »Helmar« ist der Autor dieses Themas

Beiträge: 5

Wohnort: Cape Town

Beruf: Create something out of nothing

  • Nachricht senden

6

Mittwoch, 9. August 2023, 13:55

are you trying to make a menu in the device interface?
maybe it would be enough to make it on the krpano or html page side?
I use nwjs and similar for the shell/container to package the tour into an apk and run offline on devices.
How do you package it into an APK, if I may ask?

Beiträge: 141

Wohnort: Russia, Komi republic, Uhta

Beruf: developer

  • Nachricht senden

7

Mittwoch, 9. August 2023, 14:12

How do you package it into an APK, if I may ask?
see here: Creating your first Cordova app - Apache Cordova

Hello from uhta3d )))
I'm in telegram: Lastromantik

Ähnliche Themen