You are not logged in.

121

Monday, March 6th 2023, 9:59pm

I think I have a bug:
context: i generate an image type hotspot on top of another hotspot which is text type. No parent/child, webGL rendering
the bug : my image hotspot goes behind the text hotspot.

Do you explicitly set renderer="webgl"?

The default in 1.21 is renderer="auto" and this renders textfield hotspots by HTML/CSS3D - and HTML/CSS3D is technically always layered above WebGL.

See the compatibility about renderer="auto":
https://krpano.com/docu/releasenotes/#kr…1_compatibility
Indeed, I miss this value, it works perfectly

kme

Trainee

Posts: 141

Location: Belgium

Occupation: Long time coder, product manager and 3D enthousiast

  • Send private message

122

Monday, March 6th 2023, 11:00pm

ondown vs onmousedown

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:

Source code

1
2
3
4
5
6
7
8
9
	<action name="ondowntest" autorun="onstart" type="javascript">
	<![CDATA[
		krpano.events.addListener("ondown", "alertme()");
	]]>	
	</action>	
	
	<action name="alertme">
		showlog();
	</action>


This works:

Source code

1
2
3
4
5
6
7
8
9
	<action name="ondowntest" autorun="onstart" type="javascript">
	<![CDATA[
		krpano.events.addListener("onmousedown", "alertme()");
	]]>	
	</action>	
	
	<action name="alertme">
		showlog();
	</action>


Bug in documentation? Or implementation?

spacerywirtualne

Professional

Posts: 1,102

Location: Poland, Europe

Occupation: krpano developer : virtual tours : the cms4vr owner

  • Send private message

123

Monday, March 6th 2023, 11:23pm

This is a reference to a JS function rather than a krpano action.





Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*

kme

Trainee

Posts: 141

Location: Belgium

Occupation: Long time coder, product manager and 3D enthousiast

  • Send private message

124

Monday, March 6th 2023, 11:39pm

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:

Source code

1
2
3
	function alertme() {
		alert("me");
	}


And as action:

Source code

1
2
3
4
5
	<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

Source code

1
2
3
4
5
	<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.

125

Tuesday, March 7th 2023, 12:11am

a string is interpreted as krpano action. you need to pass the function itself :
krpano.events.addListener("onmousedown", alertme); or maybe
krpano.events.addListener("onmousedown", window.alertme);

kme

Trainee

Posts: 141

Location: Belgium

Occupation: Long time coder, product manager and 3D enthousiast

  • Send private message

126

Tuesday, March 7th 2023, 12:24am

YESSS *thumbsup* *thumbsup*

this works (in combination with the <script> above).

Source code

1
2
3
4
5
6
	<action name="ondowntest" autorun="onstart" type="javascript">
	<![CDATA[
				krpano.events.addListener("onmousedown", alertme);

	]]>	
	</action>


Thanks for the clarification *g*

127

Tuesday, March 7th 2023, 12:32am

btw, passing a function with argument would work like :
krpano.events.addListener("onmousedown", function() { alert('hello'); });

kme

Trainee

Posts: 141

Location: Belgium

Occupation: Long time coder, product manager and 3D enthousiast

  • Send private message

128

Tuesday, March 7th 2023, 8:57am

I actually tried that before but it also didnt work because... i was using quotes around it *unsure* Without quotes it works perfectly...

Thanks for your help.

129

Tuesday, March 7th 2023, 9:11am

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.

mc360photo

Trainee

Posts: 53

Location: ITALY

Occupation: Photographer

  • Send private message

130

Tuesday, March 7th 2023, 10:18am

Use flowchildren with flowoverflow keeping the alignement of children

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

131

Saturday, March 11th 2023, 6:04pm

Little bit 'Feature requests' for a new 1.21 release

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

132

Monday, March 13th 2023, 7:21pm

Deeplinking - Problem

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

This post has been edited 1 times, last edit by "torent75" (Mar 13th 2023, 8:22pm)


133

Tuesday, March 14th 2023, 10:14am

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.

Tuur

Sage

Posts: 3,729

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

134

Tuesday, March 14th 2023, 12:36pm

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*

135

Tuesday, March 14th 2023, 8:18pm

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)

136

Wednesday, March 15th 2023, 4:38pm

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

kme

Trainee

Posts: 141

Location: Belgium

Occupation: Long time coder, product manager and 3D enthousiast

  • Send private message

137

Wednesday, March 15th 2023, 4:41pm

*thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup*

138

Wednesday, March 15th 2023, 4:41pm

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.

Tuur

Sage

Posts: 3,729

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

140

Wednesday, March 15th 2023, 4:54pm

*whistling* *whistling* *whistling* *g*

Similar threads