• So I tried using the new placeholder feature..
    It showed only the preview.. Is this supported for html5 devices?
    Flash worked fine even with levels place holders.

    PHP
    <mobile><left  url="%SWFPATH%/images/<?php print $pano[$i] ?>.tiles/tablet_l.jpg" />
    				<front url="%SWFPATH%/images/<?php print $pano[$i] ?>.tiles/tablet_f.jpg" />
    				<right url="%SWFPATH%/images/<?php print $pano[$i] ?>.tiles/tablet_r.jpg" />
    				<back  url="%SWFPATH%/images/<?php print $pano[$i] ?>.tiles/tablet_b.jpg" />
    				<up    url="%SWFPATH%/images/<?php print $pano[$i] ?>.tiles/tablet_u.jpg" />
    				<down  url="%SWFPATH%/images/<?php print $pano[$i] ?>.tiles/tablet_d.jpg" /></mobile>


    became

    PHP
    <mobile>
    				<cube  url="%SWFPATH%/images/<?php print $pano[$i] ?>.tiles/tablet_%s.jpg" />
    			</mobile>
  • Hi klaus,

    I recently updated to last version and discovered that some 'if' actions don't work as expected.
    For example, this works perfectly in version 1.0.8.14 Update 3 (2011-09-28)


    Code
    if( hotspot[ mapping ].loadedbytes GT hotspot[ get( h )].bytes, ...

    but not in version 1.0.8.14 Update 6 (2011-10-21).
    Do you have any idea?

    -- Francesc

  • Hi,

    I recently updated to last version and discovered that some 'if' actions don't work as expected.

    thanks for the report!

    the problem was the new if parser that was introduced in build 2011-10-11 to the fix an other if problem,
    this parser doesn't assume that whitespaces were possible in variable names/paths,

    this will be fixed in the next release,
    as workaround you could remove the whitespaces in the array indices,

    best regards,
    Klaus

  • Hi,

    Thanks Klaus, that solved part of the problem.

    Here you can see other problems I've encountered:

    http://vtour.enacse.com/?c=fundacio-vi…u-solterra&kl=t


    and

    http://vtour.enacse.com/?c=fundacio-vi…-10-21_update-6


    are the same virtual tour using different krpano versions. Please compare the behavior of the buttons at the left.
    Its impossible with the latest version of krpano to do anything, so it's absolutely unusable here.

    Also, after reloading, look for "Sala 0.2" scene and play with the photo gallery inside it (click one the photographs with a red spot).

    Clearly, one of the last three updates introduced a serious bug.
    Hope it's easy to solve to not to wait until next release. Any idea on how to solve this?


    -- Francesc

  • Hi,

    this problem is also related to the new if parser (which was introduced in build 2011-10-11),

    you were calling your 'openthumbs' action always with 'space/blank' as parameter (this will be resolved to an empty string as parameter):

    Code
    openthumbs( )

    and inside the 'openthumbs' action there is the following if:

    Code
    if( %1 != NEXT,

    which becomes, after resolving the parameter placeholders, to:

    Code
    if(  != NEXT,

    the old if parser was able to solve such conditions,
    but the new one not, there such conditions always resolve to false,

    I have fixed that now, now the new if parser can handle also such conditions,

    btw - as workaround just remove the blank when calling actions (I have seen that happens several times in your code),
    if there are no additionally bug reports anymore, the new/fixed version might be able to be released very soon (probably today...)

    additionally I'm also thinking about if 'empty string' parameters should resolve to 'null'... but this might eventually introduce other compatibly problems so probably not...
    are there any opinions to this?

    best regards,
    Klaus

  • Quote

    additionally I'm also thinking about if 'empty string' parameters should resolve to 'null'... but this might eventually introduce other compatibly problems so probably not...
    are there any opinions to this?

    In javascript an empty string evaluates as a falsy just like null, false, undefined, 0, NaN.

    So

    Code
    var x = "";
    console.log(x == false); //true
    console.log(x == 0); //true

    any other variable that becomes, null, undefined, 0, NaN, should alsoo parse false;

    but this doesnt mean that

    Code
    var x = "";
    console.log(x == null); //false
    console.log(x === null); //false

    what if you did a substring of somesort, and the result becomes an empty string, it would be weird if that validated null.

    btw javascript is weird...

    x is not equal to y.

    long story short, I think it would better to evaluate it as false, then null. I feel null is special, as something thats not defined. In php you have isset() and empty(). An empty string would return as empty (true) but still isset (true) while null wouldnt be set and empty would fail to parse. I think that php would be the best way to follow for clearness, but perhaps javascript is better since you have krpanoJS,

  • Hi all,
    Thank you very much Klaus for your quick response. I'll try to fix that.


    But wait, we're talking about WHITE spaces. They are not part of the semantics, just part of the syntax. Please don't consider them as a token, just a separator.
    IMHO empty strings should be ALWAYS enclosed between " or ' characters. That's the most usual treatment in almost any programming language, no matter how ancient or modern.
    'openthumbs( )' should be exactly the same as 'openthumbs()' and 'openthumbs( )' etc, no matter how many white spaces you put there: that's not an argument at all, and for sure that's not the 'null' argument.
    (That's taken from C, C++, ObjectiveC, Java, Javascript, PHP; even Lisp, EmacsLisp, prolog, latin, ancient greek ... *wink* )

    In other words, please don't confuse a single white space with the empty string or the 'null' value or the 'false' boolean.
    What about indentation, then? That's a concatenation of empty strings or nulls? What a weird language ...


    -- Francesc

  • Hi,

    Quote

    In javascript an empty string evaluates as a falsy just like null, false, undefined, 0, NaN.

    sorry, there is a small misunderstanding, I don't mean the comparing,
    I'm mean when passing an 'empty parameter',
    e.g. when an action will be called like this:

    Code
    test(,,,,);


    then these empty parameters will be 'empty strings' - the %1,%2,%3 and so on will resolve to empty strings (''),
    and I thinking about if they should resolve to null instead in such case...


    Quote

    IMHO empty strings should be ALWAYS enclosed between " or ' characters. That's the most usual treatment in almost any programming language, no matter how ancient or modern.
    'openthumbs( )' should be exactly the same as 'openthumbs()' and 'openthumbs( )' etc, no matter how many white spaces you put there: that's not an argument at all, and for sure that's not the 'null' argument.

    I agree of course,
    the detection of white spaces as parameter will be fixed in the next release,
    but when there is no argument during call and a argument placeholders (like %1) were used in the action, then this placeholder will be resolve to null (already in the current versions),

    best regards,
    Klaus

  • I'm pretty sure they resolve to null in php.
    Most disciplined programmers fill unused parameters with null.
    I think whatever you do, everyone is going to need to check over every null and empty string evaluation when you make your decision for the next version.

    "

    Code
    test(,,,,);


    then these empty parameters will be 'empty strings' - the %1,%2,%3 and so on will resolve to empty strings (''),
    and I thinking about if they should resolve to null instead in such case...
    "


    best regards,
    Klaus[/quote]

  • but don't you have something similar already in your code klaus?

    for instance:

    loadpano('test.xml', , MERGE); is the same as loadpano("test.xml, null, MERGE); no matter the amount of spaces.

    But what the others say is true. a space should be quoted if it wants to be passed as a string variable. If an action requires an parameter, and its not given, then the parameter would be null. If I pass null as a parameter, I want to define a defaultvalue in the action.

    take this action:

    Code
    <action name="someaction">
      if(%1 === null, set(somevar, 'defaultvalue');
     ,
      set(somevar, %1);
    ); 
       trace(somevar);
    </action>

    given: someaction();
    expected: 'defaultvalue'

    give: someaction( );
    expected: 'defaultvalue'

    give: someaction(' ');
    expected: ' '

    given: someaction(null);
    expected: 'defaultvalue'

    given: someaction('null');
    expected: 'null'

    I'm wondering what krpano does with the last 2 examples...

    with multiple parameters, like:

    someaction(,,,) or someaction( , , , , , ,);
    expect all to give null

    I think the trouble lies with that you can't set some parameter to be null.

    For instance:

    the last 2 if statement validate to true, while the strict doesnt.

    This means sometimes if a variable doesnt exsit, you have to do a strict comparison, while in other moments, the variable does exist but is set to null, you have to do normal comparison. that would confuse me alot.

    plugin[0] === null would work, while %1 === null wouldnt.

    Edited once, last by Zephyr (November 21, 2011 at 7:42 PM).

  • Hi,

    there a new update for the 1.0.8.14 version available:
    https://krpano.com/news/#2011-11-22

    Mostly smaller bugfixes, but also some improvements (especially for the Android usage).
    Here a listing of the changes:

    Changes (Flash and HTML5)

    • New devices attribute operators AND(+) and NOT(!) for mixing specific device settings - e.g. devices="android+flash".
    • Documentation update about using variables inside urls via %$VAR%.
    • The HTML5 plugins are now also included in the tools download package.
    • Added a new tweenintervalbase setting for the setting the time interval for tweens.
    • The subtxt action works now also with constant texts.
    • Videoplayer Plugin - new onvideopaused event.
    • Fix: videoplayer.swf - the pausedonstart detection was much improved by analyzing the real visible video content instead of relying on the Flash information. Additionally there are workarounds for the multi-threading bugs of the Flashplayer 11.2.
    • Fix: The if parser was not working correctly when using 'empty strings'.
    • Fix: White-spaces were detected wrongly as action parameters.

    Improvements for the Android usage

    • New drag2dsmooth control mode (default for Android when using drag2d). In the Android Flashplayer the touch input events were unfortunately dispatched at a lower rate than the screen refreshes - e.g. when the screen refreshes every 20-16ms (50-60 FPS) then the touch events when dragging around the screen occur only every 80-120ms - this means the touch inputs are very jerking and inaccurate. The solve this problem and make the movement smoother the krpano viewer is now 'smoothing' the input.
    • Updated html templates for correct 1:1 pixel-mapping on Android 3.* tablets.
    • New default Android skins with zoom buttons.
    • The krpano Flash viewer supports now the new embedding parameter simulatedevice for simulating the behaviors on Android devices. Possible settings are "android", "androidmobile" or "androidtablet".
      e.g. here a link to an example with simulatedevice=android to see the Android skin:
      https://krpano.com/krpano.html?pa…edevice=android

    krpano HTML5 Viewer (krpanoJS)

    • To make the Flash/HTML5 usage easier the area.pixel* read-only variables are now also available in the krpanoJS viewer.
    • Fix: Scaling/size bug when dynamically changing the parent.
    • Fix: events.onresize will now be only called when the size itself has really changed.
    • Fix: events.onmouseup was called twice on Desktop.
    • Fix: events.onclick will be only called when there is no or only a very small movement between mouse-down and mouse-up.
    • Fix: The url placeholder parsing/resolving was not working for <cube> urls.
    • Fix: Better Webkit detection (needed for the Google+ App).
    • Fix: Wrong "loaded/loading" values when setting a plugin again to the same url.


    Best regards,
    Klaus

  • Hi,

    just one quick addition to the release from adove:

    I have updated the current packages with an updated krpanoJS viewer.
    There was still one small bug: (thanks to Sacha Griffin for reporting)

    • When the url of a plugin or hotspot element was set again to the same url value during loading, then the loading of that element had never finished.


    Best regards,
    Klaus

  • Hey Klaus,

    would you take a look at the videoispaused-problem? The video still wont stop/exit!
    And another thing: You said some time ago that the krpanoprotect-tool would support private keys for HTML5-encryption some day. Is that still on your to do-list?

    Best regards
    Nupsi

    P.S.: Oh.....and thanks a ton for your hard work to make krpano better and better!!! Saying that was long overdue!

  • Hi,

    would you take a look at the videoispaused-problem? The video still wont stop/exit!

    yes, but this is correct so as it is,
    see the answers in the thread,


    And another thing: You said some time ago that the krpanoprotect-tool would support private keys for HTML5-encryption some day. Is that still on your to do-list?

    yes, of course, why should I have removed that from my todo list?

    best regards,
    Klaus

  • Thanks for this.
    In the future, would you mind adding something to the build when there are multiple updates on a day.
    I'm having to triple check to ensure I have the updated updated versions.

    Hi,

    just one quick addition to the release from adove:

    I have updated the current packages with an updated krpanoJS viewer.
    There was still one small bug: (thanks to Sacha Griffin for reporting)

    • When the url of a plugin or hotspot element was set again to the same url value during loading, then the loading of that element had never finished.


    Best regards,
    Klaus

Participate now!

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