Beiträge von noupunt

    it seems that it works as expected if the setting in scroll area is in:

    Code
    scrolltype="inertia"

    so in scrolltype="smooth" then scrolltocenter will not work.

    I don't know if that's a bug, or it is how it's suposed to be.


    Hello!
    I have an issue that I don't know if it is a bug or it's jus me that I miss somethig.


    This setcenter() is working well but oviously not smooth:

    Code
    layer.onclick = ('layer[scrollarea].setcenter(,(layer[get(name)].y));loadscene(scene_whatever);');


    But this scrolltocenter() is doeing nothing :

    Code
    layer.onclick = ('layer[scrollarea].scrolltocenter(,(layer[get(name)].y));loadscene(scene_whatever);');




    Is that a bug or I have to take acount of other things when using scrolltocenter() ?


    Thanks!!!

    Hello!
    In scrollarea when you have the autoscrollbars="true" and you are pointing to your scroll_bg > scroll_grip layers, the height of the scroll_grip layer is proportional to the overflow, so if you have small portion out of the height of the scrollarea, the grip layer will be very tall and biceversa.

    Is there any way to have this grip layer with a fixed size or a maxheight?

    (actually I tryed to put maxheight to the grip layer, but then the grip only slides a part of its path... so that way don't works as expected).

    thanks!!!

    Hello!

    I'm starting to play and mess arround with this awesome new prerelease version, and I'm wondering if there is any Hit/collision-detection for hotspots. The collision-detection in the .obj is a big improvement, by the way!

    So... is there any solution to include hotspot collisions as collisions with the .obj, and above all, is this technically possible to program? *smile* or is there any limitation in the behaviour of krpano and hotspots.

    Thanks!!!

    Hello!
    I found the answer at the end of that post:
    https://krpano.com/forum/wbb/inde…ering+all+image

    To make it dynamic I do the following:


    Set the distorted hotspot height="prop"
    call hotspot onloaded="thisaction()"

    Code
    <action name="thisaction" scope="local">
    set(caller.width, get(image.level[calc(image.level.count-1)].tiledimagewidth));calc(caller.scale, tan(caller.width / image.level[calc(image.level.count-1)].tiledimagewidth * Math.PI/180.0 * 0.5) * 1000 / caller.width);
    </action>

    Hope it helps,
    thanks!

    Hello!

    This is a way that I use:

    To comunicate from krpanoLayer to mainKrpano via javascript, what I do is:

    in the main krpano, in a javascript function autorun="onstart":


    Code
    window.krpanoexternal = krpano


    and then in the krpano layer xml I can work with:


    Code
    krpano.actions.set(...) // points to krpanoLayer
    
    
    and
    
    
    
    
    window.krpanoexternal.actions.set(...) // points to main Krpano

    Hi, this is a project I did for training and to have fun! It's a kind of Hangman game where every time you get a letter right an animation advances, and the goal is obviously to get all the letters right and see the whole animation.

    Krpano serves here only as an interactive animation tool, and all animations are made with layers and actions. There are character animations, fog, insects, falling leaves, characters, etc...

    The project being just a kind of fun training is not optimized for mobiles, and sometimes it hangs trying to find the word because the free wordnik API has some limitations, so sometimes you will have to refresh the page, and at each refresh appears a random word with 6 letters in English.
    I hope you like it, and I hope that you get to see the whole animation, the words are difficult! *rolleyes* *rolleyes*


    HANGEDMAN GAME

    Hello!

    I've been trying your code without success... *smile* may be there is something I'm doing wrong...

    https://www.sergigomez.com/krpano/test_key_focus/index.html

    main xml:https://www.sergigomez.com/krpano/test_key_focus/tour.xml</a>
    krpanolayer xml: http://localhost/pascua/tests_k…p_tour/tour.xml

    Just to chek if I'm missing something!

    what I want to do is: If you click to the button and press a key, trigger the krpano layer event keydown&keyup (without haveing to click on the new layer before).

    Any way, if the next version this will be incorporated I can wait, I'm just trying things now.

    thanks!!!

    And, related with the topic of this thread:

    To comunicate from krpanoLayer to mainKrpano via javascript, what I do is:

    in the main krpano, in a javascript function autorun="onstart":

    Code
    window.krpanoexternal = krpano

    and then in the krpano layer xml I can work with:

    Code
    krpano.actions.set(...) // points to krpanoLayer

    and

    Code
    window.krpanoexternal.actions.set(...) // points to main Krpano

    Is this the only way, or there is any other way to control main krpano from krpano layer?

    thanks!!

    My way to solve this is that one:

    In index.hml(or where you have the embedpano() )

    In var 'direction' you ask if location is diferent to parent.location. If so, it means that the tour is inside an iframe, so you give it the route for iframes. Other ways you give it the route for the non iframe.

    In the embedpano(), inside initvars you create a variable (BASEDIRPANOS) and give it the value of 'the var 'direction'

    in tour.xml you have to repalace the normal 'panos/' with this initvar like this: %$BASEDIRPANOS%

    And that's it!
    If you want to block all the content, use the same logic with the whole krpano embedpano({...}) with an if function.

    Zitat

    if ( window.location === window.parent.location) {
    embedpano({
    ....
    })
    }


    * i don't know if this is a crossbrwoser solution

    Hello!
    My question is:

    In an embed krpano [E-Krpano], i made a krpano layer [L-Krpano] that show a diferent tour like this:

    Zitat

    <layer name="new_pano"
    width="200"
    height="200"
    align="center"
    type="krpano"onloaded="krpano.actions.loadpano('%FIRSTXML%/other_krpanos/primera/tour.xml');"
    />

    To control L-krpano from E-krpano i make like this in 'normal' krpano language:

    Zitat

    layer[new_pano].krpano.actions.removelayer(whatever);

    So... I've access to the layer krpanointerface like this: 'layer[new_pano].krpano'

    Then, to control E-Krpano from the L-Krpano, there is any way in 'normal' krpano language to access to the parent krpano-interface? or only it can be made using Javascript like this:

    Zitat


    js(krpano.set('whatever','hello'));


    thanks so much!!

    I use this extension for VSC, and I had a problem with the comments.
    The block comments are declared as /* */ and this works inside actions but not in the body of the krpano document, where those comments are ignored. so I'v changed this feature like this:

    in
    extensions\krpano-for-vscode-main\language-configuration.json


    I've replaced the comments object by:


    "comments": {
    "blockComment": [ "<!--", "-->" ]
    },

    I hope it helps someone!!

    Thanks for the answers!!

    Zitat

    "Possibly I'm being dense, but what do you mean by this?"


    A scrollarea plugin filled dynamically with text, that have also a scroll bar. I achived all except the scroll bar. Sorry I've not been acurate with the question.


    Zitat

    "you can check the vtourskin.xml "


    I've never used scroll bar with vtourskin, so I've never realized that it have that feature, I will check, and try from there!!

    Hello,

    I've been looking for information to achive a scroll bar for the scrollarea plugin and haven't found anything usefull after 2013 (and the before ones are SWF I guess...). I just need to know if I'm missing something...
    Does anyone know any workarround or anything I could consultate to achive a krpano scroll bar for scrollarea plugin?

    Thanks!