• 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

  • 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';

  • 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.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!