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

  • 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

  • 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?

    Einmal editiert, zuletzt von rebaj83 (7. Dezember 2021 um 16:48)

  • 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...

  • 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>

Jetzt mitmachen!

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