McStasMcXtrace / McCode

The home of the McStas (neutrons) and McXtrace (x-rays) Monte-Carlo ray-tracing instrument simulation codes.
https://github.com/McStasMcXtrace/McCode/wiki
GNU General Public License v3.0
77 stars 54 forks source link

McDisplay-webGL: Zooming is very slow when close to the centre #319

Open ebknudsen opened 8 years ago

ebknudsen commented 8 years ago

when close to the OrbitControls target zoomign and panning gets to be very slow. Probably because the movement is in % of the distance to the target.

Possible ways out:

willend commented 7 years ago

Worth doing, but we may not have time before the next release(s)

climbcat commented 6 years ago

This is indeed very annoying, but it is not straigt-forward to fix. We need to devise a new zoom strategy, and worst case scenario, implement it. It is much faster to (dynamically?) configure the existing zoom behavior, or to install an alternative one.

climbcat commented 6 years ago

One option is to stick closely to a 2d top-view of the instrument which is oriented left-right on the screen (configurable to back- and side-views by some buttons near the top of the screen).

Clicking on the scene would reset the zoom target to that point in the instrument plane, but with a negative vertical coordinate (y if top-view). Rotating around the zoom target more than a certain degree (70?) would not be allowed. Also, the initial view would be reset @ zoom-out, to avoid the awkward and confusing instrument re-orientation mouse dragging activity.

climbcat commented 6 years ago

Peter's suggestions: Simplified: A few buttons (6?) that redefine the zoom target. Very simplified: A single button that pushes the zoom target forward (by some factor (with a ui field?) of the instrument size)

willend commented 5 years ago

@climbcat lowest priority