I have loaded a glb file with three.js. It works, but I can’t get the zoom working like I would. I want to get closer and is there a possibility to stop the zooming at some value, because when I zoom in at some point there is no visible effect any more…
The site is Galerie Bernhardt
When using a perspective camera with OrbitControls
, you can control the minimum and maximum zoom via minDistance
and maxDistance
. Please notice that zoom is actually a dolly. Meaning the camera moves back and forth along the viewing direction. If you want to have a closer look at the painting, you have to increase the maxDistance
property.
I tried this, but when I incease teh maxDistance the camera moves more backward so that its outside of the cube, but it does not get closer to the pictures. Normally I expected that I can gcloser with the minDistance value, but it is 0
Makes sense! The problem is that the target of OrbitControls
is ( 0, 0, - 0.2 )
which means you can’t dolly the camera “behind” this vector.
With this in mind OrbitControls
is not the best solution for your requirements. You probably have to develop something on your own.
Puh… I think this stuff is a bit too much for me. I try to understand all this things, but maybe I am to dumb…
I even can not find a possibility that the camera is completely zoomed out when the site is loaded… Is this possible?
Sorry for my simple questions, but I can#t find a solution…