1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<control mousetype="drag2D" />
<events onmousedown="copy(lastmx,mouse.x);
copy(lastmy,mouse.y);
if(clicks === null, set(clicks,0));
inc(clicks);
delayedcall(0.3, set(clicks,0));
"
onmouseup="if(lastmx == mouse.x,
if(lastmy == mouse.y,
if(clicks GE 2,
set(clicks,0);
mul(tofov,view.fov,0.5);
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));
);
);
);
"
onmousewheel="stoptween(view.hlookat,view.vlookat,view.fov);"
onkeydown="events.onmousewheel();"
/>
|