Kri-Soft krpano Orbit Control Plugin
This plugin enables mouse and gesture controls in krpano to behave like a 3D model viewer.
Touch:
- doubletap: set the center of the rotation to that location and zoom in
- pinch: scale model
- drag with 2 fingers: move model left/right and up/down
- swipe: rotate
Mouse:
- doubleclick: set the center of the rotation to that location and zoom in
- click and drag: rotate
- shift + click: move model left/right and up/down
- control + click: move towards / away from model
- mouse wheel: zoom in on model
Demo
https://krpano.kri-soft.be/orbitcontrol/
Installation
<plugin
name="orbitcontrol"
url="%VIEWER%/plugins/orbitcontrol.min.js"
keep="true"
license=""
doubleclickdistance="150"
mindistance="150"
rotationspeed="1"
dragspeedhorizontal="1"
dragspeedvertical="1"
/>
Attributes
· doubleclickdistance: when doubleclicking the mode, set the view to this distance from the clicked point
· mindistance: when using mouse wheel to zoom in, this it the minimum distance that will be kept to the model
· rotationspeed: rotation speed (currently only support for mouse) (0 for disable, .1 for slower, 2 for faster)
· dragspeedhorizontal: when shift/clicked, move the model with this speed to the left/right (0 for disable, .1 for slower, 2 for faster)
· dragspeedvertical: when ctrl/clicked, move the model with this speed forward/backward (0 for disable, .1 for slower, 2 for faster)
Functions:
· layer[orbitcontrol].disable: disable the mouse control (for example, for a panorama)
· layer[orbitcontrol].enable: enable the mosue control