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.

1

Friday, October 26th 2012, 11:13am

HTML5 plugin rendering

I'm creating a JS plugin for my Panorama. However, text appears to be rather blurry sometimes when I rotate my pano (Safari, Mac). I have found the cause, it's due to the webkit-transform values not being rounded.

IE: webkit-transform: translate(217.09142528458045px, 225.4742243902969px)

I tried doing a Math.round around the WebKitPoint's in the krpanoiphone.js file without any luck (the values just weren't being rounded). Maybe that was the wrong place to do so, but the code is a little hard to read. I'm not sure where else I can look. Does anyone here have any suggestions, so I can sharpen up my JS plugin(s)?

This post has been edited 1 times, last edit by "Sam Granger" (Oct 26th 2012, 12:33pm)


2

Tuesday, October 30th 2012, 10:20am

Hi,

is your question related to hotspots?
because the positions of normal plugin/layer elements are already rounded by default (can be changed by the accuracy setting)

best regards,
Klaus

3

Tuesday, October 30th 2012, 1:49pm

It is a hotspot, but setting accuracy in <hotspot> doesn't do the trick here. IE:

<krpano>
<hotspot name="label17" url="/layouts/trainstation/clients/tjs/panorama/plugins/sortable.js" alturl="/layouts/trainstation/clients/tjs/panorama/plugins/sortable.js" enabled="true" ath="-79" atv="9" keep="true" edge="lefttop" accuracy="0" todo="1" label="Pompen" id="7" subjects="{"87":"Kennis brandstoffen 1"}"/>
</krpano>



Also tried using accuracy="1"

Still blurry however. Hotspot files are included via an <include> by the way - not sure if that makes a difference?

4

Tuesday, October 30th 2012, 1:55pm

Hi,
It is a hotspot, but setting accuracy in <hotspot> doesn't do the trick here.
as said - that's only for plugin/layer elements! - that was why I asking if you were using a hotspot .
I will try to add an optional setting for enabling position rounding for hotspot in of the next release.
By default this will not be enabled, because still would case bad-looking 'jumping' movements.

Still blurry however. Hotspot files are included via an <include> by the way - not sure if that makes a difference?
The <include> is only relevant at the xml-declaration and parsing stage, but doesn't affect the working of anything.

Best regards,
Klaus

5

Tuesday, October 30th 2012, 2:00pm

Thanks, that'd be nice - I can't really use a <plugin> due to not being able to set ath/atv.

Looking forward to seeing this in the next version! :)

6

Tuesday, October 30th 2012, 2:04pm

A temporary workaround might be using the onviewchange event and the spheretoscreen action to calculate the x/y position for the <plugin> element manually...