Zoom in and out
xiedapao opened this issue · 1 comments
xiedapao commented
When we zoom in and out, the toolbar also follows the activity.
Manohartk commented
@xiedapao You can add the class name on the two images then write below Jquery to your file.
//Zoom In Function
document.querySelector('.zoom_in').onclick = function () {
if(camera.zoom < 1.5) {
camera.zoom+=0.2;
camera.updateProjectionMatrix();
}
};
//Zoom OUt Function
document.querySelector('.zoom_out').onclick = function () {
if(camera.zoom > 0.5) {
camera.zoom-=0.2;
camera.updateProjectionMatrix();
}
};