• I'm using addListener in a javascript action. The documentation states that the events are the "krpano" events and links to them. In those events, the mouse down event is "ondown". However when using this in addListener, this method is not triggered. When using the (not listed) onmousedown event, the addListener functions properly

    This does not work:

    Code
    <action name="ondowntest" autorun="onstart" type="javascript">
    	<![CDATA[
    		krpano.events.addListener("ondown", "alertme()");
    	]]>	
    	</action>	
    	
    	<action name="alertme">
    		showlog();
    	</action>

    This works:

    Code
    <action name="ondowntest" autorun="onstart" type="javascript">
    	<![CDATA[
    		krpano.events.addListener("onmousedown", "alertme()");
    	]]>	
    	</action>	
    	
    	<action name="alertme">
    		showlog();
    	</action>

    Bug in documentation? Or implementation?

  • Thanks for the addition. I read that as well and would have indeed expected a javascript function as the second paramater. Sadly... that also does not seems to work as documented.

    When I define:
    in html:

    Code
    function alertme() {
    		alert("me");
    	}

    And as action:

    Code
    <action name="ondowntest" autorun="onstart" type="javascript">
    	<![CDATA[
    		krpano.events.addListener("onmousedown", "alertme()");
    	]]>	
    	</action>

    it does not work and shows a warning in the console
    WARNING: Unknown action: alertme

    But when I do

    Code
    <action name="ondowntest" autorun="onstart" type="javascript">
    	<![CDATA[
    			krpano.events.addListener("onmousedown", "jscall(alertme())");
    	]]>	
    	</action>

    Then it does work! So it seems to be calling krpano functions, rather than javascript functions directly.

  • I'm using addListener in a javascript action. The documentation states that the events are the "krpano" events and links to them. In those events, the mouse down event is "ondown". However when using this in addListener, this method is not triggered. When using the (not listed) onmousedown event, the addListener functions properly


    Right, there is a bug here - the 'old to new event-name remapping' isn't done for these events.
    This is fixed now for the next release, then both event names can be used.

  • I am trying to use flowchildren=h with flowoverflow=true to organize child layers in a parent layer when parent layer is resized.

    It works but the child layers are always arranged with left alignment in the parent.

    I am unable to set center or right alignment of the child layers in the parent layer, it seems that the align attribute of child layers is ignored when flowchildren=h flowoverflow=true is set in the parent.

    Here below a sample of code i am using

    <layer name="myparent" type="container" align="center" width="50%" bgborder="1" flowchildren="h" flowoverflow="true" childmargin="5" childflowspacing="5"/>

    <layer name="mychild1" type="text" align="right" text="Child1" width="200" parent="myparent" />
    <layer name="mychild2" type="text" align="right" text="Child2" width="200" parent="myparent" />
    <layer name="mychild3" type="text" align="right" text="Child3" width="200" parent="myparent" />
    <layer name="mychild4" type="text" align="right" text="Child4" width="200" parent="myparent" />

    Any suggestion?
    Thanks Marco

  • Please, when creating a preview file for [# preview pano settings] make it possible to get a Horizontal Strip (type="CUBESTRIP" striporder="FRBLUD"). Also, the output file, it seems to me, even with the value [previewsmooth=0] the output is rather blurry texture, I think because of poor inerpolation, BUT you need a clear image, as with the Lanczos algorithm interpolator. Thank you, I will be glad if my requests are heard...Regards, GumirJ

  • Hi,

    today i bought upgrade to 1.21 after long time using old version. Now i can't start with deeplinking i change like always on "true" but nothing happen - musst do i somthing more?

    Cheers Tomek


    Ps i have testet it and now i am sure Problem is with new version krpano with old 1.20 works fine but new version not working

    Edited once, last by torent75 (March 13, 2023 at 8:22 PM).

  • I am unable to set center or right alignment of the child layers in the parent layer, it seems that the align attribute of child layers is ignored when flowchildren=h flowoverflow=true is set in the parent.

    Sorry, but the flowing is currently always only from top/left to bottom/right.


    Please, when creating a preview file for [# preview pano settings] make it possible to get a Horizontal Strip (type="CUBESTRIP" striporder="FRBLUD"). Also, the output file, it seems to me, even with the value [previewsmooth=0] the output is rather blurry texture, I think because of poor inerpolation, BUT you need a clear image, as with the Lanczos algorithm interpolator. Thank you, I will be glad if my requests are heard...Regards, GumirJ

    Currently only the default cubestrip order is support for output. And the interpolation when making the preview is not 'poor', it is intentionally smoother ;-). The preview image should have as few high-frequency details as possible to allow a smooth and uninterrupted perception when it gets replaced with the higher-res images. Lanczos would be especially bad here, because it introduces new details and high-contrast edges.

    But tastes can be different of course - if you want a sharpened preview pano, you could create one e.g. using the spheretocube tool. A custom striporder could be also created this way, output separate cube faces, rename them to numbered files and then merge them using the maketiles tool (could be automated with some batch/shell script).


    today i bought upgrade to 1.21 after long time using old version. Now i can't start with deeplinking i change like always on "true" but nothing happen - musst do i somthing more?

    Right, this is a bug. See here about js() for more information and a workaround:
    krpano 1.21 (pre-release)
    Or wait a bit, there will be very soon a fixed version.

  • Hi Klaus,

    it seems the rz rotation (camroll or bring ear to shoulder) of the flying is missing since 1.21.
    2 barebones to be watched in vr headset:

    Good:
    https://www.virtualtuur.com/krpano/121/tests/flying/120/

    Wrong:
    https://www.virtualtuur.com/krpano/121/tests/flying/121/

    I am trying to get the effect as in the 120 example.. no success yet.

    Any clue?

    Tuur *thumbsup*

  • Hi Klaus,

    I'm testing the version with my plugin, I'm facing a problem that I don't understand:
    in desktop verion, everything is OK, but in VR the different hotspot crees are not positioned correctly, here is an example.

    I don't understand what mathematical correction I have to do to find a correct positioning. (in V1.20 I have no problem)

  • Hi,

    Thanks for all the feedback for the 1.21 pre-release!
    Here a new pre-release (build 2023-03-15) that addresses many of the reported issues and wishes.
    Additionally also a few new features were added.

    Changes since the previous 1.21 pre-release:

    • New: bgbrightness, bgcontrast, bgsaturate, bghue, bginvert, bgsepia, bgblur- background filter effects for layers.
    • New: depthmap.backgroundurl setting for using a sphere pano image behind the 3D-model.
    • New: WebVR floorlevel variable - when supported by the headset, the floorlevel variable will provide the physical height of the headset (report).
    • New: depthmap_navigation.xml - support ground/floor collision checking (walking stairs and elevation up and down, jumping), optionally use the real physical height in VR, new onscreen touch-joystick control mode with a steady moving.
    • New: The depthmap.cull setting can be changed anytime at runtime now.
    • New: The events.onframe event.
    • New: The have3dtransition variable for checking if there is a 3D-transition.
    • Change: Previously the string-quotes of action parameters were resolved as the first parsing step, the resolving of get(var), *var, calc(expression) , (expression) was only performed afterwards. This has now been changed. Now the get/calc resolving is done 'before' the string-quotes resolving. That means when there is now a get/calc inside string-quotes, then there will be no resolving anymore and the result will be an unparsed String (report).
    • Change: New "auto" mode for gridfit to allow full control when pixel-grid-fitting will be used (report).
    • Change: Show the debug hotspot outlines also for alpha=0 hotspots.
    • Change: In the recent browser versions it is no longer possible to detect if a desktop/laptop computer has a touch-screen (the new browsers now always report touch and gesture support to avoid 'finger-printing'). To adopt to this change, the device.touch settings will now be true only on mobile/touch devices. A desktop or laptop device with a touch-screen will report device.touch=false but still support touch- and gesture controls.
    • Fix: The documentation about the screentodepth / raycastdepth rotationorder for the rx,ry,rz values was wrong. The correct rotationorder is "zxy".
    • Fix: The js() action had several compatibility problems (report).
    • Fix: Using url placeholders in the depthmap .obj file url caused problems when loading the mtl textures (report).
    • Fix: Support texture wrapping for mtl textures - and also support the '-clamp on/off' parameter in the mtl file to change/control that wrapping.
    • Fix: Support onwheel and capturewheel also for WebGL hotspots (report).
    • Fix: The hit-testing fails on WebGL hotspots with depth=off (report).
    • Fix: Pressing multiple mouse buttons the same time doesn't resolve to correct ondown/up events (report).
    • Fix: Improved multiple-mouse button tracking.
    • Fix: The mouse.downx/downy variables weren't updated when touching on layers.
    • Fix: the near setting of the display.depthrange setting was wrongly ignored.
    • Fix: The display.depthrange setting was not used in VR in all cases.
    • Fix: Wrong hotspot size after hotspot parent change (report)
    • Fix: Support encryption of .obj and .mtl files (report).
    • Fix: The combobox.xml supports now dynamic content changes, e.g. when a font gets changed later or an image got loaded (report).
    • Fix: loadpano calls inside a localonly scope action failed when the <image> is using <level> elements (report).
    • Fix: Scrollarea - the autoscrollbars horizontal scrollbar dragging was wrong (report).
    • Fix: preload=true wasn't working in multiple cases (report).
    • Fix: Using prealign with 3dtransitions and a hlookatoffset wasn't working correctly. (report1, report2).
    • Fix: The hotspots flying VR wasn't working well - now the flying hotspots don't rotate to the current camroll and don't scale to the screen resolution, now the hotspot 'fly' to the 3D-distance given by the new display.hotspotvrflying setting.
    • Fix: The hotspot ox/oy offsets weren't scaled by stagescale in some cases.
    • Fix: Support the old and new event names also for events added by events.addListener (report).
    • Fix: Performance improvements for textfields.
    • Fix: vtourskin.xml - gyro and 3D-transitions didn't work well together (report).
    • Fix: vtourskin.xml - don't show the rotate-to-landscape info in portrait-mode again when loading a new pano.
    • Fix: Support adding or removing elements during a forall array loop (report).

    And there is a new example:

    • For testing the new depthmap_navigation.xml collision features.
    • It offers game-like controls, but only in a very simple and basic way of course.
    • A real usage case could be for textured 3D-scans of an environment or room in combination with highres-panos at certain locations.


    Best regards,
    Klaus

  • it seems the rz rotation (camroll or bring ear to shoulder) of the flying is missing since 1.21.
    2 barebones to be watched in vr headset:

    I'm testing the version with my plugin, I'm facing a problem that I don't understand:
    in desktop verion, everything is OK, but in VR the different hotspot crees are not positioned correctly, here is an example.


    Please try the new pre-release from above.

Participate now!

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