opensourceBIM / BIMsurfer-before2019

This is the repository of the v1 and v2 version of BIM Surfer. It is not maintained anymore. Find the most recent version on https://github.com/opensourceBIM/BIMsurfer
MIT License
432 stars 195 forks source link

Scroll wheel with ortho cam #144

Closed aothms closed 8 years ago

aothms commented 8 years ago

Right now the behaviour of the scroll wheel with ortho cam is hard to observe. Probably it moves the camera so that the projection plane moves and a smaller/larger part of the model is clipped. While this makes sense to people that understand how the camera works, it might even be useful, but I think a better action would be to increase/decrease the the camera scale.

xeolabs commented 8 years ago

I just committed https://github.com/opensourceBIM/BIMsurfer/commit/ceaa670fcd1a7abd040980e2c20420239d3675c8 with orthographic volume scaling while zooming.

I might need to adjust the scaling rate to fit the extents of the model.

To try it out, load the test model at http://localhost:8000/example_testModel.html, drop this in the console to activate ortho:

bimSurfer.setCamera({ 
    type:"ortho"
});

then zoom with mouse wheel or +/- keypad buttons.