Posts by Zephyr


    Made a quick check.
    Overriding seems to not work this way. Scene code is kept in one big string and interpreted at scene load.
    So when we have two scenes with same names but different code, krpano will load the one with more latter declaration.

    Apparently not

    Hi Scott,

    The reason I want this, is because I have a client creating the tours via the krpano droplet. He can upload the whole tour to the ftp. Via a custom cms he can place the hotspots. The hotspots are served via hotspots.xml which is server side generated. This way we have a clear seperation of concerns. The client can just upload the tour without worrying. I couldve created something that servers the tour.xml but injects the hotspots serverside but I liked my current approach better.

    The client can even download the hotspots.xml and run the tour offline.

    The hotspots are placed via some intermediate code, which basicly does what you sketched out. onxmlcomplete triggers a build hotspots action which parses <customhotspot scene='x' ... /> to <hotspot ... /> in the correct scene.

    - I could call a api on xmlcomplete to give the correct json information about the hotspots of a scene and parse that. (Benefit would be that the initial load is smaller as I only load what I need)
    - I could generate <data tags per scene with its content beging the hotspots, and the instead of a loadscene, I'd do a loadxml that merges the scene xml with the data.xml
    - I could let the server do the merging and serve the tour.xml with the hotspots from the database merged while keeping the original tour.xml intact.

    Enough possibilities :) I was just curious about other solutions thats more 'native' to krpano. Like the parent system of merging of tags.

    The loadxml gave me an idea:

    Code
    var sceneXML = 'loadxml(<krpano>' + krpano.get('scene[get(xml.scene)].content') +  krpano.get('data[hotspots].content')  + '</krpano>, , MERGE)'
    krpano.call('loadxml(' + sceneXML +" )')

    It create a xml string with the scene info from one data object (the scene) and hotspots from another

    Hi Zephyr,

    long time no see!
    I think the only option is to get it all from an array.. with js or krpano.

    Tuur *thumbsup*

    Hi Tuur,
    Im always lurking, not so much posting anymore :)

    Anyway, thats what Im doing now. I create one big hotspots.xml file, and then wrote a custom javascript that places the correct ones on scene load. Works fine, but just wondering if It was possible in another way.


    Made a quick check.
    Overriding seems to not work this way. Scene code is kept in one big string and interpreted at scene load.
    So when we have two scenes with same names but different code, krpano will load the one with more latter declaration.

    Thanks for trying it out :)

    Do you know if its possible not to load a xml using embedpano, but rather add scenes and images on runtime with javascript?

    Hi all,

    Is it possible to have all the hotspots of different scenes in 1 file, and the scenes in another?

    Code
    <krpano>
       <include url="tour.xm" />
      <include url="hotspots.xml />
    </krpano>

    for example (not sure if this is possible) by merging scene tags

    Code
    <scene name='test'>
       <view fov="90" />
    </scene>
    
    
    <scene name="test"?
       <hotspot url="poin.png" ath="0" />
    </scene>

    or perhaps by setting a parent?

    Code
    <hotspot parent="scene[test]" />

    atm I have a workaround with javascript that adds hotspots from one file, by listening to the onnewscene event and matching the scene name in both objects. Wondering if there was something smarter that I have missed in newer updates.

    Hi all/Klaus,

    When embedding krpano and using the onready callback, I get the krpano Javascript Interface returned. https://krpano.com/docu/js/#interfaceobject
    It contains 5 methods (get, set, call, spheretoscreen and screentosphere)

    If I want to add a hotspot, I need to do something like this:

    Code
    krpano.call('addhotspot(test)');
    krpano.set('hotspot[test].ath', 0);
    // or krpano.get('hotspot[test]').atv = 0

    When I approach it via the plugin interface way:

    Code
    <action name="test" type="Javascript" autorun="onstart">
            <![CDATA[
            window.krpano = krpano
             // or onReay(krpano)
            ]]>
        </action>

    I get a lot more tooling to my dispossal. Adding a hotspot would be

    Code
    var hs = window.krpano.addhotspot(name)
    hs.ath = 0

    I was wondering what is the difference?

    My usecase: I want to create a tour manager, which loads in hotspots from a json api, and places them in krpano and can control other things of krpano also. Krpano needs to be as simple as possible and just focus on presenting the panoramas and leave the behaviours to the javascript layer. It also allows me to write React and use Es6 and let it bundle by webpack.

    Thats why I thought going the javascript interface way is the best way forward. But then I saw that for example addhotspot is not available via the onready, but it is via an action.

    What would be your opinion.

    Hello all,

    I like to calculate the min/max vlookat and hlookat of the area you are viewing (the bounding box). I like to determine which hotspots the users sees.

    For example given a hfov and vfov of 90 (1:1 ratio), and a vlookat/hlookat of 0,0. I expect a bounding box of -45 45 45 -45 (West, South, East, North) So at first I thought it would be something like vlookat - vfov /2 and vlookat + vfov / 2 (same for hfov). But when you look down to 0, 90 you get coordinates like -45, 45, 45, 135 which isn't right because the panorama is spherical I'd expect -45 again. My math isn't great when it comes to sphericals ;p Can someone point me to the right direction? *confused*

    I'm not sure how to load base64 encoded image urls, but if you want to pre-fetch it. why not create an invisible image and load it's source?

    Code
    $.get("http://our-server.com/some-api").done(function(data){
    var img = new Image();
    img.onload = function () {
       alert("image is loaded");
    }
    img.src = data.path
    }

    "

    My best bet is that a tile mapped to a panorama using webgl or css3, triggers hardware acceleration in firefox and chrome. If you disable hardware acceleration in the browser, you should notice the a difference. https://support.mozilla.org/en-US/questions/976679

    According to Klaus in https://krpano.com/forum/wbb/inde…ad&threadID=905
    color profiles as embedded data will be removed, and you'll need to covert the image to the right color profile ( Photoshop, Edit > Convert To Profile )

    Hi All,

    Is it possible to have hotspots in a different file than where your scenes are located? My goal is to generate the hotspots serverside, but leave the tour.xml intact from the droplet.

    I tried adding a parent="test" or parent="scene[test]" to the hotspot, Anyone got other ideas. I would be nice if I wouldnt resort to addhotspot onxmlcomplete or something, because I'm not sure if thats the most efficient way (parsing xml nodes on load seems to me, being more efficient, but maybe Im wrong)

    Thanks

    Hello,

    I know it's possible to zoom to your cursor, or to zoom to the center of the screen when you scroll your mousewheel or pinch on tablet. But is it possible to zoom in to a fixed point in the panorama. For instance if you have a big flat pano with a fixed point on a house, no matter where you are in the flat pano (top left conrner for instance), as soon as you srcoll or pinch, you go to the house (maybe in the bottom right)

    I could do it automaticly with zoomtohotspot, but Im looking for a scrollwheen behaviour.

    thanks!

    Hi Klaus,

    Ive discovered a possible bug.

    Givens this code:

    On webgl all hotspots are shown. But on the Flash version, it doesnt apply the style. Ive tried adding preload and keep and flipping around where the style is defined, but cant get it to work. Issue on all browsers Running flash 18.0.0.232


    Update, when I looped the hotspots and get the 'style' I got null back. But when I named my hotspots, it suddenly started loading the styles. So atleast I can work around this bug.

    Just create a normal tour like you always do.
    Host it somewhere with a SSL certificate (so you have a https secure url).
    Go to developers.facebook.com and create an app (choose advanced setup)
    After you created an app, go to it's settings, click add platform button
    click pagetab
    fill in the secure url of your tour
    You need to add terms and conditions and your contact email too.

    If thats all done. To add it to your page, use this url:

    Code
    https://www.facebook.com/dialog/pagetab?
      app_id=YOUR_APP_ID
      &redirect_uri=YOUR_URL

    Heres a link that pretty much explains it http://blog.hubspot.com/blog/tabid/630…ness-Pages.aspx