You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

  • "360gradenfotografie" started this thread

Posts: 59

Location: Tilburg, The Netherlands

  • Send private message

1

Thursday, November 8th 2018, 5:03pm

Hotspot images with rounded corners

I would like to create hotspot images with rounded corners. I would like to do that using krpano, javascript or css. I tried to do it using javascript with the loader attribute:

document.getElementById('krpano').get('hotspot[hotspotname]').loader.style.borderRadius = "25px"

... but that doesn't work. Maybe I don't fully understand the loader attribute.

Any ideas?

2

Friday, November 9th 2018, 10:08am

Hi,

first you would need to set renderer="css3d" to let the hotspot be drawn by html/css,
then it can be necessary use the onloaded event to wait before that hotspot is actually there (depends on when you call your code),
but when the hotspot is there you can access the sprite member (not the loader) to add custom CSS styles there.

Best regards,
Klaus

  • "360gradenfotografie" started this thread

Posts: 59

Location: Tilburg, The Netherlands

  • Send private message

3

Friday, November 9th 2018, 10:40am

Thanks,

I got that working, but in WebVR mode CSS3D content won't be shown.

So, (at the moment) it's not possible to give hotspot images rounded corners? (given the requirement that they have to be compatible with WebVR)