Description
why my scene can not showed fully, after wheel scale and drag? who can help me? thanks
Reproduction steps
- wheel scale the scene
- drag the canvas
- wheel scale
Live example
Screenshots
Version
“three”: “^0.162.0”
Device
Desktop, Mobile
Browser
Chrome
Try a camera that goes deeper, i.e. 2000 instead of 1000:
camera = new THREE.OrthographicCamera( ..., 2000);
1 Like
it is the controls rotate, but I wrote controls.enableRotate = false; // 关闭旋转
, how to resolve it?
Most likely this is conflict between camera being controlled by OrbitControls and by you. Try updating controls.target coordinates in the PointerMove handler:
camera.lookAt(camera.position.x, camera.position.y, 0);
camera.updateProjectionMatrix();
// add this line
controls.target.set( camera.position.x, camera.position.y, 0 );
1 Like
By wheel scale do you mean changing the browser zoom level?