Scaling issue with distorted hotspot

  • I would like to use distorted hotspots in a panorama in the same way as in the example that comes with the krpano package.
    No problem so far :)

    But I want the hotspot in the OUT state to appear in 100% of the pixelsize of the hotspot image, because I will have aliased text in it.
    As long as the image style argument distorted=true that won't happen when I tween the scale=1.0

    Is there a way to achieve this? Or at least a workaround?

    All I want is the hotspot to fly out to the center of the screen, tweening from scale=0.2 to 100% pixelsize and not rotating with the panorama as long as it's in the OUT state.

    Thanks
    Jürgen

  • Yes, of course.
    But I can assure you that I wouldn't dare to bother you nice guys on that forum before I had tried that.
    Unfortunately when doing so the hotspot shows some funny behavior while OUT and rotating the panorama.
    You can easily test that in the krpano example when setting distorted to false.

    Also I probably have overseen something important here ...

  • Can you whip up a quick example? Maybe I can wrap my head around it a little better.
    BTW, I stopped using scale, and prop, because I want to know the current width and height sometimes.. so instead of scale I do the multiplication by hand.

    mul(plugin[name].width,0.75);
    mul(plugin[name].height,0.75);
    is the same as scale="0.75" but now you have access to the resultant image dimensions.. same with prop.. and the new read only imagewidth/imageheight variables are good to use to reset scale to 1.

  • Here comes the sample:
    1. Hotspot distorted=true -> Clearly visible scaling issue with text and 1px outline, but behaviour exactly as I want it
    http://bavaria360.s3.amazonaws.com/spiegel/gentrification/test.html

    2. Hotspot distorted=false -> correct scaling but unwanted behaviour and position while OUT.
    http://bavaria360.s3.amazonaws.com/spiegel/gentri…test_false.html

    XML:

  • Sure. But as you know, it always depends ;)

    IF I was a coder and could get around that placeholder shituff I might spend some more minutes on it or IF it was for a major project where I would want to impress the customer I would do it step by step. In this case it's just a slightly "advanced" panorama in a magazines iPad edition which will go into oblivion as soon as it's out :)

  • Then take the easy way out!
    Just make your text so it looks good a little aliased.
    I'm not sure why your flyout doesn't stick centered.. but I didn't check it very hard.. There is flyout code that does this in the first Example up top ^^

    placeholders are just the contents of the argument passed to the function.
    In using them, they evaluate automatically.
    No need to get() them as you would with variables.
    placeholders

Jetzt mitmachen!

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