Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

  • »Alexey Tkachenko« ist der Autor dieses Themas

Beiträge: 639

Wohnort: Sevastopol, Crimea, Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

1

Dienstag, 14. November 2017, 09:21

Trying to understand wheeldelta_raw

Hi all! ;-)

I was playing around with 'zoom into layer' example the other day and wanted to make the zooming a bit smoother. So I tried to use tweening and 'wheeldelta_raw' variable (docu says this is unrounded mouse wheel delta). However, when I trace both wheeldelta and wheeldelta_raw, I get +3 or -3 for wheeldelta (that's normal) and +1 or -1 for wheeldelta_raw. Only when I work hard with mousewheel I get greater values. It seems that wheeldelta_raw is always three times smaller than wheeldelta variable.

I wonder, is this some kind of bug or is it nromal?

I expected to get some unrounded values here, something like 3.6758675 or similar.
Regards,

Alexey

2

Dienstag, 14. November 2017, 22:29

Hi,

that wheeldelta_raw was mainly designed as workaround for Flashplayer limitations - some mouses where sending small values like 0.123 as delta, but inside the Flash the Flashplayer was only reporting integer delta values. So that delta was always 0 and by this it was impossible to zoom on some systems.

So as workaround krpano was capturing the mouse-wheel events externally via Javascript (because there the values were not rounded to integer) and then sending that 'raw' wheel-delta to the krpano Flash viewer to allow zooming there.

Later when the HTML5 viewer was developed, there was basically no need for a wheeldelta_raw, but to keep compatibility with the Flash viewer it's there and it simulates the same values as in Flash by scaling the delta by 3. But there is no rounding or something else in krpano.

Best regards,
Klaus