开发者

zooming out in webgl

开发者 https://www.devze.com 2023-03-09 10:36 出处:网络
I saw here Click to zoom in WebGL how to zoom in to a particular point. How can I reverse that functionality- i.e. 开发者_如何学Pythonzoom out?Change the statement

I saw here Click to zoom in WebGL how to zoom in to a particular point. How can I reverse that functionality- i.e. 开发者_如何学Pythonzoom out?


Change the statement

  vec3.subtract(eye,dir) ;

to

  vec3.add(eye,dir) ;

This moves the eye in the opposite direction from before.

Here's the modified live example: http://jsfiddle.net/3wwdU/1/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号