1.0.8.14 pre-release / release-candidate

  • Hi,

    Can we have somme documentation for this

    Quoted
    * new actions for looping / repeating actions:
    - for(startaction, condition, nextaction, loopaction)
    - asyncfor(startaction, condition, nextaction, loopaction)
    - loop(condition, loopaction)
    - asyncloop(condition, loopaction)


    okay, here a try:

    Code
    for(startaction, condition, nextaction, loopaction)
    • startaction
      the action code that will be exectued before the loop starts
      e.g. typically set the a index or count variable here,
    • condition
      the condition of as long as the loop should be repeated
      works like the if condition
    • nextaction
      the action code that will be executed after the inner loop action code
    • loopaction
      the inner looping action code

    e.g.

    Code
    for(set(i,0), i LT 10, inc(i), trace(i));


    Code
    asyncfor(startaction, condition, nextaction, loopaction)


    the same like the for action, but with one difference - the following actions will not wait until the for is done, they will be executed directly after the call, the loopaction itself will be executed once per frame as long as the condition is true

    the loop and asyncloop action are similar to the for and asyncfor just without the startaction and nextaction,

    best regards,
    Klaus

  • Wow Klaus! Thanks! The for loops will save alot of headaches in future projects!

    Im still not sure what asyncfor does though...

    what loop would fit if you try to do a loop over an array?
    something like this?

    or should i use the asyncfor?

  • The difference between "for" and "asyncfor" is that in a "for" loop, krpano first executes all iterations of the loop before continuing with the rest of the actions, whereas when you use "asyncfor" instead, krpano only does one iteration at a time, all the while executing other actions.

    So "for" blocks execution of all other actions and events until its done, while "asyncfor" does not. You would use "for" for smaller loops, where it is important that every iteration gets executed before krpano continues. On the other hand you would use "asyncfor" for relatively long loops that would otherwise lock up krpano for too long.

    In your simple case, either would work.

  • I tried something out quickly:

    why is the 1st and 3rd not working in the test action?

  • Ok, and I reckon that in your example, trace already has something build in to convert 1 to get(i) automaticly, and if i doesnt exists it just traces i?

    Code
    for(set(i,0), i LT 10, inc(i), trace(i));

    can't that be the default behaviour of actions too? or is this because of some backwards compatibility?

  • Hi,

    Zitat

    trace already has something build in to convert 1 to get(i) automaticly, and if i doesnt exists it just traces i?

    right, some actions are first checking if there is a variable with that name and if then they use the content of the variable, and if not then they just use the name of the variable,

    but when an action have that behavior ot should be documented here in the actions documentation:
    https://krpano.com/docu/actions/#detailsactions


    can't that be the default behaviour of actions too? or is this because of some backwards compatibility?

    some actions have that behavior because they exists before the get() was introduced, and because it makes the usage easier in some situations,

    doing that (passing the value of the variable) always by default would be not possible, because then it would not be possible to pass the name of variable anymore,

    best regards,
    Klaus

  • Hi,

    I've built a tour for all devices with the 1.0.8.12 template. Iphone 4 loads tablets tiles.

    So, i've uploaded the 1.0.8.14 release candidate 2 viewer to get the krpanoiphone.js which increased iPod4 stability by limiting and automatically downsampling the max. cubesize to 640x640. Then i replaced the old krpanoiphone.js and .swf (version.12) with the new ones.
    I built my tour once again with the .12 Vtour template and the new .js. Uploaded only the .js .swf and .html on the server (not the xml). I've just tried, and it seems that iphone still to get the tablet tiles..!?
    Link for iphone or smartphone

    I've made it wrong ?

    Thanks. *smile*
    Steph

  • Hi emediquei,

    Yes...

    I feel that is for let the player as small as posible *huh* ... Surely due to the adding of the looping actions and maths features...
    That makes me think that if it could not be more adequate making the player light and the enhanced features as external files (included files) instead of making an compromise between features and lightweight... Don't you think so *rolleyes* ?

    SAlut.

  • Hi,

    Oops, just read on the release notes that they were removed on purpose. Is there some way to get them back? I use them a lot for "non-blocking" camera control

    really?
    sorry, I really thought were not used (especially the OutIn tweens)...
    which InOut or OutIn tween types were you using? (and in which situations? I would be really interested, I have done a lot of test and often these tweentypes look a bit strange or unsuitable)

    about getting back - yes, that would be possible but that would increase the swf/js size of course (around 2-3kb each) and I want to avoid wasting so much space for almost not used functionality,

    maybe I could just add/return a few from them (many of them are very similar),
    e.g. what about just keeping "easeInOutCubic" and "easeInOutBack" (and mapping all other InOut tweens to "easeInOutCubic" by default),
    I think these two were the best ones of all the InOut and OutIn tweens...

    an other or additional way would be to externalize them as plugin - the tween calls itself wouldn't need to be changed for that, only the plugin must be loaded once,
    e.g. via:

    Code
    <plugin url="moretweentypes.swf" alturl="moretweentypes.js" preload="true" />

    That makes me think that if it could not be more adequate making the player light and the enhanced features as external files (included files) instead of making an compromise between features and lightweight... Don't you think so *rolleyes* ?

    right, therefore there are the plugins to extend the viewer with additional features that were not core features, but here I really thought these tween types were not really used and removing them could save a lot of space, but I want to keep the viewer also as upward-compatible as possible of course, so maybe in the next version they or at least some of the removed tweens will be back...

    best regards,
    Klaus

  • I agree that these tweens are not very used. I've also only used InOutQuad for custom camera control. Here are a couple of examples:

    http://demo.digisfera.pt/segourmet/
    On this website made in krpano, the user can click links on the "Produtos" section. I wanted to allow the user to click while the camera is moving, and since "lookto" blocks user control, tweening "hlookat", "vlookat" and "fov" seemed to be the best solution. easeInOutQuad allows the movement to be smooth both in the beginning and the end.

    http://www.digisfera.pt/maior-fotografia-lisboa
    In this gigapixel there is a custom movement: the camera zooms out and then zooms in. You can see it by clicking on a couple of thumbnails. Once again, InOutQuad allows for a smooth beginning and end of movement.

    I tried replacing Quad by Cubic in both cases, and Quad resulted in a more adequate acceleration. So, I think the best solution is what you sugested:

    - Make all tween types available in a separate plugin
    - Just keep 1 or 2 of these types in the "core", and map all others to them. Probably print a warning whenever the mapping is needed.

    A more powerful lookto() would also be a solution and a nice feature. I think it would be cool to have a new lookto() function which provided:
    1. non-blocking mode
    2. ability to set initial and final speed (to create more complex movements with consecutive calls to the function)
    3. a "donecall" parameter, like in tween() (as a way to support consecutive calls to the non-blocking function)
    4. a way to define our own motion type functions

    Thanks a lot!

  • Hi,

    just a quick update note:
    - the easeInOutQuad will be back in the next version
    - there will be 'moretweentypes' plugins for Flash and Javascript for additional tweening types
    - it will be possible to use the tweentypes also in the lookto actions
    - and there will be an optional non-blocking lookto with a donecall
    - and some other features too...

    best regards,
    Klaus

  • I use the 2011-04-11-krpanotools-1.0.8.14-win beta version to create a vtour in combination with the 2011-05-20-krpano10814-viewer-rc3 beta version. This is working fine for the pc, but when I try to use the combobox for ipad, I get an error message: combobox plugin - too old krpano version (min. version 1.0.8.14 / build 2011-05-19)

    <krpano version="1.0.8.14" onstart="startup();">
    <!-- vtour.xml template krpano tools version 1.0.8.14 -->

    How can this be? Am I confusing something?

    Michael

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!