I have made that, witch can be use easy, i's an adaptation of the Klaus code, is working, but perhaps we can make something more clean.
http://www.doppelart.com/gallerie/guerard/planches/pages/32/
Code
<!--Zoom in by click down zoom out buy clickup-->
<events onmousedown="copy(lastmx,mouse.x);
copy(lastmy,mouse.y);
mul(tofov,view.fov,0.001);
if(tofov LT view.fovmin, copy(tofov,view.fovmin));
screentosphere(mouse.x,mouse.y,toh,tov);
adjusthlookat(get(toh));
tween(view.hlookat,get(toh));
tween(view.vlookat,get(tov));
tween(view.fov,get(tofov));
"
onmouseup="copy(lastmx,mouse.x);
copy(lastmy,mouse.y);
mul(tofov,view.fov,1.001);
if(tofov LT view.fovmax, copy(tofov,view.fovmax));
screentosphere(mouse.x,mouse.y,toh,tov);
adjusthlookat(get(toh));
tween(view.hlookat,get(toh));
tween(view.vlookat,get(tov));
tween(view.fov,get(tofov));
"
onmousewheel="stoptween(view.hlookat,view.vlookat,view.fov);"
onkeydown="events.onmousewheel();"
/>
Alles anzeigen