Skip to content

Commit

Permalink
feat(threeView): Removed the zoom scale calculation from the threeView.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangechen committed Aug 3, 2024
1 parent 00ea42a commit b1c39b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/chili-three/src/threeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,7 @@ export class ThreeView extends Observable implements IView {

private initRaycaster(mx: number, my: number) {
let raycaster = new Raycaster();
let scale = this.cameraController.target.distanceTo(this.camera.position) / 1000.0;
let threshold = Constants.RaycasterThreshold * scale;
let threshold = Constants.RaycasterThreshold;
let { x, y } = this.screenToCameraRect(mx, my);
let mousePos = new Vector2(x, y);
raycaster.setFromCamera(mousePos, this.camera);
Expand Down

0 comments on commit b1c39b2

Please sign in to comment.