You are not logged in.

1

Wednesday, June 29th 2016, 11:17am

Access a hotspot sprite that is rendered in webgl

Hi,

For some reason i access hotspot sprite via hotspot[name].sprite

that worked like a charm when hotspot was rendered with css3D (pr4)

but now hotspots are rendered in webgl (pr5) the hotspot[name].sprite doesn't work anymore.

so my question is how do i access the graphic element of the hotspot that is displayed in webgl thanks to in javascript?

thanks a lot

2

Wednesday, June 29th 2016, 12:24pm

Hi,

there is no 'sprite' (or any html DOM elements at all) in WebGL.

if you want one, you need to add renderer="css3d" to the hotspot, but then the hotspot will be rendered via HTML/CSS3D and not via WebGL.

Best regards,
Klaus

3

Wednesday, June 29th 2016, 2:54pm

Hi Klaus,

Thanks for precision

We managed to use the sprite with renderer="css3d" yet, but the problem is if the spot is rendered with CSS3D, it disappear as soon as a transition/blending is ignited.

that is a problem to us. Webgl keeps the spots during transition which is perfect.

do you plan to correct this behaviour with css3D rendered hotspots? (means keeping them visible during blending to next pano)

if not is there a way to access the webgl hotspot?

thanks

4

Wednesday, June 29th 2016, 5:05pm

do you plan to correct this behaviour with css3D rendered hotspots? (means keeping them visible during blending to next pano)
No, that's not possible.

if not is there a way to access the webgl hotspot?
What do you want to access?

5

Thursday, June 30th 2016, 4:22pm

ok

i want to assess the image of the hotspot

in fact i want to blur it

here's the result with css3D hotspot (the persons face) but the problem is it disappear as soon as you change view:

blur is made over the hotspot sprite that is blurred through js

is there a way to achieve this with a webgl rendered spot?

This post has been edited 1 times, last edit by "rebaj83" (Dec 7th 2021, 4:48pm)


6

Monday, July 4th 2016, 4:43pm

any news?

7

Friday, July 8th 2016, 1:18pm

Sorry, but how would you do that in WebGL?

A blur effect would require a multipass rendering - e.g. first render the image to a texture, then blur it (first vertically, then horizontally) and then rendered the blurred image onto the pano...

Such would require several setup and management around - that's not something that could be simply added by having access to some internal WebGL stuff...

8

Tuesday, November 30th 2021, 12:16pm

Hotspot css3d not allow onlick function

HI team,

I am doing a hotspot that loads data from iframe. When you click on it, it will pop up a corresponding link.
but now it is not receiving the onclick event .Please support me

<hotspot name="hs_video_xq1"
id="product"
url="assets/black.png"
pausedonstart="false"
loop="true" renderer="css3d"
distorted="true" ath="94.014" atv="2.531" rx="5.5" ry="-1.1" rz="-0.7" scale="0.743" alpha="1.0"
onloaded="add_iframe(calc(product_link_iframe), 600, 400,calc(product[2].id));"
onclick=" youtubeplayer_open(calc(video[1].video_link)); sound_off(hs_video);" onhover="action(showHotSpot_text, Watch video) "
/>

<action name="add_iframe" type="Javascript">
var iframe = document.createElement("iframe"); iframe.style.position = "absolute"; iframe.style.left = 0;
iframe.style.top = 0; iframe.style.width = "100%"; iframe.style.height = "100%";
iframe.style.border = 0;
iframe.src = args[1] + args[4] ;
caller.registercontentsize(args[2], args[3]);
iframe.setAttribute('allowFullScreen', '');
caller.sprite.appendChild(iframe);
</action>