Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Montag, 22. Juli 2019, 19:25

image as plugin

Hi,
I am trying to learn with the trial version.
I see you can "insert" an image in a pano by way of a layer (url="image").
I am wondering if it is possible to do that by a file.js, like the one shown in the plugin interface example (i.e. url="file.js" in the xml layer).

Thank you for any help.

Regards,

Giuseppe

2

Montag, 22. Juli 2019, 22:07

a krpano layer element is the same as a krpano plugin element

<layer url="mybutton.jpg" /> would be an image layer
<plugin url="myplugin.js" /> would be a js plugin

as described here, it does not matter if you write plugin or layer
https://krpano.com/docu/xml/#plugin

a js plugin example is here
https://krpano.com/docu/plugininterface/#top
(this is may not be something to start with, when using krpano)

of course you can insert layers from a js plugin:
krpano.actions.addlayer('mylayer');
var mylayer = krpano.layer.getItem('mylayer');
mylayer.url = 'mybutton.jpg';

3

Dienstag, 23. Juli 2019, 00:32

Thank you for explaination.
I was just trying to insert a floorplan in a pano.
I can do that using an image layer (url="myfloorplan.jpg").

I tried also to use a plugin (url="myplugin.js"). I used the plugin example at https://krpano.com/docu/plugininterface/#top
trying to modify: dropping the action and other stuff not related, I presume, with the insertion of the image.
I used: document.createElement("img") and document.innerHTML.........
but nothing happens.
Maybe the above is a nonsense ...
Thank you for any hints.