yelan
yelan

Reputation: 1

zooming out in webgl

I saw here Click to zoom in WebGL how to zoom in to a particular point. How can I reverse that functionality- i.e. zoom out?

Upvotes: 0

Views: 4777

Answers (1)

brainjam
brainjam

Reputation: 19005

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/

Upvotes: 1

Related Questions